Mojo module
grid_controls
Grid Dependent Control primitives for NVIDIA Hopper (SM90+) GPUs.
This module provides low-level primitives for managing grid dependencies on NVIDIA Hopper architecture and newer GPUs. It enables efficient orchestration of multi-grid workloads by allowing grids to launch dependent grids and synchronize with them.
The module includes functions that map directly to CUDA grid dependency control instructions, providing fine-grained control over grid execution order:
launch_dependent_grids()
: Triggers execution of grids that depend on the current gridwait_on_dependent_grids()
: Blocks until all dependent grids complete execution
These primitives are essential for implementing complex GPU execution pipelines where multiple kernels need to execute in a specific order with minimal overhead. They eliminate the need for host-side synchronization when orchestrating dependent GPU work.
Functions
-
launch_dependent_grids
: Launches dependent grids that were previously configured to depend on the current grid. -
wait_on_dependent_grids
: Waits for all dependent grids launched by this grid to complete execution.
Was this page helpful?
Thank you! We'll create more content like this.
Thank you for helping us improve!