Skip to main content

DeviceInfo

Struct DeviceInfo 

Source
pub struct DeviceInfo {
Show 29 fields pub name: String, pub ordinal: i32, pub compute_capability: (i32, i32), pub total_memory_bytes: usize, pub multiprocessor_count: i32, pub max_threads_per_block: i32, pub max_threads_per_sm: i32, pub warp_size: i32, pub clock_rate_mhz: f64, pub memory_clock_rate_mhz: f64, pub memory_bus_width_bits: i32, pub l2_cache_bytes: i32, pub max_shared_memory_per_block: i32, pub max_shared_memory_per_sm: i32, pub max_registers_per_block: i32, pub ecc_enabled: bool, pub tcc_driver: bool, pub compute_mode: i32, pub supports_cooperative_launch: bool, pub supports_managed_memory: bool, pub max_persisting_l2_cache_bytes: i32, pub async_engine_count: i32, pub supports_memory_pools: bool, pub supports_gpu_direct_rdma: bool, pub supports_cluster_launch: bool, pub supports_concurrent_kernels: bool, pub supports_unified_addressing: bool, pub max_blocks_per_sm: i32, pub single_to_double_perf_ratio: i32,
}
Expand description

Comprehensive device information gathered in a single call.

All fields are populated via convenience methods on Device. Fields that fail to query (e.g. on an older driver) default to 0 / false.

Fields§

§name: String

Human-readable device name.

§ordinal: i32

Zero-based device ordinal.

§compute_capability: (i32, i32)

Compute capability (major, minor).

§total_memory_bytes: usize

Total device memory in bytes.

§multiprocessor_count: i32

Number of streaming multiprocessors.

§max_threads_per_block: i32

Maximum threads per block.

§max_threads_per_sm: i32

Maximum threads per streaming multiprocessor.

§warp_size: i32

Warp size in threads.

§clock_rate_mhz: f64

Core clock rate in MHz.

§memory_clock_rate_mhz: f64

Memory clock rate in MHz.

§memory_bus_width_bits: i32

Memory bus width in bits.

§l2_cache_bytes: i32

L2 cache size in bytes.

§max_shared_memory_per_block: i32

Maximum shared memory per block in bytes.

§max_shared_memory_per_sm: i32

Maximum shared memory per SM in bytes.

§max_registers_per_block: i32

Maximum 32-bit registers per block.

§ecc_enabled: bool

ECC memory enabled.

§tcc_driver: bool

TCC driver mode.

§compute_mode: i32

Compute mode (0=default, 1=exclusive-thread, 2=prohibited, 3=exclusive-process).

§supports_cooperative_launch: bool

Cooperative kernel launch support.

§supports_managed_memory: bool

Managed (unified) memory support.

§max_persisting_l2_cache_bytes: i32

Maximum persisting L2 cache size in bytes (Ampere+).

§async_engine_count: i32

Number of async copy engines.

§supports_memory_pools: bool

Supports memory pools (cudaMallocAsync).

§supports_gpu_direct_rdma: bool

Supports GPU Direct RDMA.

§supports_cluster_launch: bool

Supports cluster launch (Hopper+).

§supports_concurrent_kernels: bool

Concurrent kernel execution supported.

§supports_unified_addressing: bool

Unified addressing supported.

§max_blocks_per_sm: i32

Maximum blocks per SM.

§single_to_double_perf_ratio: i32

Single-to-double precision performance ratio.

Trait Implementations§

Source§

impl Clone for DeviceInfo

Source§

fn clone(&self) -> DeviceInfo

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for DeviceInfo

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Display for DeviceInfo

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more