-
Notifications
You must be signed in to change notification settings - Fork 35
TTIR decomposition of ttir.prod op #3694
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
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #3694 +/- ##
==========================================
- Coverage 72.62% 72.61% -0.01%
==========================================
Files 213 213
Lines 29310 29346 +36
==========================================
+ Hits 21286 21311 +25
- Misses 8024 8035 +11 ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rewrite patterns looks good, but I would move it to TTNN workarounds patterns. We should leave TTIRToTTIR decompositions for ops that don't exist in TTNN and there is no plan to introduce them in the near future.
lib/Conversion/TTIRToTTIRDecomposition/TTIRToTTIRDecomposition.cpp
Outdated
Show resolved
Hide resolved
lib/Conversion/TTIRToTTIRDecomposition/TTIRToTTIRDecomposition.cpp
Outdated
Show resolved
Hide resolved
lib/Conversion/TTIRToTTIRDecomposition/TTIRToTTIRDecomposition.cpp
Outdated
Show resolved
Hide resolved
lib/Conversion/TTIRToTTIRDecomposition/TTIRToTTIRDecomposition.cpp
Outdated
Show resolved
Hide resolved
lib/Conversion/TTIRToTTIRDecomposition/TTIRToTTIRDecomposition.cpp
Outdated
Show resolved
Hide resolved
645a2f6
to
f4eb822
Compare
PyTorch support reduce produce for either one dimension or all dimensions. However, Jax can also perform reduce product for multiple dimensions (so does stablehlo). I don't think that tt-metal will support ttnn.prod for multiple dimensions as it follows the same structure/function as PyTorch. I added it as TTIR->TTIR decomposition due to following two reasons
|
Good point, didn't check that. In that case, I agree that this should stay as TTIR->TTIR decomp. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good!
f4eb822
to
4124567
Compare
Ticket
closes #1861
Problem description
tt-metal supports product reduction along one or all dimensions.
What's changed
TTIR->TTIR decomposition is added to transform product reduction op to
multiple reduction ops. Each op will perform reduction along one dimension only.
Checklist