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

fix[dace]: Fixed SDFG args #1400

Merged

Conversation

philip-paul-mueller
Copy link
Contributor

Modified how the SDFG arguments are computed.

It was noticed that some transformations, especially the SDFG.apply_gpu_transformation(), to the SDFG, added new arguments to the SDFG.
But, since a lot of functions build on the SDFG.arg_names member and this member was populated before the transformation, an error occurred.
Thus it was changed such that SDFG.arg_names was only populated with the arguments also known to the Fencil.

Before the arguments were extracted based on the `arg_names` member of the SDFG.
However it was noticed that some transformation would add new arguments, especially the `SDFG.apply_gpu_transformation()`, to the SDFG.
Before, the extraction of the call arguments was based on the `SDFG.arg_names` member, but since that member was populated before the transformations were applied, it was out of date at the end of the `build_sdfg_from_itir()` function.
Thus in this commit the computation of the required call arguments is based on the `signature_arglist()` function of the SDFG.
Before the argument list, i.e. the arguments that could be passed as positional argument, include all arguments of the SDFG.
However, due to several reasons it was changed to only include the arguments that where known to the Fencil as positional arguments.
The other arguments, such as offset providers and the ones generated by the translation process, are only accessible as keywords only arguments.
In commit d916497 I thought it was necessary to use `SDFG.signature_arglist()` instead of `SDFG.arg_names`, as it turned out it was enough to give the SDFG the correct argument list.
I also updated the composition of `expected_args`, now it will be an error if an argument is missing.
It now works.
@philip-paul-mueller
Copy link
Contributor Author

cscs-ci run

@philip-paul-mueller
Copy link
Contributor Author

cscs-ci run

@philip-paul-mueller philip-paul-mueller merged commit af33e21 into GridTools:main Dec 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants