-
Notifications
You must be signed in to change notification settings - Fork 31
#1312 ScalarArray code generation #3101
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
base: master
Are you sure you want to change the base?
Conversation
| def scalar_array(self, scalar_arr_arg, var_accesses=None): | ||
| ''' | ||
| Override the default implementation as there's no need to specify | ||
| ScalarArrays for an OpenACC data region. |
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.
This isn't true I'm afraid - they will need to be added to a data region. However, you could leave this as a TODO as I'm not sure we're ever going to need data regions.
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 for that - it's currently a very rough draft so some of the comments are currently just borrowed from other functions. But, I will definitely note that down!
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #3101 +/- ##
=======================================
Coverage 99.90% 99.90%
=======================================
Files 374 374
Lines 52358 52368 +10
=======================================
+ Hits 52307 52317 +10
Misses 51 51 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
This still isn't working as intended, but is getting closer to correct. As an example, the code gen is now adding the scalar arrays to the generated code, alongside the arrays containing their dimensions. However, it is not adding these dimensions to the generated code (e.g., no Furthermore, the stub_gen test is failing because we are currently adding the dimensions array to the psyir layer as an |
|
This is definitely a step in the right direction. I have managed to add ArrayReferences to the dimensions array. The current code generation is creating the following -
There are two problems -
I need to find out where the symbol is first added to the tree - I think doing so might allow me to fix both issues. |
|
The current failure is a bit strange, I haven't touched |
|
This is now generating code and the stub for my written tests. The code gen looks sensible, the stub gen needs more work. I haven't managed to fix the error which is prematurely failing the tests. |
|
The body of the code gen and stub gen looks correct - the only thing to fix is the number of variables appearing in the call of the code gen and the subroutine definition of the stub generation |
Adding code generation for ScalarArrays (towards #1312 ). The metadata support was added in #2173.