perun.backend.nvml

Nvidia Mangement Library Source definition.

Attributes

log

Classes

NVMLBackend

NVMLSource class.

Module Contents

perun.backend.nvml.log
class perun.backend.nvml.NVMLBackend

Bases: perun.backend.backend.Backend

NVMLSource class.

Setups connection to NVML and creates relevant devices

id = 'nvlm'
name = 'NVIDIA ML'
description: str = 'Access GPU information from NVML python bindings'
setup()

Init pynvml and gather number of devices.

close()

Backend shutdown code.

availableSensors() Dict[str, Tuple]

Return string ids of visible devices.

Returns

Set[str]

Set with sensor ids.

getSensors(deviceList: Set[str]) List[perun.data_model.sensor.Sensor]

Gather sensor object based on a set of device ids.

Parameters

deviceListSet[str]

Set containing divice ids.

Returns

List[Sensor]

List with Sensor objects.

_getPowerSensor(device_idx: int) perun.data_model.sensor.Sensor
_getPowerCallback(handle) Callable[[], numpy.number]
_getMemorySensor(device_idx: int) perun.data_model.sensor.Sensor
_getUsedMemCallback(handle) Callable[[], numpy.number]
_getClockSensor(device_idx: int, clock_type: str) perun.data_model.sensor.Sensor
_getClockCallback(handle, clock_type) Callable[[], numpy.number]