Mojo struct
AMDIGLPStrategy
struct AMDIGLPStrategy
Preset strategy values for the llvm.amdgcn.iglp.opt intrinsic.
LLVM AMDGPU defines these as named presets in AMDGPUIGroupLP.cpp;
the integer values are the second argument to the intrinsic. All
presets assume MFMAs are present in the region; using on a
non-MFMA region falls back gracefully but provides no constraints.
Per AMD docs, mutually exclusive with sched_group_barrier in
the same scheduling region β pick one or the other per cluster.
Implemented traitsβ
AnyType,
Copyable,
Equatable,
ImplicitlyCopyable,
ImplicitlyDestructible,
Intable,
Movable,
RegisterPassable,
TrivialRegisterPassable
comptime membersβ
MFMA_EXP_INTERLEAVEβ
comptime MFMA_EXP_INTERLEAVE = AMDIGLPStrategy(Int32(2))
MFMAExpInterleaveOpt β multi-phase attention preset (MFMA + exp2).
The preset HKMhaPrefill uses: drives the MFMA/VALU/TRANS triple interleave that flash-attention-style softmax wants.
MFMA_EXP_SIMPLE_INTERLEAVEβ
comptime MFMA_EXP_SIMPLE_INTERLEAVE = AMDIGLPStrategy(Int32(3))
MFMAExpSimpleInterleaveOpt β interleaves 1 TRANS per 1 MFMA.
MFMA_SMALL_GEMMβ
comptime MFMA_SMALL_GEMM = AMDIGLPStrategy(Int32(0))
MFMASmallGemmOpt β interleaves 2 DS reads per 1 MFMA.
MFMA_SMALL_GEMM_SINGLE_WAVEβ
comptime MFMA_SMALL_GEMM_SINGLE_WAVE = AMDIGLPStrategy(Int32(1))
MFMASmallGemmSingleWaveOpt β single-wave variant for small GEMMs.
Methodsβ
__eq__β
__ne__β
__int__β
Was this page helpful?
Thank you! We'll create more content like this.
Thank you for helping us improve!