Skip to content

DataNodeExtractTrans implementation#3301

Merged
arporter merged 25 commits intomasterfrom
1646_datanode_extract_trans
Feb 13, 2026
Merged

DataNodeExtractTrans implementation#3301
arporter merged 25 commits intomasterfrom
1646_datanode_extract_trans

Conversation

@LonelyCat124
Copy link
Copy Markdown
Collaborator

Initial implementation - transformation is quite straightforward so should be good for a review assuming CI is ok.

@codecov
Copy link
Copy Markdown

codecov Bot commented Jan 26, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 99.95%. Comparing base (2a1efa4) to head (d386496).
⚠️ Report is 26 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #3301   +/-   ##
=======================================
  Coverage   99.95%   99.95%           
=======================================
  Files         381      382    +1     
  Lines       54015    54107   +92     
=======================================
+ Hits        53993    54085   +92     
  Misses         22       22           

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@LonelyCat124
Copy link
Copy Markdown
Collaborator Author

@sergisiso @arporter This is ready for a first review. The implementation is currently pretty small and neat - if you want more functionality testing let me know and I can add more.

Copy link
Copy Markdown
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.

Thanks very much Aidan - as you say it's pleasingly simple. Also as you say, it could do with some more checks and associated tests :-)

On the naming front, I worry that the use of Extract will be confused with the existing ExtractTrans which is obviously quite different. IAAI (two of them) and it seems that IntroduceLocal/TemporaryTrans is a good alternative that doesn't involve "Extract".

Finally, (once everything else is done) I think it would be exciting (and possibly educational) to try this for real. I'm thinking we'd alter nemo/scripts/utils.py::normalise_loops so that it e.g. looks for any Calls which have array expressions as arguments.

Comment thread src/psyclone/psyir/transformations/__init__.py Outdated
Comment thread src/psyclone/psyir/transformations/datanode_extract_trans.py
Comment thread src/psyclone/psyir/transformations/datanode_extract_trans.py Outdated
Comment thread src/psyclone/psyir/transformations/datanode_extract_trans.py Outdated
Comment thread src/psyclone/psyir/transformations/datanode_to_temp_trans.py
Comment thread src/psyclone/tests/psyir/transformations/datanode_to_temp_trans_test.py Outdated
Comment thread src/psyclone/psyir/transformations/datanode_extract_trans.py Outdated
@LonelyCat124
Copy link
Copy Markdown
Collaborator Author

@arporter I think I fixed all the issues I found from the last review, ready for another look.

Copy link
Copy Markdown
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.

Looking good @LonelyCat124 - I like your solution for the imported symbols.
I think it would be worth doing the renaming of the transformation now. Please could you also add it to the User Guide.
I've addded a real-life NEMO example to #1958 - please could you use that as the basis for an additional test?

Comment thread src/psyclone/psyir/transformations/datanode_extract_trans.py Outdated
Comment thread src/psyclone/psyir/transformations/datanode_to_temp_trans.py
Comment thread src/psyclone/psyir/transformations/datanode_extract_trans.py Outdated
Comment thread src/psyclone/psyir/transformations/datanode_to_temp_trans.py
Comment thread src/psyclone/psyir/transformations/datanode_to_temp_trans.py
Comment thread src/psyclone/tests/psyir/transformations/datanode_extract_trans_test.py Outdated
Comment thread src/psyclone/tests/psyir/transformations/datanode_to_temp_trans_test.py Outdated
@LonelyCat124
Copy link
Copy Markdown
Collaborator Author

@arporter Also moved to use allocatables and allocate the array as required so ready for a review now.

Copy link
Copy Markdown
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.

Thanks Aidan. Just small things to tidy now. I've submitted the ITs again too.

Comment thread doc/user_guide/transformations.rst Outdated
Comment thread src/psyclone/psyir/transformations/datanode_to_temp_trans.py Outdated
Comment thread src/psyclone/psyir/transformations/datanode_to_temp_trans.py Outdated
Comment thread src/psyclone/psyir/transformations/datanode_to_temp_trans.py Outdated
Comment thread src/psyclone/psyir/transformations/datanode_to_temp_trans.py Outdated
Comment thread src/psyclone/tests/psyir/transformations/datanode_to_temp_trans_test.py Outdated
Comment thread src/psyclone/tests/psyir/transformations/datanode_to_temp_trans_test.py Outdated
Comment thread src/psyclone/tests/psyir/transformations/datanode_to_temp_trans_test.py Outdated
Comment thread src/psyclone/tests/psyir/transformations/datanode_to_temp_trans_test.py Outdated
Comment thread src/psyclone/psyir/transformations/datanode_extract_trans.py Outdated
@LonelyCat124
Copy link
Copy Markdown
Collaborator Author

@arporter Fixed up the remaining issues, hopefully ready for a final look.

@arporter
Copy link
Copy Markdown
Member

All looks good now, thanks very much Aidan. I've fired off the ITs one last (hopefully) time...

Copy link
Copy Markdown
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.

ITs were all fine. Ready to go.

@arporter arporter merged commit c9a794c into master Feb 13, 2026
15 checks passed
@arporter arporter deleted the 1646_datanode_extract_trans branch February 13, 2026 11:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants