Skip to main content

CudaDeviceProp

Struct CudaDeviceProp 

Source
pub struct CudaDeviceProp {
Show 37 fields pub name: String, pub total_global_mem: usize, pub shared_mem_per_block: usize, pub regs_per_block: u32, pub warp_size: u32, pub mem_pitch: usize, pub max_threads_per_block: u32, pub max_threads_dim: [u32; 3], pub max_grid_size: [u32; 3], pub clock_rate: u32, pub total_const_mem: usize, pub major: u32, pub minor: u32, pub texture_alignment: usize, pub texture_pitch_alignment: usize, pub device_overlap: bool, pub multi_processor_count: u32, pub ecc_enabled: bool, pub integrated: bool, pub can_map_host_memory: bool, pub unified_addressing: bool, pub memory_clock_rate: u32, pub memory_bus_width: u32, pub l2_cache_size: u32, pub max_threads_per_multi_processor: u32, pub stream_priorities_supported: bool, pub shared_mem_per_multiprocessor: usize, pub regs_per_multiprocessor: u32, pub managed_memory: bool, pub is_multi_gpu_board: bool, pub multi_gpu_board_group_id: u32, pub host_native_atomic_supported: bool, pub cooperative_launch: bool, pub cooperative_multi_device_launch: bool, pub max_blocks_per_multi_processor: u32, pub shared_mem_per_block_optin: usize, pub cluster_launch: bool,
}
Expand description

Subset of cudaDeviceProp exposed by the Runtime API.

Field names intentionally match the CUDA Runtime documentation so that code written against cudaGetDeviceProperties compiles with minimal changes.

Fields§

§name: String

ASCII name of the device, e.g. "NVIDIA GeForce RTX 4090".

§total_global_mem: usize

Total amount of global memory in bytes.

§shared_mem_per_block: usize

Shared memory per block in bytes.

§regs_per_block: u32

32-bit registers per block.

§warp_size: u32

Warp size (threads per warp).

§mem_pitch: usize

Maximum pitch in bytes for cudaMallocPitch.

§max_threads_per_block: u32

Maximum number of threads per block.

§max_threads_dim: [u32; 3]

Maximum size of each dimension of a block [x, y, z].

§max_grid_size: [u32; 3]

Maximum size of each dimension of a grid [x, y, z].

§clock_rate: u32

Clock frequency in kilohertz.

§total_const_mem: usize

Total constant memory available on device in bytes.

§major: u32

Major revision number of device’s compute capability.

§minor: u32

Minor revision number of device’s compute capability.

§texture_alignment: usize

Alignment requirement for textures (in bytes).

§texture_pitch_alignment: usize

Pitch alignment requirement for texture references (in bytes).

§device_overlap: bool

true if device can concurrently copy and execute a kernel.

§multi_processor_count: u32

Number of multiprocessors on device.

§ecc_enabled: bool

true if device has ECC support enabled.

§integrated: bool

true if device is an integrated (on-chip) GPU.

§can_map_host_memory: bool

true if device can map host memory.

§unified_addressing: bool

true if device supports unified virtual addressing.

§memory_clock_rate: u32

Peak memory clock frequency in kilohertz.

§memory_bus_width: u32

Global memory bus width in bits.

§l2_cache_size: u32

Size of the L2 cache in bytes (0 if not applicable).

§max_threads_per_multi_processor: u32

Maximum number of resident threads per multiprocessor.

§stream_priorities_supported: bool

Device supports stream priorities.

§shared_mem_per_multiprocessor: usize

Shared memory per multiprocessor in bytes.

§regs_per_multiprocessor: u32

32-bit registers per multiprocessor.

§managed_memory: bool

Device supports allocating managed memory.

§is_multi_gpu_board: bool

Device is on a multi-GPU board.

§multi_gpu_board_group_id: u32

Unique identifier for a group of devices on the same multi-GPU board.

§host_native_atomic_supported: bool

Link between the device and the host supports native atomic operations.

§cooperative_launch: bool

true if the device supports Cooperative Launch.

§cooperative_multi_device_launch: bool

true if the device supports Multi-Device Cooperative Launch.

§max_blocks_per_multi_processor: u32

Maximum number of blocks per multiprocessor.

§shared_mem_per_block_optin: usize

Per-device maximum shared memory per block usable without opt-in.

§cluster_launch: bool

true if device supports cluster launch.

Implementations§

Source§

impl CudaDeviceProp

Source

pub fn from_device(ordinal: c_int) -> CudaRtResult<Self>

Construct a CudaDeviceProp by querying device attributes via the CUDA Driver API.

§Errors

Returns an error if the driver is not loaded or any attribute query fails.

Trait Implementations§

Source§

impl Clone for CudaDeviceProp

Source§

fn clone(&self) -> CudaDeviceProp

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 CudaDeviceProp

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, 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