-
Notifications
You must be signed in to change notification settings - Fork 0
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
Grid manager with backend #609
Conversation
- allocate geometry and coordinates on specified backend - determine on_gpu for icon_grid from backend
cscs-ci run default |
cscs-ci run default |
cscs-ci run default |
cscs-ci run default |
try: | ||
import cupy as xp | ||
except ImportError: | ||
import numpy as xp |
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.
I don't understand why we need this if we're using numpy afterwards
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.
I added the xp
only for the typing. (There is this NDArray
TypeAlias) Inside the grid construction I kept this flag on_gpu
as it was before for compatibility, that seems to work, but I have not yet bent my head around how it works. Rather not touched the grid construction. It think the solution there will eventually be that we read (on CPU) and then copy to device probably right before we return the grid as for the other fields.
For this we will need to do the import based on the backend I think.
Co-authored-by: Nicoletta Farabullini <[email protected]>
Mandatory Tests Please make sure you run these tests via comment before you merge!
Optional Tests To run benchmarks you can use:
To run tests and benchmarks with the DaCe backend you can use:
In case your change might affect downstream icon-exclaim, please consider running
For more detailed information please look at CI in the EXCLAIM universe. |
cscs-ci run default |
use GT4Py backend in
GridManager
:on_gpu
flag for theIconGrid
construction is determined from the backend, for backwards compatibiltyfurther changes and restrictions
IconGrid
construction does not fully support the CUPY vs NUMPY import. It remains on CPU everywhere.