nemo_rl.utils.nvml
#
Module Contents#
Functions#
Context manager for NVML initialization and shutdown. |
|
Convert a logical device ID to a physical device ID considering CUDA_VISIBLE_DEVICES. |
|
Get the UUID of a CUDA device using NVML. |
|
Get the free memory of a CUDA device in bytes using NVML. |
API#
- nemo_rl.utils.nvml.nvml_context() Generator[None, None, None] [source]#
Context manager for NVML initialization and shutdown.
- Raises:
RuntimeError – If NVML initialization fails
- nemo_rl.utils.nvml.device_id_to_physical_device_id(device_id: int) int [source]#
Convert a logical device ID to a physical device ID considering CUDA_VISIBLE_DEVICES.