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

feat[next][dace]: Support for reduce-unroll special case #1381

Merged
merged 3 commits into from
Dec 4, 2023

Conversation

edopao
Copy link
Contributor

@edopao edopao commented Nov 30, 2023

Description

During integration of icon4py stencil mo_velocity_advection_stencil_20 with the DaCe backend, it was found that reduce-unroll can generate an ITIR containing can_deref on a scalar value. Such expression should always evaluate to true, so it can be evaluated at compile-time.
Note that in theory such case could be detected by the ITIR pass, once ITIR type inference is replaced by a new solution. At that time, the solution proposed here should be removed.

This is required by the ITIR generated with reduce-unroll.
@edopao edopao requested a review from petiaccja November 30, 2023 16:56
@edopao edopao marked this pull request as ready for review November 30, 2023 16:56
@edopao edopao changed the title feat[next]: DaCe support for reduce-unroll special case feat[next][dace]: Support for reduce-unroll special case Dec 4, 2023
Copy link
Contributor

@petiaccja petiaccja left a comment

Choose a reason for hiding this comment

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

In general, I strongly disagree with the direction of this PR as we are yet again hacking because iterator IR is not ready. However, I don't have a better idea either, so let's merge it with the TODOs you've added.

@edopao edopao merged commit 8a22ba7 into GridTools:main Dec 4, 2023
@edopao edopao deleted the dace-can_deref_true_case branch December 4, 2023 11:27
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