-
Notifications
You must be signed in to change notification settings - Fork 33
(Towards #2381 #2674) add min max access types and new LFRic builtins #3263
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
…into 2381_arp_global_reduction
…into 2381_arp_global_reduction
|
My feeling is that we currently have quite a lot of domain-specific information in AccessType which should not be there (e.g. INC). All of the generic PSyIR should, as you say, use READ/WRITE/READWRITE. The concept of a reduction or INC access belongs with a domain. I was therefore planning on separating the two out and ensuring that the domain-specific access types are only referred to in appropriate places in the code. I'm not that keen on the idea of having a mapping of particular built-ins to the type of reduction they perform - it feels more natural to keep that information as part of the metadata associated with the kernel. The potential future re-use of |
|
Having now realised that we also have |
|
@sergisiso ready for another look and/or continued discussion. |
|
@arporter Ok regarding leaving the separation to a follow up PR (#3272) but ...
The type of reduction they perform belongs to the implementation of the built-in, and you already added it there: LFRicMaxvalXKern.lower_to_languate_level has: LFRicSumXKern.lower_to_languate_level has: My point is that we don't need to repeat this information again in the access type, because the access type is the same for all of them. Would calling the metadata GH_REDUCTION and the AccessType.REDUCTION instead of GH_SUM, GH_MIN, GH_MAX and SUM,MIN,MAX be alright? |
That's a good idea. Fortunately, since only built-ins can do reductions this change wouldn't affect any existing LFRic code (I think). I can try doing that and see how it goes. |
|
Currently blocked by #3274 which is moving the access mapping out of the config file. |

This is a step towards both #2381 (generalising global reductions) and #2674 (new field_min_max builtin). It attempts to reduce the size of #3222 by only adding the two new access types for reductions as well as the skeletons for the new builtins.