[Bugfix] Introduce a flag to avoid unnecessary broadcast hoist and enable for let stmt#1638
Conversation
…s and update tests for validation
|
👋 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! 🚀 |
There was a problem hiding this comment.
Pull request overview
This pull request introduces a bugfix to avoid unnecessary broadcast hoisting and extends support for hoisting broadcasts in LetStmt expressions. The change adds a hoist_enabled flag that controls when broadcast values should be hoisted, and implements a new visitor method for LetStmt nodes.
- Adds
hoist_enabledflag to control when broadcast hoisting occurs - Implements
visit_let_stmt_method to handle broadcasts in LetStmt value expressions - Updates test suite with a new test case demonstrating LetStmt broadcast hoisting
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
| tilelang/transform/hoist_broadcast_values.py | Adds hoist_enabled flag and visit_let_stmt_ method to support broadcast hoisting in LetStmt expressions; modifies visit_buffer_store_ to enable/disable the flag appropriately |
| testing/python/transform/test_tilelang_transform_hoist_broadcast_values.py | Adds test_transform_hoist_let_stmt test case to verify LetStmt broadcast hoisting behavior |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
testing/python/transform/test_tilelang_transform_hoist_broadcast_values.py
Show resolved
Hide resolved
…ments and add a new test case for nested BufferStore broadcasts
📝 WalkthroughWalkthroughThe PR enhances the HoistBroadcastValuesMutator to support LetStmt broadcast hoisting through a conditional hoist flag and new visitor method. It adds per-statement context preservation and includes two test cases validating hoisting behavior in LetStmt and nested BufferStore scenarios. Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
📜 Recent review detailsConfiguration used: defaults Review profile: CHILL Plan: Pro 📒 Files selected for processing (2)
🧰 Additional context used🧠 Learnings (4)📓 Common learnings📚 Learning: 2026-01-06T05:20:45.325ZApplied to files:
📚 Learning: 2025-09-12T09:47:46.474ZApplied to files:
📚 Learning: 2026-01-06T05:20:45.325ZApplied to files:
🧬 Code graph analysis (2)tilelang/transform/hoist_broadcast_values.py (2)
testing/python/transform/test_tilelang_transform_hoist_broadcast_values.py (2)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
🔇 Additional comments (6)
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 |
|
LTCP, Merged. |
as title, examples pls checkout updated test.
Summary by CodeRabbit
Bug Fixes
Tests
✏️ Tip: You can customize this high-level summary in your review settings.