Mila
Deep Neural Network Library
|
Abstract interface for compute devices (CPU, CUDA, etc.). More...
Public Member Functions | |
virtual | ~ComputeDevice ()=default |
Virtual destructor. | |
virtual constexpr DeviceType | getDeviceType () const =0 |
Gets the device type of this compute device. | |
virtual std::string | getName () const =0 |
Gets the name of this compute device. | |
Abstract interface for compute devices (CPU, CUDA, etc.).
The ComputeDevice class defines a common interface for different types of compute devices that can be used for tensor operations and neural network computations. Each device implementation (CPU, CUDA) inherits from this class and provides specific implementations of the virtual methods.
Devices are registered with the DeviceRegistry to allow runtime discovery and selection of available compute devices.
|
virtualdefault |
Virtual destructor.
Ensures proper cleanup of derived device classes.
|
constexprpure virtual |
Gets the device type of this compute device.
Implemented in Mila::Dnn::Compute::CpuDevice, and Mila::Dnn::Compute::CudaDevice.
|
pure virtual |
Gets the name of this compute device.
Implemented in Mila::Dnn::Compute::CpuDevice, and Mila::Dnn::Compute::CudaDevice.