Repository navigation
refactor(05-09): unify MMA tile to (2,4,1)x(1,1,2) and tighten copy ops - #18
Merged
Merged
Conversation
* 07/08/09 examples now use the same MMA atom layout (2,4,1) and val expand (1,1,2) as 05/06, giving a uniform 32x32x32 MMA tile with 256 threads per block. * C++: downgrade C-side LDSM/STSM from x4 to x2 (SM75_U32x2_LDSM_N / SM90_U32x2_STSM_N). The C/O fragment has no K val-expand, so each thread owns only 2 32-bit packets and the x4 variant fails its static_assert; A/B keep x4 (VAL_EXPAND_K=2 gives them enough vals). * cutedsl: arch-gated R2S — SM90 with a 16-bit output uses StMatrix8x8x16bOp(False, 2), else CopyUniversalOp, mirroring the C++ SM90 STSM branch. Predicate wrapped in cutlass.const_expr so the trace picks one branch statically. * 07/08/09 cutedsl: add swizzled sC layout (Swizzle<3,3,3> o (8 x min(64, N))) to mirror C++ SmemLayoutC. 07 also pulls partition_S/D into named tensors before cute.copy to match the C++ style. * 06 cutedsl: refactor G2S TV layouts from hardcoded (32,8)/(1,8) and (1,4) to the parametric block_k_copy = min(64,K)//(16//elt_bytes) + val=(1, 16//elt_bytes) formula used by 07-09, matching the C++ kBlockK_Copy / kBlockN_Copy template. Verified on G2 (H200, SM90): all six C++ launchers and four cutedsl ports pass — 6852 sub-tests total, 0 failed. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Unify 07/08/09 MMA tile to match 05/06's
ATOM_LAYOUT_MNK=(2,4,1)/VAL_EXPAND_MNK=(1,1,2)(32x32x32 MMA tile, 256 threads), and bring the cutedsl ports closer to their C++ siblings.SM75_U32x4_LDSM_N->SM75_U32x2_LDSM_Nand SM90STSM_Nx4 -> x2. The C/O fragment has no K val-expand, so each thread owns 2 32-bit packets, and the x4 variant fails itsstatic_assert; A/B keep x4 becauseVAL_EXPAND_K=2gives them enough vals/thread.StMatrix8x8x16bOp(False, 2), elseCopyUniversalOp, mirroring the C++ SM90 STSM branch. Predicate wrapped incutlass.const_exprso the trace picks one branch statically.sClayout (Swizzle<3,3,3> o (8 x min(64, N))) to mirror C++SmemLayoutC. 07 also pullspartition_S/Dinto named tensors beforecute.copyto match the C++ style.(32,8)/(1,8)and(1,4)to the parametricblock_k_copy = min(64,K)//(16//elt_bytes)+val=(1, 16//elt_bytes)formula used by 07-09, matching the C++kBlockK_Copy/kBlockN_Copytemplate.