[BugFix][Layout] Avoid thread-indexed wide reducer finalize readback - #3049
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! 🚀 |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
Included review availability: Your plan includes up to 8 reviews per rolling hour; 7 remain after this review. 📝 WalkthroughWalkthroughThe reducer materialization path now applies validated participant-wide layouts to wide-plan destinations and staging buffers. New tests verify static publication and numerical results across reduction, legacy syntax, staged-copy, and multi-output cases. ChangesWide-plan reducer publication
Estimated code review effort: 3 (Moderate) | ~25 minutes Merge Risk: ⚪ Minimal · up to This localized reducer layout fix includes focused regression coverage and build validation, and no actionable merge-blocking risk remains after normal checks and review. Sequence Diagram(s)sequenceDiagram
participant WidePlanFallback
participant TryWideFinalizeDstOverride
participant LayoutRegistry
participant ReducerMaterializer
WidePlanFallback->>TryWideFinalizeDstOverride: validate destination and copy-use chain
TryWideFinalizeDstOverride->>LayoutRegistry: register participant-wide layouts
WidePlanFallback->>ReducerMaterializer: materialize with layout overrides
ReducerMaterializer-->>WidePlanFallback: generated reducer publication
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 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
reducer[threadIdx.x & 15].Implementation
Validation
./format.shcmake --build build -j64with both the default and CUDA-enabled configurationsResult: 5 passed.
n=512,h=4096): 15.68 us via CUPTI, with no thread-dependent reducer-result loads in the generated CUDA.The full reducer-v2 file additionally reported 51 passed and one unrelated target-sensitive packed-narrow codegen assertion (
SumOp, 8expected versusSumOp, 4on the auto-selected target). That test does not enter the modified wide-plan branch.Summary
C++ style / lint notes
docs/developer_guide/cpp_style.md.