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 function
wait_on_dependent_grids
def wait_on_dependent_grids()
Waits for the prerequisite grids of this grid to complete.
This function blocks the calling grid until every grid it was launched
behind with programmatic dependent launch (the prerequisite grids) has
completed and its memory operations are performed and visible to this grid.
It does not wait on, or make visible the output of, a grid this grid
launches with launch_dependent_grids.
Note:
- Only supported on NVIDIA SM90+ (Hopper architecture and newer) GPUs.
- Must be called by all threads in a thread block to avoid undefined behavior.
- Reads of data a prerequisite grid produces belong below the wait,
including loads through immutable origins (
ld.global.nc). Only the loads on a path through this call stay below it. A warp that skips the wait and relies on a CTA barrier after another warp's wait is not protected:ptxascan move itsld.global.ncloads above that barrier, so such a warp must read the data through a mutable origin. - LLVM can merge an immutable-origin load below the wait with a load of the same address above it, leaving only the load above. Do not read data a prerequisite grid produces through an immutable origin before the wait, even when it is read again after it.