-
Notifications
You must be signed in to change notification settings - Fork 29
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
(Towards #1960) put WHEREs containing reductions into CodeBlocks and fix non-unity lower-bound bug. #2372
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #2372 +/- ##
=======================================
Coverage 99.85% 99.85%
=======================================
Files 352 352
Lines 47334 47399 +65
=======================================
+ Hits 47264 47330 +66
+ Misses 70 69 -1 ☔ View full report in Codecov by Sentry. |
I've asked Simon if he'd mind testing this branch with the files on master of NEMO that have been giving him trouble. |
There's a separate bug that causes us to generate incorrect loop bounds if the array being iterated over has a non-default lower bound. We currently always generate, e.g.:
while we should generate e.g. |
Just checked with SPITZ12 (as that includes ice) and, with master, we get a compilation failure:
0 inform, 0 warnings, 1 severes, 0 fatal for ice_istate This PR fixes that one at least :-) |
Therefore, the generated loops should be over the shape of the mask expression. Whenever we index into an array (in a |
Tests are now happy (incl. with compilation). Need to test NEMO passthrough now. |
NEMO integration tests are green and performance is good :-) |
I can build GYRE_PISCES and SPITZ12 on NEMO main with the excludes that mention 'where' commented out of |
I just need to check again with HEAD of nemo now... |
GYRE builds and runs and SPITZ12 builds :-) Need to look at coverage now. |
CI is happy now. Ready for another look from @sergisiso. |
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.
@arporter The WHERE implementation looks good now, the integration test pass and also the formatting checks. I made some final minor comments. The only bigger comment is on the array_mixin get_effective_shape, but this is getting a bit out of scope so I would be happy to moving them to another issues if they are not simple to solve.
src/psyclone/tests/psyir/frontend/fparser2_where_handler_test.py
Outdated
Show resolved
Hide resolved
SPITZ12 still builds OK, as does ORCA2_ICE_PISCES (in passthrough mode). Integration tests are running. Ready for another look now. |
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.
Thanks @arporter for addressing all comments and refactoring the ArrayMixin utilities. This is a good improvement. The formatting checks pass, the integration test pass with expected results and the remaining where issues are properly marked with TODOs, so this is ready to merge.
No description provided.