pub struct DeviceParams {
pub cc: &'static str,
pub sm_count: u32,
pub max_threads_per_sm: u32,
pub max_warps_per_sm: u32,
pub max_blocks_per_sm: u32,
pub smem_per_block_default: u64,
pub smem_per_sm: u64,
}Expand description
Per-SM limits by compute capability.
Every field but sm_count is a compute-capability fact, taken from
the CUDA C++ Programming Guide’s “Technical Specifications per Compute
Capability” table. sm_count is a product fact — two parts at the
same capability differ — so each entry names the part its count came from.
An unknown cc is an error, never a guess: a fabricated capacity would produce an occupancy number, and an occupancy number is exactly the sort of thing a reader believes.
Fields§
§cc: &'static strThe capability this row describes, as "<major>.<minor>" — the
string --cc is matched against.
sm_count: u32Streaming multiprocessors on the named part. Not a capability fact.
Ranking within one kernel’s space is barely sensitive to it: it enters
only through waves = grid / (blocks_per_sm * sm_count), a constant
divisor that scales every candidate’s cost alike, and it changes an
ordering only where the .max(1.0) clamp on waves bites. It matters
for reading waves as a number, not for choosing between candidates.
max_threads_per_sm: u32Resident threads per SM. With max_warps_per_sm this is the same
fact twice — a warp is 32 threads — and a test holds them equal.
max_warps_per_sm: u32Resident warps per SM; the occupancy denominator.
max_blocks_per_sm: u32Resident thread blocks per SM. Binds before the thread limit for small blocks, which is why a 32-thread block rarely fills an SM.
smem_per_block_default: u64Statically allocatable shared memory per block, without the dynamic opt-in. 48 KiB on every architecture here — deliberately flat.
smem_per_sm: u64Shared memory per SM. Note this is the per-SM capacity, one KiB above the per-block opt-in maximum on Ampere and later, where the driver reserves 1 KiB.
Trait Implementations§
Source§impl Clone for DeviceParams
impl Clone for DeviceParams
Source§fn clone(&self) -> DeviceParams
fn clone(&self) -> DeviceParams
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more