cuda.bindings.nvml.init_with_flags#
- cuda.bindings.nvml.init_with_flags(unsigned int flags)#
Initialize the NVML Library lazily, without allocating any device state, with additional init flags.
A variant of
init_v2(), this will initialize the NVML Library state without enumerating any discovered devices. An option to pass in additional flags is provided to modify the behavior of NVML Library init. The usage of these flags can be obtained from NVML_INIT_FLAG_*. These flags can be combined together. Other than the “flags” parameter, this method is completely identical toinit_v2(). For all products.- Parameters:
flags (unsigned int) – NVML_INIT_FLAG_* flags that can modify NVML Init behavior.
Note
With the environment variable
NVML_MPS_DEVICE_ENUMERATIONset to 1, this API selects the MPS locality-domain view.NVML_INIT_FLAG_NO_ATTACHis not supported in that view. SeeMPS Locality Domain Device Enumeration.Note
A reference count of the number of initializations is maintained, and a corresponding call to
shutdown()needs to be issued once usage of the NVML Library is complete. Shutdown will only occur after the reference count reaches zero.See also
nvmlInitWithFlags