Map thermodynamic vars to device to prevent lots of small transfers - #84
Open
uwagura wants to merge 1 commit into
Open
Map thermodynamic vars to device to prevent lots of small transfers#84uwagura wants to merge 1 commit into
uwagura wants to merge 1 commit into
Conversation
…cessive small transfers
GPU Port CoverageOverall: 2043 / 5662 portable executed lines ported (36.1%) Files touched by this PR: 21 / 107 portable executed lines ported (19.6%) Full per-file / per-routine breakdown: see the "gpu-port-report" job summary and artifact. |
I think we should yes |
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.
write_energyinMOM_sum_output.F90currently pushestv%sandtv%tto the device using and!$omp target update to(directive. However, since the thermodynamic variables are not yet persistently on the device, I don't think this update actually does anything, and the compiler instead inserts a bunch of small transfers:This pr changes the
update toto atarget enter data map(todirective and then releases the arrays, consistent to how we've handled them in other parts of the code, which gets rid of the transfers.Given that this is the second time this has happend, we may want to start thinking about whether or not we want to push the tv arrays to the device at initialization and then update them as need.