1 #include "caffe2/core/blob.h" 2 #include "caffe2/core/blob_serialization.h" 3 #include "caffe2/core/context_gpu.h" 8 void TensorSerializer<CUDAContext>::StoreDeviceDetail(
10 auto* device_detail = proto->mutable_device_detail();
11 device_detail->set_device_type(CUDA);
12 device_detail->set_cuda_gpu_id(
17 REGISTER_BLOB_SERIALIZER(
18 (TypeMeta::Id<TensorCUDA>()),
19 TensorSerializer<CUDAContext>);
20 REGISTER_BLOB_DESERIALIZER(TensorCUDA, TensorDeserializer<CUDAContext>);
A global dictionary that holds information about what Caffe2 modules have been loaded in the current ...
int GetGPUIDForPointer(const void *ptr)
Gets the GPU id that the current pointer is located at.