cuda.bindings._v2.driver.gl_get_devices_v2#
- cuda.bindings._v2.driver.gl_get_devices_v2(int device_list)#
Gets the CUDA devices associated with the current OpenGL context.
Returns the CUDA-compatible devices for the current OpenGL context. If any of the GPUs used by the current OpenGL context are not CUDA-capable,
CUDA_ERROR_NO_DEVICEis returned.The
device_listargument may be one ofCU_GL_DEVICE_LIST_ALL(all devices used by the context),CU_GL_DEVICE_LIST_CURRENT_FRAME(devices rendering the current frame), orCU_GL_DEVICE_LIST_NEXT_FRAME(devices predicted to render the next frame, SLI only).Note
This function is not supported on macOS.
Uses a fixed 64-element buffer; returns only the devices actually present.
- Parameters:
device_list (int) – The set of devices to return (one of
CU_GL_DEVICE_LIST_ALL,CU_GL_DEVICE_LIST_CURRENT_FRAMEorCU_GL_DEVICE_LIST_NEXT_FRAME).- Returns:
- numpy
int32array of the CUDA device ordinals associated with the current OpenGL context.
- numpy
- Return type:
See also
cuGLGetDevices