For the complete documentation index, see llms.txt. Markdown versions of all pages are available by appending .md to any URL (e.g. /max/get-started.md).
Mojo function
build_default_matmul_schedule
def build_default_matmul_schedule[num_k_tiles: Int, num_m_mmas: Int, num_n_mmas: Int, num_k_mmas: Int, MMA_M: Int, MMA_N: Int, a_loads_per_thread: Int, b_loads_per_thread: Int]() -> ScheduleCompiler
Build the complete software pipeline schedule for the default matmul.
Uses ScheduleCompiler with SingleBufferSchedule trait implementation. All phases derived from the logical body; no magic numbers in derivation.
Returns a ScheduleCompiler with all phases as Lists. Use as a comptime value; the kernel reads entries via comptime for.
Parameters:
- βnum_k_tiles (
Int): Number of K-tiles along the contraction dimension, each producing one fragment load and one MMA compute op. - βnum_m_mmas (
Int): Number of MMA tiles along the M dimension of the output tile. - βnum_n_mmas (
Int): Number of MMA tiles along the N dimension of the output tile. - βnum_k_mmas (
Int): Number of MMA tiles along the K dimension per COMPUTE body op. - βMMA_M (
Int): M dimension of a single MMA instruction (for example 16 or 32). - βMMA_N (
Int): N dimension of a single MMA instruction (for example 16 or 32). - βa_loads_per_thread (
Int): Number of DS_WRITE ops per STORE_SMEM for the A operand tile. - βb_loads_per_thread (
Int): Number of DS_WRITE ops per STORE_SMEM for the B operand tile.
Returns:
ScheduleCompiler
Was this page helpful?
Thank you! We'll create more content like this.
Thank you for helping us improve!