[Feat] Improve T.reduce_absmax to use less abs call#1626
[Feat] Improve T.reduce_absmax to use less abs call#1626LeiWang1999 merged 2 commits intotile-ai:mainfrom
T.reduce_absmax to use less abs call#1626Conversation
… for improved clarity and consistency
|
👋 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! 🚀 |
📝 WalkthroughWalkthroughThe Changes
Sequence Diagram(s)(Skipped — changes are a parameter rename and internal reference updates, not a new multi-component control flow.) Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 1 | ❌ 2❌ Failed checks (2 warnings)
✅ Passed checks (1 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 (1)
🧰 Additional context used🧬 Code graph analysis (1)src/op/reduce.h (1)
🔇 Additional comments (1)
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 |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Fix all issues with AI agents
In @src/op/reduce.cc:
- Around line 102-103: The header declaration for ReduceOpNode::MakeReduce
currently names the first parameter `a` while the implementation uses `acc`;
update the declaration of PrimExpr ReduceOpNode::MakeReduce to use `const
PrimExpr &acc` (i.e., change `a` → `acc`) so the parameter name matches the
implementation and signature remains otherwise unchanged.
📜 Review details
Configuration used: defaults
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
src/op/reduce.cc
🧰 Additional context used
🧬 Code graph analysis (1)
src/op/reduce.cc (2)
tilelang/language/tir/ir.pyi (1)
Cast(6-6)tilelang/language/tir/op.py (1)
abs(2504-2520)
⏰ 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). (1)
- GitHub Check: Test for Python 3.12 with Metal (on macos-latest)
🔇 Additional comments (2)
src/op/reduce.cc (2)
105-127: LGTM - Consistent variable rename throughout function body.All references to
lhshave been correctly updated toacc, maintaining the logic of each reduction type.
102-127: Verify alignment between PR title and implementation.The PR title mentions "Improve
T.reduce_absmaxto use less abs call", but the code changes only show a variable rename fromlhstoacc. Line 117 still containstvm::abs(rhs), and there's no visible reduction in the number of abs calls.Please confirm whether:
- This PR only addresses the variable rename for clarity, or
- Additional optimization to reduce abs calls is intended but not yet implemented
Summary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings.