Mila
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.

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

◆ 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.


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