[BUG][CuTe DSL] PipelineTmaUmma arrival masks include an out-of-cluster "v-peer" bit when the cluster's v-extent is 1, causing CGA out-of-range faults (Xid 13)
Maintainers usually reply within 4 days
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 40/100
Research direction
The bug is in python/CuTeDSL/cutlass/pipeline/sm100.py, specifically the _compute_mcast_arrival_mask function. Start by understanding the cluster layout and how masks are computed for TMA multicast. The fix involves adding a condition to only include peer masks when the v-extent is 2, similar to PipelineAsyncUmma.create. Test with a kernel using cta_layout_vmnk=(1, 4, 1, 1) to ensure no CGA faults occur.
Written by the indexing model from the issue text.
Description
Environment
- nvidia-cutlass-dsl 4.6.2 (the code is unchanged at current
main) - CUDA 13.0, Blackwell (sm_103a)
Summary
PipelineTmaUmma._compute_mcast_arrival_mask
(python/CuTeDSL/cutlass/pipeline/sm100.py, L101-L157)
unconditionally ORs in "peer" image masks computed at the coordinate
block_in_cluster_coord_vmnk_peer = (
cta_in_cluster_coord_vmnk[0] ^ 1,
*cta_in_cluster_coord_vmnk[1:],
)
The v-peer only exists for tcgen05.CtaGroup.TWO (v-extent 2). For a plain
non-paired cluster, e.g. cta_layout_vmnk = (1, C, 1, 1) — the natural
configuration for a TMA load multicast shared by C CTAs that each run their
own MMA — the peer coordinate (1, b, 0, 0) lies outside the layout's
domain (mode 0 has extent 1). With the compact strides (1, 1, C, C) it
evaluates to rank b + 1, so the mode-1 peer image is bits {1..C}. The
resulting producer/consumer mask is {0..C}: it contains bit C, a CTA
rank that does not exist in the cluster.
PipelineTmaUmma.create computes these masks whenever
cute.size(cta_layout_vmnk) > 1
(L290-L300)
with no check on the v-extent, and consumer_mask = producer_mask. The same
helper is used by PipelineTmaMultiConsumersAsync.create
(L1244),
which is exposed the same way.
By contrast, PipelineAsyncUmma.create implements the intended pattern: it
only computes peer masks when the pipeline actually uses 2-CTA UMMA
("No mcast mask if we're not using 2CTA tcgen05 MMA").
Observed behavior
A kernel with a TMA-load producer (data multicast along mode 1, mask built
with cpasync.create_tma_multicast_mask(..., mcast_mode=1)) and tcgen05
UMMA consumers, on a 4-CTA cluster created as
PipelineTmaUmma.create(..., cta_layout_vmnk=(1, 4, 1, 1)):
- The kernel faults at cluster scope once consumers start releasing buffers.
dmesgshows Xid 13, "SM Cga Exception: OOR Addr" — an SM-side
cluster (mapa/remote-mbarrier) out-of-range access, matching an
mbarrier.arriveaimed at rank 4 of a 4-CTA cluster. - An ablation that arrives with a self-only mask instead converts the crash
into a hang (remote arrivals missing), confirming the mask — not the TMA
transaction accounting — is at fault.
Workaround
Overriding both masks right after create() with the plain mode-1 image
mask fixes the fault; results are then bit-exact against the equivalent
non-clustered kernel:
coord = cta_layout_vmnk.get_flat_coord(cta_rank_in_cluster)
mask = cpasync.create_tma_multicast_mask(cta_layout_vmnk, coord, mcast_mode=1)
object.__setattr__(pipeline, "consumer_mask", mask) # frozen dataclass
object.__setattr__(pipeline, "producer_mask", mask)
Suggested fix
Include the *_peer terms only when the v-extent is 2, e.g.:
if cute.size(cta_layout_vmnk, mode=[0], loc=loc, ip=ip) == 2:
mask |= peer_terms
mirroring the guard that PipelineAsyncUmma.create already applies.
- Dominant language
- C++
- Stars
- 10.7k
- Forks
- 2.2k
- Avg merge
- 3d 20h
- Merged PRs (30d)
- 4
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from NVIDIA/cutlass
-
[Bug][CuTeDSL][Fuzz] `utils.gemm.sm100.epilogue` releases the accumulator before `tcgen05.ld` completes: no `tcgen05.wait::ld` before the arrive that lets the next MMA overwrite TMEMPossibly taken @0z5a claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 4 days
-
? - Needs Triage question
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
NVIDIA/cutlass#3796 · 1 comment · 1 reaction ·
Maintainers usually reply within 4 days
-
[DOC] IKET quick start omits the GEMM GPU requirement and references a missing examplePossibly taken @0z5a claimed this 11 days ago. Open
Difficulty 1/5 Under an hour Newbie friendliness 82/100
NVIDIA/cutlass#3761 · 1 comment ·
Maintainers usually reply within 4 days
-
[BUG] CuTe DSL from_dlpack rejects float8_e4m3fn tensors (dtype_map lists Float8E5M2 only)Possibly taken @Ammar-Alnagar claimed this 20 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
NVIDIA/cutlass#3716 · 1 comment ·
Maintainers usually reply within 4 days
-
EllGemm ColumnMajor-output workspace sizing uses the unswapped problem shape and undersizes split-K semaphoresPossibly taken @XFDG claimed this 49 days ago. OpenCUTLASS C++
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
NVIDIA/cutlass#3539 · 2 comments ·
Maintainers usually reply within 4 days
Similar issues
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
jellyfin/jellyfin-desktop#1290 ·
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
nasa/fprime#6301 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 66/100
godotengine/godot#125035 ·
Maintainers usually reply within 1 day
-
agent:WSL bug LOW security
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
mgradwohl/tasksmack#3290 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
mw00/project-maya#743 ·
Maintainers usually reply within 1 day