-
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
DaCe Orchestration for the Diffusion Granule #514
Conversation
cscs-ci run dace |
cscs-ci run default |
launch jenkins spack |
cscs-ci run dace |
cscs-ci run default |
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 only looked at the decorator.py
module and tried to provide as much information and suggestions as possible to make your life easier and try to get this done and merged ASAP.
model/atmosphere/diffusion/src/icon4py/model/atmosphere/diffusion/diffusion.py
Outdated
Show resolved
Hide resolved
model/common/src/icon4py/model/common/orchestration/decorator.py
Outdated
Show resolved
Hide resolved
model/common/src/icon4py/model/common/orchestration/decorator.py
Outdated
Show resolved
Hide resolved
model/common/src/icon4py/model/common/orchestration/decorator.py
Outdated
Show resolved
Hide resolved
model/common/src/icon4py/model/common/orchestration/decorator.py
Outdated
Show resolved
Hide resolved
model/common/src/icon4py/model/common/orchestration/decorator.py
Outdated
Show resolved
Hide resolved
model/common/src/icon4py/model/common/orchestration/decorator.py
Outdated
Show resolved
Hide resolved
model/common/src/icon4py/model/common/orchestration/decorator.py
Outdated
Show resolved
Hide resolved
cscs-ci run dace |
cscs-ci run default |
launch jenkins spack |
cscs-ci run dace |
cscs-ci run default |
launch jenkins spack |
cscs-ci run dace |
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 |
launch jenkins spack |
cscs-ci run dace |
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.
LGTM
This PR concerns only the DaCe backend.
Currently, the Diffusion granule calls the various stencils one after the other (in
_do_diffusion_step
). This means that for every stencil, there is a separate SDFG, and consequently one stencil is not aware of the others (this behavior limits the analyzability of the full granule). This PR introduces a decorator that fuses all these SDFGs under one compilation unit, allowing DaCe for further analysis and optimizations. Placing a GT4Py program inside a DaCe program region, and extracting the underlying SDFG, is possible due to this GT4Py PR.The halo exchanges are also taken care from the DaCe orchestrator. A follow-up PR will introduce automated halo exchanges. Currently, the halo exchange class implements the SDFGConvertible interface like GT4Py Program.
The orchestrator is activated either through an env var
ICON4PY_DACE_ORCHESTRATION=AnyValue
or through this pytest option--dace-orchestration=AnyValue
.The orchestrator suppports ahead of time compilation, however given that DaCe does not support nested Structures -like self in the Diffusion class-, some of the arguments need to be provided at compile time, through
dace.compiletime
. This annotation means that the correspoding argument will be considered from the closure of the function.The orchestrator provides full caching support and takes into consideration when a dace.compiletime argument changes, with a subsequent re-compilation of the fused SDFG.