-
Notifications
You must be signed in to change notification settings - Fork 332
[Refactor] Improve scalar handling in CopyNode and update loop partition dtype logi #1111
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
…ion dtype logic * Refactored CopyNode::MakeSIMTLoop to handle scalar cases more efficiently by moving the scalar check to the end of the function. * Updated loop_partition.cc to set a default DataType for thread and vector extents, ensuring compatibility when loop_vars_ is empty.
|
👋 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! 🚀 |
WalkthroughTwo control flow refactorings in compiler operations: the copy operation now builds its body before checking for the scalar case, instead of exiting early; the loop partitioner now initializes dtype to Int(32) as a default instead of strictly checking that loop variables exist. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Poem
Pre-merge checks and finishing touches❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (2)
🧰 Additional context used🧬 Code graph analysis (1)src/transform/loop_partition.cc (1)
🔇 Additional comments (3)
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 |
…ion dtype logi (tile-ai#1111) * [Refactor] Improve scalar handling in CopyNode and update loop partition dtype logic * Refactored CopyNode::MakeSIMTLoop to handle scalar cases more efficiently by moving the scalar check to the end of the function. * Updated loop_partition.cc to set a default DataType for thread and vector extents, ensuring compatibility when loop_vars_ is empty. * lint fix * remove debug print
This pull request focuses on improving the handling of scalar and non-scalar copy operations in the
CopyNodelogic, as well as refining loop partitioning behavior. The main changes clarify where scalar logic is applied in the loop generation process and improve type inference in the loop partitioner.Copy operation logic improvements:
is_scalar) inCopyNode::MakeSIMTLoopso that the special-case serial loop for scalars is now created after the loop body is constructed, ensuring predicates are properly applied in scalar cases. [1] [2]CopyNode::LowerNormalCopyto output the generated SIMT loop, aiding in debugging and development.Loop partitioning improvements:
LoopPartitioner::Partitionto default toint32if no loop variables are present, otherwise using the data type of the last loop variable, making the code more robust and preventing potential errors.Summary by CodeRabbit
Bug Fixes
Refactor