IMPORTANT: To view this page as Markdown, append `.md` to the URL (e.g. /get-started.md). For the complete documentation index, see llms.txt.
Skip to main content
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 module

launch_config

NVIDIA launch configurations that carry CUDA launch attributes.

Launch attributes, such as programmatic dependent launch (PDL), are an NVIDIA performance capability, so they live here rather than on the portable GridBlockLaunchConfig and ClusterLaunchConfig. On an NVIDIA target, DeviceContext[].ExecutionConfigType is one of the two configurations below. Launching one on a target without launch attributes fails to compile.

from max.gpu.host import DeviceContext, Dim
from max.gpu.host.nvidia import ClusterAttributeLaunchConfig
from max.gpu.primitives.grid_controls import PDLLevel, pdl_launch_attributes

def kernel():
    pass

with DeviceContext() as ctx:
    ctx.enqueue_function[kernel](
        ClusterAttributeLaunchConfig(
            grid_dim=4,
            block_dim=128,
            cluster_dim=Dim(2, 1, 1),
            shared_mem_bytes=64 * 1024,
            attributes=pdl_launch_attributes(PDLLevel.ON),
        )
    )

Structs​

Traits​

Was this page helpful?