[CUDA] Reject conflicting SM120 scale fragment layouts - #3284
LeiWang1999 wants to merge 1 commit into
Conversation
|
👋 Hi! Thank you for contributing to the TileLang project. Please remember to run We appreciate you taking this step! Our team will review your contribution, and we look forward to your awesome work! 🚀 |
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository: tile-ai/tilelang/.coderabbit.yaml Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (2)
Included review availability: This review used your included allowance. Your plan provides up to 8 included reviews per hour; 7 remain after this review. 📝 WalkthroughWalkthroughSM120 block-scaled GEMM layout inference now detects incompatible layouts when SFA and SFB share a fragment buffer. A parameterized lowering test covers aliasing, allocation choices, and warp policies. ChangesSM120 scale-buffer alias validation
Priority: ➖ Normal Estimated code review effort: 2 (Simple) | ~10 minutes Change: Bug fix · Severity of issue fixed: Medium Suggested reviewers: Merge Risk: ⚪ Minimal · up to No merge-blocking issue is established; the scale-layout conflict check can proceed through normal validation. Security Architecture ReviewSecurity architecture risk: 🔵 Low · up to The change prevents incompatible scale-fragment layouts from being accepted. It does not appear to add an entrypoint or change deployment behavior, although numerical execution on SM120 hardware was not verified. Retained concerns Security review detailsSecurity Blast Radius
Trust Boundaries and Controls
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Summary
Passing the same fragment as SFA and SFB to an SM120 block-scaled GEMM could silently overwrite one operand's layout requirement and produce incorrect scale reads. Layout inference now rejects incompatible requirements with guidance to use separate scale fragments or shared-memory scales.
Fixes #3283.
Changes
Validation
cmake --build build -j8./format.shpython -m pytest testing/python/language/test_tilelang_language_nvf4_mma_block_scale.py testing/python/language/test_tilelang_language_gemm_blockscaled.py -q --tb=short— 138 passed, 21 skipped.The new tests lower explicitly to
sm_120awithout device compilation. Numerical execution on SM120 hardware was not tested.Summary
infer_layout()now checks scale-load layouts when SFA and SFB use the same fragment buffer. It raises aValueErrorwhen the layouts differ and directs callers to use separate fragment buffers or shared-memory scales.Validation
The supplied summary does not report test or build results for this change. Numerical execution on SM120 hardware is not reported.