[Refactor] Recycle T.unroll(explicit=True) for early explicit unrolling - #2859
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 (11)
💤 Files with no reviewable changes (1)
📝 WalkthroughWalkthroughChangesExplicit loop unrolling
Estimated code review effort: 3 (Moderate) | ~20 minutes Sequence Diagram(s)sequenceDiagram
participant LoopAPI
participant UnrollLoop
participant CUDAPipeline
participant PipelinePlanning
LoopAPI->>UnrollLoop: provide loop annotations
UnrollLoop->>UnrollLoop: resolve explicitness per loop
CUDAPipeline->>UnrollLoop: preprocess explicit loops
UnrollLoop->>CUDAPipeline: return expanded loops
CUDAPipeline->>PipelinePlanning: submit simplified scheduling units
Possibly related PRs
Suggested reviewers: 🚥 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 |
|
@regression-perf |
Performance Regression Test ReportTriggered by: @LeiWang1999 Results
Artifacts
|
|
example_topk regression confirmed to be noise cc @LeiWang1999 |
This PR refactors the
pragma_unroll_explicitbehavior: by default, it is off now. Nothing in the compiler needs explicit unrolling to function correctly. And cicc will unroll the code for you with#pragma unroll, which does not need explicit unrolling at all. So I decide to leverageT.unroll(explicit=True)for program pre-processing to facilitate pipeline planning: the software pipeliner and warp-specializer want to see IR nodes flattened for easier scheduling. So I added an UnrollLoop pass before the scheduling in the pass pipeline.Summary
T.unroll(explicit=True)during preprocessing.UnrollLoopbefore pipeline planning.C++ style / lint notes
docs/developer_guide/cpp_style.md.