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 repeated fused stencil test #443

Merged
merged 3 commits into from
Apr 19, 2024
Merged

Conversation

stelliom
Copy link
Contributor

This PR fixes the test_directive_semantics_validation_repeated_stencil test in test_validation.py. This test was not actually testing repeated stencils, since the names of the stencils provided in the arguments were not the same, probably this was overlooked during the recent name changes of stencils.

Additionally, fixing the above issue uncovered another problem that was not previously spotted due to this test being faulty. Repeated fused stencils were not actually supported, so here we also add support for them.

Note: we also added a small change in validation.py to change a string to a raw string, in order to avoid a warning about an invalid escape sequence.

stelliom added 3 commits April 17, 2024 15:05
Now repeated fused stencils are actually allowed and tested correctly.
Copy link

Mandatory Tests

Please make sure you run these tests via comment before you merge!

  • cscs-ci run default
  • launch jenkins spack

Optional Tests

To run benchmarks you can use:

  • cscs-ci run benchmark

To run tests and benchmarks with the DaCe backend you can use:

  • cscs-ci run dace

In case your change might affect downstream icon-exclaim, please consider running

  • launch jenkins icon

For more detailed information please look at CI in the EXCLAIM universe.

@stelliom
Copy link
Contributor Author

cscs-ci run default

@stelliom
Copy link
Contributor Author

launch jenkins spack

Copy link
Contributor

@muellch muellch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So we support repeated fused stencils now, is this also tested anywhere?

@stelliom
Copy link
Contributor Author

So, this was already "tested" in tools/tests/liskov/test_generation.py therefore I thought you always actually wanted to support repeated fused stencils, otherwise why test it (at least why test it the way it was)?

If you look at my changes you can see that I also change/fix exactly that test, which in the end is the same as for repeated stencils, but just a different argument.

@stelliom stelliom merged commit ea924e6 into main Apr 19, 2024
5 checks passed
@stelliom stelliom deleted the fix_repeated_fused_stencil_test branch April 19, 2024 08:36
iomaganaris referenced this pull request in iomaganaris/icon4py Jun 18, 2024
* Fixed repeated stencil test for fused stencils.

Now repeated fused stencils are actually allowed and tested correctly.

* Made string _extract_arg_from_directive raw to avoid warning about invalid escape sequence.

* Ruff formatting

---------

Co-authored-by: stelliom <[email protected]>
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