|
Mila 0.13.48
Deep Neural Network Library
|
Class representing a CPU compute device. More...


Public Member Functions | |
| CpuDevice (DeviceConstructionKey key) | |
| Construct CPU device. | |
| constexpr DeviceId | getDeviceId () const override |
| Gets the device identifier. | |
| std::string | getDeviceName () const override |
| Gets the device name. | |
| constexpr DeviceType | getDeviceType () const override |
| Gets the device type. | |
| Public Member Functions inherited from Mila::Dnn::Compute::Device | |
| virtual | ~Device ()=default |
Additional Inherited Members | |
| Static Public Member Functions inherited from Mila::Dnn::Compute::Device | |
| static constexpr DeviceId | Cpu () noexcept |
| Create CPU device identifier. | |
| static constexpr DeviceId | Cuda (int index) noexcept |
| Create CUDA device identifier. | |
| template<DeviceType TDeviceType> | |
| static constexpr DeviceId | getDeviceId (int index) noexcept |
| static constexpr DeviceId | Metal (int index) noexcept |
| Create Metal device identifier. | |
| static constexpr DeviceId | Rocm (int index) noexcept |
| Create ROCm device identifier. | |
Class representing a CPU compute device.
Provides an interface to interact with CPU compute resources. CPU is treated as a single logical device without numeric indexing (always index 0).
Device instances are created exclusively by DeviceRegistry. Users should obtain devices through DeviceRegistry::getDevice().
|
inlineexplicit |
Construct CPU device.
| key | Construction key ensuring only DeviceRegistry can create instances |
|
inlineconstexproverridevirtual |
Gets the device identifier.
For CPU, this always returns Device::Cpu() (type=Cpu, index=0).
Implements Mila::Dnn::Compute::Device.

|
inlineoverridevirtual |
Gets the device name.
Implements Mila::Dnn::Compute::Device.
|
inlineconstexproverridevirtual |
Gets the device type.
Implements Mila::Dnn::Compute::Device.