-
Notifications
You must be signed in to change notification settings - Fork 231
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
compiler: Add 'groupby' mode to MapNodes visitor #2502
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #2502 +/- ##
=======================================
Coverage 87.35% 87.36%
=======================================
Files 238 238
Lines 45574 45583 +9
Branches 4035 4037 +2
=======================================
+ Hits 39813 39822 +9
Misses 5079 5079
Partials 682 682 ☔ View full report in Codecov by Sentry. |
# Replace the outermost `Iteration` with a `Call` | ||
callback = Callable('solver', iters[0], 'void', ()) | ||
processed = Transformer({iters[0]: Call(callback.name)}).visit(block1) | ||
|
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.
I think it is fine!
Nipick: Maybe you could add:
+assert len(iters) == 3
assert str(processed) == 'solver();'
but sure it is not needed.
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.
I have assert str(processed) == 'solver();'
just below
Add
MapNodes(..., mode='groupby')
back, which was dropped in #2477 and I didn't see this. It is useful for the PETSc lowering.