Mila 0.13.48
Deep Neural Network Library
Loading...
Searching...
No Matches
Mila::Dnn::Compute::CudaDeviceRegistrar Class Referenceexport

CUDA device registrar for device-agnostic registration. More...

Static Public Member Functions

static int getDeviceCount ()
 Gets the number of available CUDA devices.
static void registerDevices ()
 Register CUDA support with the DeviceRegistry.

Static Private Member Functions

static bool isDeviceUsable (int deviceId)
 Checks if a specific CUDA device is usable for computation.

Detailed Description

CUDA device registrar for device-agnostic registration.

Encapsulates CUDA-specific logic for device discovery and registration, providing a clean static interface while handling CUDA runtime API interactions internally.

Member Function Documentation

◆ getDeviceCount()

int Mila::Dnn::Compute::CudaDeviceRegistrar::getDeviceCount ( )
inlinestatic

Gets the number of available CUDA devices.

Returns
Number of CUDA devices available, or 0 if CUDA is not available
Here is the caller graph for this function:

◆ isDeviceUsable()

bool Mila::Dnn::Compute::CudaDeviceRegistrar::isDeviceUsable ( int deviceId)
inlinestaticprivate

Checks if a specific CUDA device is usable for computation.

Ensures device meets minimal compute capability and memory requirements and that it can be selected via the CUDA runtime.

Here is the caller graph for this function:

◆ registerDevices()

void Mila::Dnn::Compute::CudaDeviceRegistrar::registerDevices ( )
inlinestatic

Register CUDA support with the DeviceRegistry.

Registers discovered CUDA devices with the global DeviceRegistry. If no devices are present, a warning is emitted and registration is skipped.

Here is the call graph for this function:
Here is the caller graph for this function:

The documentation for this class was generated from the following file: