sporco_cuda.util module

device_count()

Get the number of CUDA GPU devices installed on the host system.

Returns:
ndevint

Number of installed deviced

current_device(id=None)

Get or set the current CUDA GPU device. The current device is not set if id is None

Parameters:
idint or None, optional (default None)

Device number of device to be set as current device

Returns:
idint

Device number of current device

memory_info()

Get memory information for the current CUDA GPU device.

Returns:
freeint

Free memory in bytes

totalint

Total memory in bytes

device_name(int dev=0)

Get hardware model name for the specified CUDA GPU device.

Parameters:
idint, optional (default 0)

Device number of device

Returns:
namestring

Hardware device name