|
Uni20
Asynchronous tensor and runtime library.
|
Validated CUDA device identity with cached immutable capabilities. More...
#include <device.hpp>
Public Member Functions | |
| DeviceCapabilities const & | capabilities () const |
| Return this device's cached immutable hardware capabilities. | |
| constexpr int | ordinal () const noexcept |
| Return this device's CUDA runtime ordinal. | |
Static Public Member Functions | |
| static int | count () |
| Return the number of CUDA devices visible to this process. | |
| static Device | current () |
| Return the CUDA device currently selected on the calling thread. | |
| static std::vector< Device > | enumerate () |
| Discover every visible CUDA device in ordinal order. | |
| static Device | get (int ordinal) |
| Validate and return one CUDA device. | |
Friends | |
| constexpr bool | operator== (Device const &, Device const &)=default |
Validated CUDA device identity with cached immutable capabilities.
A Device is a cheap value containing only a device ordinal. get() validates that ordinal and initializes its process-wide capability cache. It does not own streams, schedulers, provider handles, memory pools, or allocations.
| DeviceCapabilities const & uni20::cuda::Device::capabilities | ( | ) | const |
Return this device's cached immutable hardware capabilities.
|
static |
Return the number of CUDA devices visible to this process.
|
static |
Return the CUDA device currently selected on the calling thread.
|
static |
Discover every visible CUDA device in ordinal order.
|
static |
Validate and return one CUDA device.
| ordinal | CUDA runtime device ordinal. |
|
inlineconstexprnoexcept |
Return this device's CUDA runtime ordinal.