28 std::array<std::uint8_t, 16>
uuid{};
113 [[nodiscard]]
static int count();
117 [[nodiscard]]
static std::vector<Device>
enumerate();
123 [[nodiscard]]
constexpr int ordinal() const noexcept {
return ordinal_; }
Validated CUDA device identity with cached immutable capabilities.
Definition device.hpp:105
static std::vector< Device > enumerate()
Discover every visible CUDA device in ordinal order.
Definition device.cpp:111
friend constexpr bool operator==(Device const &, Device const &)=default
static Device get(int ordinal)
Validate and return one CUDA device.
Definition device.cpp:103
static int count()
Return the number of CUDA devices visible to this process.
Definition device.cpp:109
DeviceCapabilities const & capabilities() const
Return this device's cached immutable hardware capabilities.
Definition device.cpp:130
static Device current()
Return the CUDA device currently selected on the calling thread.
Definition device.cpp:123
constexpr int ordinal() const noexcept
Return this device's CUDA runtime ordinal.
Definition device.hpp:123
Definition cublas/execution.hpp:18
Immutable hardware properties cached for one CUDA device ordinal.
Definition device.hpp:23
int max_threads_per_block
Maximum threads in one thread block.
Definition device.hpp:46
int pci_device
PCI device identifier.
Definition device.hpp:67
int max_threads_per_multiprocessor
Maximum resident threads per streaming multiprocessor.
Definition device.hpp:49
int async_engine_count
Number of asynchronous copy engines.
Definition device.hpp:58
bool pageable_memory_access
Whether the device can directly access pageable host memory.
Definition device.hpp:85
bool cooperative_launch
Whether cooperative kernel launch is supported.
Definition device.hpp:94
std::string name
CUDA runtime device name.
Definition device.hpp:25
int warp_size
Hardware warp size in threads.
Definition device.hpp:43
std::size_t shared_memory_per_multiprocessor
Maximum shared memory per streaming multiprocessor in bytes.
Definition device.hpp:55
std::size_t shared_memory_per_block
Maximum shared memory per thread block in bytes.
Definition device.hpp:52
bool ecc_enabled
Whether ECC is enabled on the device.
Definition device.hpp:97
bool memory_pools_supported
Whether stream-ordered CUDA memory pools are supported.
Definition device.hpp:88
bool concurrent_kernels
Whether the device supports concurrent kernel execution.
Definition device.hpp:70
bool can_map_host_memory
Whether the device can map page-locked host memory.
Definition device.hpp:76
std::array< std::uint8_t, 16 > uuid
Stable 16-byte CUDA device UUID.
Definition device.hpp:28
bool stream_priorities_supported
Whether CUDA stream priorities are supported.
Definition device.hpp:91
int compute_capability_minor
CUDA compute-capability minor version.
Definition device.hpp:37
int multiprocessor_count
Number of streaming multiprocessors.
Definition device.hpp:40
bool concurrent_managed_access
Whether CPU and device may concurrently access managed memory.
Definition device.hpp:82
bool managed_memory
Whether the device supports managed-memory allocation.
Definition device.hpp:79
std::size_t total_global_memory
Total device global memory in bytes.
Definition device.hpp:31
int compute_capability_major
CUDA compute-capability major version.
Definition device.hpp:34
int pci_bus
PCI bus identifier.
Definition device.hpp:64
bool unified_addressing
Whether the device uses unified virtual addressing.
Definition device.hpp:73
int pci_domain
PCI domain identifier.
Definition device.hpp:61