cuda.bindings._v2.driver.device_primary_ctx_release_v2#
- cuda.bindings._v2.driver.device_primary_ctx_release_v2(int dev)#
Release the primary context on the GPU.
Releases the primary context interop on the device. A retained context should always be released once the user is done using it. The context is automatically reset once the last reference to it is released. This behavior is different when the primary context was retained by the CUDA runtime from CUDA 4.0 and earlier. In this case, the primary context remains always active. Releasing a primary context that has not been previously retained will fail with
CUDA_ERROR_INVALID_CONTEXT. Please note that unlikecuCtxDestroy()this method does not pop the context from stack in any circumstances.- Parameters:
dev (int) – Device which primary context is released.
See also
cuDevicePrimaryCtxRelease_v2