Expand description
CUDA device enumeration and attribute queries.
This module provides the Device type, which wraps a CUdevice handle
obtained from the CUDA driver. Devices are identified by ordinal (0, 1, 2,
…) and expose a rich set of convenience methods for querying hardware
capabilities such as compute capability, memory size, multiprocessor count,
and various limits.
§Examples
use oxicuda_driver::device::{Device, list_devices};
oxicuda_driver::init()?;
for dev in list_devices()? {
println!("{}: compute {}.{}",
dev.name()?,
dev.compute_capability()?.0,
dev.compute_capability()?.1,
);
}Structs§
- Device
- Represents a CUDA-capable GPU device.
- Device
Info - Comprehensive device information gathered in a single call.
Functions§
- best_
device - Find the device with the most total memory.
- can_
access_ peer - Query whether peer access is possible between two devices.
- driver_
version - Query the CUDA driver version.
- list_
devices - List all available CUDA devices.