Skip to main content

Mojo package

sm100_structured

SM100 Structured Matmul - Refactored with encapsulated pipeline management.

This module provides the same SM100 matmul functionality as the original sm100 module, but with improved code organization:

Key abstractions:

  • WorkIterator/SchedulerWorkIterator: Encapsulate work iteration and pipeline state
  • RingBuffer/OutputRingBuffer: Encapsulate producer-consumer synchronization
  • TileLoaderTMA: Encapsulate TMA tile loading logic
  • Context managers for cleaner acquire/release patterns

Switching Implementations

Set MODULAR_USE_STRUCTURED_SM100=1 to use this implementation:

# Use original sm100 (default):
./bazelw run //max/kernels/test/gpu/linalg:test_matmul_sm100_smoke.mojo.test

# Use sm100_structured:
MODULAR_USE_STRUCTURED_SM100=1 ./bazelw run //max/kernels/test/gpu/linalg:test_matmul_sm100_smoke.mojo.test

Option 2: Direct Import

# Original:
from linalg.matmul.gpu.sm100.matmul import (
    blackwell_matmul_tma_umma_warp_specialized
)

# Structured (this module):
from linalg.matmul.gpu.sm100_structured import (
    blackwell_matmul_tma_umma_warp_specialized
)

See DOCS/testing_and_switching.md for full documentation.

Modules

Was this page helpful?