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 support for hoisting allocate statements #2561

Open
arporter opened this issue Apr 26, 2024 · 1 comment
Open

Add support for hoisting allocate statements #2561

arporter opened this issue Apr 26, 2024 · 1 comment
Labels
enhancement NEMO Issue relates to the NEMO domain

Comments

@arporter
Copy link
Member

Allocates within compute code are OK on the CPU but when adding directives to accelerate the code on a GPU, these allocates are left on the CPU and then (with managed memory) copied over to the GPU leading to a lot of unnecessary data traffic. Ideally we should be able to transform these allocates in a similar manner to what we do for automatic arrays. (i.e. make them module scope if they aren't already and then only reallocate them if their size changes).

@arporter arporter added enhancement NEMO Issue relates to the NEMO domain labels Apr 26, 2024
@sergisiso
Copy link
Collaborator

This also happens in at least 1 place of the NEMO 4.0 metoffice configuration and the profiler shows lots of data traffic there. So improving this will also benefit our NEMO 4.0 gpu performance.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement NEMO Issue relates to the NEMO domain
Projects
None yet
Development

No branches or pull requests

2 participants