openfl.plugins.processing_units_monitor.cuda_device_monitor.CUDADeviceMonitor#

class openfl.plugins.processing_units_monitor.cuda_device_monitor.CUDADeviceMonitor[source]#

Bases: DeviceMonitor

CUDA Device monitor plugin.

__init__()#

Methods

__init__()

get_cuda_version()

Get CUDA driver version.

get_device_memory_total(index)

Get total memory available on the device.

get_device_memory_utilized(index)

Get utilized memory on the device.

get_device_name(index)

Get device name.

get_device_utilization(index)

Get device utilization.

get_driver_version()

Get CUDA driver version.

get_cuda_version()[source]#

Get CUDA driver version.

This method is not implemented.

Returns:

The CUDA driver version.

Return type:

str

Raises:

NotImplementedError – This is a placeholder method that needs to be implemented in subclasses.

get_device_memory_total(index)[source]#

Get total memory available on the device.

This method is not implemented.

Parameters:

index (int) – The index of the device.

Returns:

The total memory available on the device.

Return type:

int

Raises:

NotImplementedError – This is a placeholder method that needs to be implemented in subclasses.

get_device_memory_utilized(index)[source]#

Get utilized memory on the device.

This method is not implemented.

Parameters:

index (int) – The index of the device.

Returns:

The utilized memory on the device.

Return type:

int

Raises:

NotImplementedError – This is a placeholder method that needs to be implemented in subclasses.

get_device_name(index)[source]#

Get device name.

This method is not implemented.

Parameters:

index (int) – The index of the device.

Returns:

The device name.

Return type:

str

Raises:

NotImplementedError – This is a placeholder method that needs to be implemented in subclasses.

get_device_utilization(index)[source]#

Get device utilization.

It is just a general method that returns a string that may be shown to the frontend user. This method is not implemented.

Parameters:

index (int) – The index of the device.

Returns:

The device utilization.

Return type:

str

Raises:

NotImplementedError – This is a placeholder method that needs to be implemented in subclasses.

get_driver_version()[source]#

Get CUDA driver version.

This method is not implemented.

Returns:

The CUDA driver version.

Return type:

str

Raises:

NotImplementedError – This is a placeholder method that needs to be implemented in subclasses.