pub struct GpuDevice {
pub id: u32,
pub name: String,
pub memory_total: u64,
pub memory_available: u64,
pub compute_capability: (u32, u32),
pub multiprocessor_count: u32,
pub clock_rate_mhz: u32,
pub memory_bandwidth_bytes_per_sec: u64,
}Expand description
GPU device information.
Every field here is either taken verbatim from oxicuda-driver’s device
query (name, memory_total/memory_available, compute_capability,
multiprocessor_count, clock_rate_mhz) or is a textbook theoretical-peak
formula computed from real queried values (memory_bandwidth_bytes_per_sec,
documented on the field). Nothing here is fabricated: on a host with no
CUDA driver/device, GpuUtils::init_devices simply produces an empty
device list rather than inventing one.
Fields§
§id: u32§name: String§memory_total: u64§memory_available: u64§compute_capability: (u32, u32)§multiprocessor_count: u32Number of streaming multiprocessors (SMs), as reported by the driver. This is not the marketing “CUDA core count” (which depends on an architecture-specific cores-per-SM multiplier the driver API does not expose) – it is the real, directly-queried SM count.
clock_rate_mhz: u32Core clock rate in MHz, as reported by the driver.
memory_bandwidth_bytes_per_sec: u64Theoretical peak memory bandwidth in bytes/sec, computed from the
real queried memory clock and bus width as
2 * memory_clock_hz * (bus_width_bits / 8) (the standard
double-data-rate deviceQuery-style formula). This is a derived
estimate from real hardware specs, not a measured/benchmarked figure
and not a fabricated number.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for GpuDevice
impl RefUnwindSafe for GpuDevice
impl Send for GpuDevice
impl Sync for GpuDevice
impl Unpin for GpuDevice
impl UnsafeUnpin for GpuDevice
impl UnwindSafe for GpuDevice
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more