FBTriton View on GitHub ↗

TLX documentation

TLX on sm90 (Hopper)

Supported ops and extension builtins on NVIDIA Hopper.

H100-class GPUs: TMA descriptors, wgmma async MMA, thread-block clusters with distributed shared memory, warp specialization with async_task regions, and mbarrier pipelines. No TMEM, no tcgen05, no CLC — see TLX on sm100 for the Blackwell superset. Tags follow tlx.md.

Supported tlx.ops

OpVariantImplDtypesRequiresBackwardWhat it does
mmws_cooperativemm/sm90.py:mmfloat16tmanoCooperative-persistent GEMM: TMA producer warp-group feeds wgmma consumers through mbarriers. Full 8-config space beats the heuristic on tall shapes.
addmmtma_wsaddmm/sm90.py:addmmfloat16—noPersistent WS, non-persistent one-CTA-per-tile, and direct-load GEMM+bias family; named barriers sync consumer warp-groups.
mm_torchtlxinductor_hopper_gemm_wsinductor/sm100_torch:mmfloat16tmanoInductor template entry for the Hopper WS GEMM.
flash_attnws_pipelined_pingpongflash_attn/sm90.py:flash_attnfloat16tmayesFA3-style attention: persistent WS with K-ahead TMA prefetch ping-pong plus a non-persistent variant; FA2 math on TMA+wgmma backward.

Supported extension builtins (tlx.*)

The sm100 set minus the Blackwell-only items (TMEM, tcgen05, CLC, TMA gather/scatter, stoch_round, warp_redux, packed PTX).

Scalars, types, diagnostics

BuiltinPurpose
assume_uniformScalar uniformity assert (no-op on NV)
zerosZero tensor, optional explicit register layout
dtype_of / size_ofElement type / byte size (host-side)
get_fp8_format_namee5m2/e4m3 for scaled-MMA format args
clock6464-bit hardware timer read
assert_same_layout / dump_layoutLayout assert / compile-time layout log

Local memory

BuiltinPurpose
local_allocAllocate num SMEM buffers
local_view / local_sliceBuffer subviews
local_store / local_loadRegisters to/from SMEM buffer
local_gather / local_scatterIndexed gather/scatter along an axis
storage_alias_specSized/unsized shared-buffer alias spec
buffered_tensor / buffered_tensor_typeMemory-backed buffer value and its type

Async copy and descriptors (TMA)

BuiltinPurpose
async_load / async_load_commit_group / async_load_wait_groupcp.async global-to-SMEM pipeline
async_storeAsync SMEM-to-global bulk copy
async_descriptor_loadTMA global-to-SMEM load tracked by barrier
async_descriptor_store / async_descriptor_store_waitTMA store + wait
async_descriptor_prefetch_tensor / prefetchL2 prefetch hints
allocate_tensor_descriptor128B-aligned descriptor scratch
make_tensor_descriptor / reinterpret_tensor_descriptorCreate / reinterpret TMA descriptors
tensor_descriptor_ptr / tensor_descriptor_ptr_typeDescriptor pointer values and types

Layout control

BuiltinPurpose
local_trans / local_reshape / local_reinterpretMetadata-only descriptor transforms
require_layout / release_layoutPin / release register layouts
dot_scaledScaled dot with optional tile schedule
nv_mma_layoutHopper WGMMA accumulator/register layout
nv_mma_shared_layout_encodingHopper MMA SMEM operand encoding
slice_layout / layoutRank-reduced view / user Shape:Stride layout
layout_encoding / shared_layout_encodingBase layout classes
swizzled_shared_layout_encoding / swizzled_layoutSwizzled SMEM layouts
padded_shared_layout_encodingPadded SMEM layout
shared_linear_layout_encodingExplicit linear SMEM mapping
DummyRegisterLayoutEncodingPlaceholder layout resolved post-inline
storage_kindBuffer storage selector enum
reuse_group / reuse_group_type / reuse_group_ir_typeBuffer overlap trees
storage_alias_spec_type / storage_alias_spec_type_classAlias-spec MLIR types

Async compute

BuiltinPurpose
async_dotWarp-group async MMA (wgmma; register-A allowed)
async_dot_waitWait for prior async dots

Synchronization

BuiltinPurpose
alloc_barriers / alloc_warp_barrierSMEM / warp / cluster barriers
barrier_expect_bytes / barrier_wait / barrier_arriveExpect-tx, wait, arrive (multicast capable)
remote_viewMap barrier into another cluster CTA
remote_shmem_store / async_remote_shmem_store / async_remote_shmem_copyCross-CTA SMEM access
named_barrier_wait / named_barrier_arriveHardware named barriers (ids 3-15)
cluster_barrier / fence_mbarrier_init_clusterCluster sync / init fence
fence / fence_async_sharedMemory and proxy fences
mbarrier / mbarrier_type / async_tokenBarrier values, types, completion tokens

Warp specialization, votes, clusters

BuiltinPurpose
async_task / async_tasksWarp-specialized task regions and grouping
async_task_replica_idReplica id inside an async region
warp_all / warp_anyLane votes
vote_ballot_syncWarp ballot bitmask
cluster_cta_rank / cluster_size_1dCTA rank / cluster size
thread_id / num_warpsThread id / kernel warp count

Notes

TMA descriptors need 16-byte-aligned row strides; the mm catalog

entry enforces this via accepts and declines the rest.

WGMMA accumulator layouts are Hopper-specific (nv_mma_layout

asserts version 3.0).