cuda.bindings.nvml.device_set_persistence_mode#
- cuda.bindings.nvml.device_set_persistence_mode(intptr_t device, int mode)#
Set the persistence mode for the device.
For all products. For Linux only. Requires root/admin permissions. The persistence mode determines whether the GPU driver software is torn down after the last client exits. This operation takes effect immediately. It is not persistent across reboots. After each reboot the persistence mode is reset to “Disabled”. See
nvmlEnableState_tfor available modes. After calling this API with mode set to NVML_FEATURE_DISABLED on a device that has its own NUMA memory, the given device handle will no longer be valid, and to continue to interact with this device, a new handle should be obtained from one of the nvmlDeviceGetHandleBy*() APIs. This limitation is currently only applicable to devices that have a coherent NVLink connection to system memory.- Parameters:
device (intptr_t) – The identifier of the target device.
mode (EnableState) – The target persistence mode.
See also
nvmlDeviceSetPersistenceMode