Skip to main content
Log in

Mojo function

schedule_barrier

schedule_barrier(mask: AMDScheduleBarrierMask = AMDScheduleBarrierMask(0))

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.