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 function

schedule_barrier

def schedule_barrier(mask: AMDScheduleBarrierMask = AMDScheduleBarrierMask.NONE)

Controls instruction scheduling across a barrier point in AMD GPU code.

This function creates a scheduling barrier that controls which types of instructions can be reordered across it by the compiler. The mask parameter specifies which instruction categories (ALU, memory, etc) are allowed to cross the barrier during scheduling optimization.

Note: This function only has an effect on AMD GPUs. On other platforms it will raise a compile time error.

Args:

  • ​mask (AMDScheduleBarrierMask): A bit mask of AMDScheduleBarrierMask flags indicating which instruction types can be scheduled across this barrier. Default is NONE, meaning no instructions can cross.

Was this page helpful?