Skip to content
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

add {min,max}val2code transformations (towards #2105) #2148

Merged
merged 17 commits into from
Sep 14, 2023

Conversation

rupertford
Copy link
Collaborator

Adds two new transformations which replace minval and maxval intrinsics with equivalent code. The requirements for these are similar to the existing sum2code transformation.

@rupertford rupertford added in progress NEMO Issue relates to the NEMO domain labels May 19, 2023
@rupertford rupertford self-assigned this May 19, 2023
@codecov
Copy link

codecov bot commented May 19, 2023

Codecov Report

Patch coverage: 100.00% and no project coverage change.

Comparison is base (f408b3b) 99.85% compared to head (8505d92) 99.85%.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #2148   +/-   ##
=======================================
  Coverage   99.85%   99.85%           
=======================================
  Files         339      342    +3     
  Lines       46069    46144   +75     
=======================================
+ Hits        46000    46075   +75     
  Misses         69       69           
Files Changed Coverage Δ
src/psyclone/psyir/transformations/__init__.py 100.00% <100.00%> (ø)
...ir/transformations/intrinsics/maxval2code_trans.py 100.00% <100.00%> (ø)
...ir/transformations/intrinsics/minval2code_trans.py 100.00% <100.00%> (ø)
...psyir/transformations/intrinsics/mms_base_trans.py 100.00% <100.00%> (ø)
...psyir/transformations/intrinsics/sum2code_trans.py 100.00% <100.00%> (ø)

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@rupertford
Copy link
Collaborator Author

This PR needs the HUGE and TINY intrinsics (or equivalent) to set initial values. PR #2130 has now added these so we can continue with this PR.

@rupertford
Copy link
Collaborator Author

Ready for first review from @arporter or @sergisiso

@arporter arporter temporarily deployed to integration June 13, 2023 10:14 — with GitHub Actions Inactive
Copy link
Member

@arporter arporter left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These are complicated transformations! I've only looked at maxval2code and the mms base class so far and have a lot of questions so I'm stopping here for now.
All the tests and examples are OK with compilation.
The updated (thanks) UG builds fine.

@rupertford
Copy link
Collaborator Author

Ready for next review from @arporter

Copy link
Member

@arporter arporter left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good job. It's a nice implementation now. Despite the number of comments this is nearly there.
I was about to say I'll fire off the integration tests but there's no point as they don't actually use these transformations. That should probably be a separate PR.
I'll do it next time though to check the compilation of the tests.
I've checked everything with pylint.
Ref. guide builds without new warnings.

@rupertford
Copy link
Collaborator Author

Ready for next review from @arporter

Copy link
Member

@arporter arporter left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very nearly there.
Integration tests are still underway.
I just have one outstanding query about the pair of tests that you say are doing different things...

@rupertford
Copy link
Collaborator Author

Ready for next review from @arporter

Copy link
Member

@arporter arporter left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Requested change has been made.
Integration tests were all fine.
Ref. guide has no more warnings that on master.
Will proceed to merge.

@arporter arporter merged commit b4ceb72 into master Sep 14, 2023
11 checks passed
@arporter arporter deleted the 2105_minmaxval2code branch September 14, 2023 15:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
NEMO Issue relates to the NEMO domain ready to be merged
Projects
Development

Successfully merging this pull request may close these issues.

2 participants