DeviceOption::set_device_type() parameter

If I look at previous sources like this or this, it seems like I have to put in caffe2::CPU or caffe2::CUDA into the DeviceOption::set_device_type() function, which are both const DeviceType.

However, when I try that with the current caffe2, I get a compile time error, which says:
Cannot initialize a parameter of type '::google::protobuf::int32' (aka 'int') with an lvalue of type 'const caffe2::DeviceType' (aka 'const c10::DeviceType')

Now, what would I have to pass in to DeviceOption::set_device_type()??

I’m on macOS and my pytorch version is '1.0.0a0+60e7d04' and I have compiled from source.

I’ve posted a couple questions regarding caffe2 and c++, but received no answers, so if I’m posting on the wrong forum, please let me know and I’ll gladly post elsewhere. Otherwise, I’d highly appreciate if anyone could give me a pointer. Even the vaguest answer will be much appreciated.