pub struct LaunchGeometryLimits {
pub backend: &'static str,
pub max_threads_per_block: u32,
pub max_block_dim: [u32; 3],
pub max_grid_dim: [u32; 3],
pub max_threads_per_sm: u32,
}Expand description
Launch-geometry limits reported by a concrete driver.
Fields§
§backend: &'static strBackend name used in diagnostics.
max_threads_per_block: u32Maximum invocations in one workgroup or block.
max_block_dim: [u32; 3]Maximum workgroup or block dimensions (x, y, z).
max_grid_dim: [u32; 3]Maximum workgroup count per grid dimension.
max_threads_per_sm: u32Maximum threads the device keeps resident on one compute unit (a CUDA
streaming multiprocessor, a Metal threadgroup-hosting core, and so on),
or 0 when the backend does not probe this number.
This is the budget that decides how many whole workgroups fit on one
unit, and the division is integral: a workgroup width that does not
divide it strands the remainder on every unit for the launch’s whole
lifetime. Backends that leave this 0 opt out of every residency-aware
decision rather than receiving one derived from a guessed budget.
Implementations§
Source§impl LaunchGeometryLimits
impl LaunchGeometryLimits
Sourcepub fn blocks_per_compute_unit(&self, workgroup_threads: u32) -> Option<u32>
pub fn blocks_per_compute_unit(&self, workgroup_threads: u32) -> Option<u32>
Whole workgroups of workgroup_threads that stay resident on one
compute unit, or None when this backend reports no per-unit budget.
Sourcepub fn resident_threads_per_compute_unit(
&self,
workgroup_threads: u32,
) -> Option<u32>
pub fn resident_threads_per_compute_unit( &self, workgroup_threads: u32, ) -> Option<u32>
Threads that stay resident on one compute unit at workgroup_threads
wide, or None when this backend reports no per-unit budget.
Trait Implementations§
Source§impl Clone for LaunchGeometryLimits
impl Clone for LaunchGeometryLimits
Source§fn clone(&self) -> LaunchGeometryLimits
fn clone(&self) -> LaunchGeometryLimits
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for LaunchGeometryLimits
Source§impl Debug for LaunchGeometryLimits
impl Debug for LaunchGeometryLimits
impl Eq for LaunchGeometryLimits
Source§impl PartialEq for LaunchGeometryLimits
impl PartialEq for LaunchGeometryLimits
impl StructuralPartialEq for LaunchGeometryLimits
Auto Trait Implementations§
impl Freeze for LaunchGeometryLimits
impl RefUnwindSafe for LaunchGeometryLimits
impl Send for LaunchGeometryLimits
impl Sync for LaunchGeometryLimits
impl Unpin for LaunchGeometryLimits
impl UnsafeUnpin for LaunchGeometryLimits
impl UnwindSafe for LaunchGeometryLimits
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.