pub struct LaunchSpec {
pub grid_dim: (u32, u32, u32),
pub block_dim: (u32, u32, u32),
pub cluster_dim: ClusterDim,
pub shared_bytes: u32,
pub allow_non_portable_cluster: bool,
}Expand description
Full launch specification for a cluster-aware kernel.
Mirrors cudaLaunchKernelExC’s cudaLaunchConfig_t:
(gridDim, blockDim, sharedBytes, stream) with the cluster
dimension threaded through the attributes array.
Fields§
§grid_dim: (u32, u32, u32)§block_dim: (u32, u32, u32)§cluster_dim: ClusterDim§allow_non_portable_cluster: boolOpt-in to clusters > 8 blocks (Blackwell only).
Implementations§
Source§impl LaunchSpec
impl LaunchSpec
Sourcepub fn new(grid_dim: (u32, u32, u32), block_dim: (u32, u32, u32)) -> Self
pub fn new(grid_dim: (u32, u32, u32), block_dim: (u32, u32, u32)) -> Self
Construct a spec with no cluster (1×1×1) — equivalent to the classic 3-tuple launch surface.
Sourcepub fn with_cluster(self, cluster: ClusterDim) -> Result<Self, ClusterError>
pub fn with_cluster(self, cluster: ClusterDim) -> Result<Self, ClusterError>
Builder: set the cluster dimension. Validates against the 8-block portable cap on construction.
Sourcepub fn allow_non_portable(self) -> Self
pub fn allow_non_portable(self) -> Self
Builder: opt into non-portable cluster sizes (>8 blocks). Caller must re-validate the cluster afterwards.
Builder: set dynamic shared-memory bytes.
Sourcepub fn has_cluster(&self) -> bool
pub fn has_cluster(&self) -> bool
True if this spec has a non-trivial cluster dim (anything other than 1×1×1).
Trait Implementations§
Source§impl Clone for LaunchSpec
impl Clone for LaunchSpec
Source§fn clone(&self) -> LaunchSpec
fn clone(&self) -> LaunchSpec
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for LaunchSpec
impl RefUnwindSafe for LaunchSpec
impl Send for LaunchSpec
impl Sync for LaunchSpec
impl Unpin for LaunchSpec
impl UnsafeUnpin for LaunchSpec
impl UnwindSafe for LaunchSpec
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
Mutably borrows from an owned value. Read more