For the complete documentation index, see llms.txt. Markdown versions of all pages are available by appending .md to any URL (e.g. /get-started.md).
Mojo struct
ClusterLaunchConfig
struct ClusterLaunchConfig
A launch configuration that groups thread blocks into clusters.
Launching with this configuration fails to compile on a target without cluster launch.
Fields
- grid_dim (
Dim): The grid dimensions. - block_dim (
Dim): The block dimensions. - cluster_dim (
Dim): The cluster dimensions. - shared_mem_bytes (
Int): The dynamic shared memory per thread block, in bytes.
Implemented traits
AnyType,
BlockExecutionConfig,
ClusterExecutionConfig,
Copyable,
Deinitable,
ExecutionConfig,
GridBlockExecutionConfig,
ImplicitlyCopyable,
Movable,
NearComputeGeneralPurposeScratchpadExecutionConfig,
RegisterPassable,
TrivialRegisterPassable
Methods
__init__
def __init__(*, grid_dim: Dim, block_dim: Dim, cluster_dim: Dim, shared_mem_bytes: Int = Int(0)) -> Self
Creates a cluster launch configuration.
Args:
- grid_dim (
Dim): The grid dimensions. - block_dim (
Dim): The block dimensions. - cluster_dim (
Dim): The cluster dimensions. - shared_mem_bytes (
Int): The dynamic shared memory per thread block, in bytes.
get_grid_dim
def get_grid_dim(self) -> Dim
Returns the grid dimensions.
Returns:
Dim: The grid dimensions.
get_block_dim
def get_block_dim(self) -> Dim
Returns the block dimensions.
Returns:
Dim: The block dimensions.
get_cluster_dim
def get_cluster_dim(self) -> Dim
Returns the cluster dimensions.
Returns:
Dim: The cluster dimensions.
get_near_compute_scratchpad_usage
def get_near_compute_scratchpad_usage(self) -> Int
Returns the dynamic shared memory per thread block.
Returns:
Int: The dynamic shared memory per thread block, in bytes.