(Closes #3330) MetaTransformation for OpenMPCPURoutineTrans#3345
Draft
LonelyCat124 wants to merge 2 commits intomasterfrom
Draft
(Closes #3330) MetaTransformation for OpenMPCPURoutineTrans#3345LonelyCat124 wants to merge 2 commits intomasterfrom
LonelyCat124 wants to merge 2 commits intomasterfrom
Conversation
Collaborator
Author
|
Input Fortran: Psyclone script: Output: You can also set nowait=False (or disable it) and get a corresponding result. |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #3345 +/- ##
==========================================
- Coverage 99.95% 99.92% -0.04%
==========================================
Files 384 385 +1
Lines 54214 54241 +27
==========================================
+ Hits 54192 54202 +10
- Misses 22 39 +17 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Initial implementation which is very bare bones and unfinished. I got a bit confused with inheritance, and there are still various issues with this.
Things that I was hoping would work, e.g. using superclasses validate/apply methods is a bit messy due to the MRO, since super().apply(...) does result in a call to
self.validate()which doesn't work if this has any type checking in its own validate function.I can work around this by making it's own validate function do very little and manually calling each superclasses inherited functionality.
The alternative (and potentially neater way to do it) is to only define the inherited classes for the purposes of validating available options and having documentation fixes (potentially with other improvements) but then create instances of the superclasses as required. The issue with this is pulling out the appropriate options for each superclass (as the option validation would no longer work for just passing in all options)
I'm also not entirely sure how
__init__works on this class right now, I think it will just useOMPLoopTrans, but I'm not sure I even want the user to have the option to change that, so I should potentially override__init__to not allow these options to be changed.I will show its current "working state" in the next post.
@sergisiso @arporter Do either of you have thoughts on a best direction for this?
Edit:
I also havd to make a change in the Transformation base class to never fail on the
"options"kwarg, as this could be being provided to the class by some superclass call and then breaking valid options checking in a different base classes' superclass. It was a bit weird, but is a problem of options still being defined on some classes but not newer ones.