-
Notifications
You must be signed in to change notification settings - Fork 49
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
feat[next]: GT4Py programs as DaCe SDFGConvertibles #1527
Conversation
tests/next_tests/integration_tests/multi_feature_tests/ffront_tests/test_laplacian.py
Outdated
Show resolved
Hide resolved
tests/next_tests/integration_tests/multi_feature_tests/ffront_tests/test_laplacian.py
Outdated
Show resolved
Hide resolved
tests/next_tests/integration_tests/multi_feature_tests/ffront_tests/test_laplacian.py
Outdated
Show resolved
Hide resolved
Just a general comment, I am wondering if DaCe offers alternatively the option to register the conversion functions, instead of having to make them part of the object. (E.g. like jax pytrees work) If only the current option is available I am wondering if we should go with a monkey patching approach to remove the dace import from unrelated modules. But this is for @egparedes to answer. (And we could think of the other option as a contribution to productice 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.
It looks good, although I have a couple of style suggestion and some questions, mostly related to my poor understanding of the SDFG convertible API.
src/gt4py/next/program_processors/runners/dace_iterator/__init__.py
Outdated
Show resolved
Hide resolved
src/gt4py/next/program_processors/runners/dace_iterator/__init__.py
Outdated
Show resolved
Hide resolved
src/gt4py/next/program_processors/runners/dace_iterator/__init__.py
Outdated
Show resolved
Hide resolved
src/gt4py/next/program_processors/runners/dace_iterator/__init__.py
Outdated
Show resolved
Hide resolved
src/gt4py/next/program_processors/runners/dace_iterator/__init__.py
Outdated
Show resolved
Hide resolved
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.
Ok, here are my last very small comments related to the Python style and it should be ready to be merged. I have some questions about the tests, but I think it would be easier to set a quick meeting to talk about it.
src/gt4py/next/program_processors/runners/dace_iterator/__init__.py
Outdated
Show resolved
Hide resolved
src/gt4py/next/program_processors/runners/dace_iterator/__init__.py
Outdated
Show resolved
Hide resolved
src/gt4py/next/program_processors/runners/dace_iterator/__init__.py
Outdated
Show resolved
Hide resolved
tests/next_tests/integration_tests/feature_tests/dace/test_orchestration.py
Outdated
Show resolved
Hide resolved
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. Thanks for the hard work to make this work in a clean way.
src/gt4py/next/program_processors/runners/dace_iterator/itir_to_sdfg.py
Outdated
Show resolved
Hide resolved
cscs-ci run |
cscs-ci run default |
cscs-ci run |
cscs-ci run default |
With this fieature, a GT4Py.next Program can be placed inside a DaCe.program region, where its SDFG is automatically extracted and placed as a nested SDFG. This allows fusing multiple stencils under one SDFG -compilation unit-.
This feature is needed for implementing DaCe orchestration, e.g. in ICON4Py.