cuda.bindings._v2.driver.device_primary_ctx_reset_v2#

cuda.bindings._v2.driver.device_primary_ctx_reset_v2(int dev)#

Destroy all allocations and reset all state on the primary context.

Explicitly destroys and cleans up all resources associated with the current device in the current process. Note that it is responsibility of the calling function to ensure that no other module in the process is using the device any more. For that reason it is recommended to use cuDevicePrimaryCtxRelease() in most cases. However it is safe for other modules to call cuDevicePrimaryCtxRelease() even after resetting the device. Resetting the primary context does not release it, an application that has retained the primary context should explicitly release its usage.

Parameters:

dev (int) – Device for which primary context is destroyed.

See also

cuDevicePrimaryCtxReset_v2