diff --git a/src/mpl/include/mpl_gpu_cuda.h b/src/mpl/include/mpl_gpu_cuda.h index 566b82ecb2e..7996802dec2 100644 --- a/src/mpl/include/mpl_gpu_cuda.h +++ b/src/mpl/include/mpl_gpu_cuda.h @@ -13,6 +13,7 @@ typedef cudaIpcMemHandle_t MPL_gpu_ipc_mem_handle_t; typedef struct cudaPointerAttributes MPL_gpu_device_attr; typedef int MPL_gpu_request; typedef cudaStream_t MPL_gpu_stream_t; +typedef CUdevice MPL_gpu_device_handle_t; /* Note: event variable need be allocated on a gpu registered host buffer for it to work */ typedef volatile int MPL_gpu_event_t; @@ -22,4 +23,6 @@ typedef volatile int MPL_gpu_event_t; #define MPL_GPU_DEV_AFFINITY_ENV "CUDA_VISIBLE_DEVICES" +#define MPL_gpu_device_id_to_handle(...) cuDeviceGet(__VA_ARGS__) + #endif /* ifndef MPL_GPU_CUDA_H_INCLUDED */