Skip to content

Conversation

@havogt
Copy link
Contributor

@havogt havogt commented Jul 9, 2025

depends on #1713

havogt added a commit that referenced this pull request Jul 11, 2025
In previous commits the following pieces where already added:
- #1998 
- #2065 

In this PR, `concat_where` tests are added and transformations are
integrated. Currently, the feature is disabled for embedded (#2127) and
DaCe (PR will be opened once this is merged).

Details:
- constant folding for `InfinityLiteral`s is added
- various tuning to passes for `index`, `concat_where` builtins and
`InfinityLiteral`
- cases: field constructors now accept `Domain`s (instead of
`dict[Dimension, int])

---------

Co-authored-by: Hannes Vogt <[email protected]>
Co-authored-by: Till Ehrengruber <[email protected]>
Co-authored-by: Edoardo Paone <[email protected]>
philip-paul-mueller pushed a commit to philip-paul-mueller/gt4py that referenced this pull request Jul 15, 2025
In previous commits the following pieces where already added:
- GridTools#1998 
- GridTools#2065 

In this PR, `concat_where` tests are added and transformations are
integrated. Currently, the feature is disabled for embedded (GridTools#2127) and
DaCe (PR will be opened once this is merged).

Details:
- constant folding for `InfinityLiteral`s is added
- various tuning to passes for `index`, `concat_where` builtins and
`InfinityLiteral`
- cases: field constructors now accept `Domain`s (instead of
`dict[Dimension, int])

---------

Co-authored-by: Hannes Vogt <[email protected]>
Co-authored-by: Till Ehrengruber <[email protected]>
Co-authored-by: Edoardo Paone <[email protected]>
stubbiali pushed a commit to stubbiali/gt4py that referenced this pull request Aug 19, 2025
In previous commits the following pieces where already added:
- GridTools#1998 
- GridTools#2065 

In this PR, `concat_where` tests are added and transformations are
integrated. Currently, the feature is disabled for embedded (GridTools#2127) and
DaCe (PR will be opened once this is merged).

Details:
- constant folding for `InfinityLiteral`s is added
- various tuning to passes for `index`, `concat_where` builtins and
`InfinityLiteral`
- cases: field constructors now accept `Domain`s (instead of
`dict[Dimension, int])

---------

Co-authored-by: Hannes Vogt <[email protected]>
Co-authored-by: Till Ehrengruber <[email protected]>
Co-authored-by: Edoardo Paone <[email protected]>
# TODO add test
return Domain(dims=(self,), ranges=(UnitRange(Infinity.NEGATIVE, value + 1),))

def __eq__(self, value: Dimension | core_defs.IntegralScalar) -> bool | Domain:
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Suggested change
def __eq__(self, value: Dimension | core_defs.IntegralScalar) -> bool | Domain:
def __eq__(self, value: Dimension | core_defs.IntegralScalar | Any) -> bool | Domain:

Comment on lines +121 to +122
return Domain(dims=(self,), ranges=(UnitRange(Infinity.NEGATIVE, value + 1),))

Copy link
Contributor Author

Choose a reason for hiding this comment

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

overloads


def __eq__(self, value: Dimension | core_defs.IntegralScalar) -> bool | Domain:
if isinstance(value, Dimension):
return self.value == value.value
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Suggested change
return self.value == value.value
return self.value == value.value and self.kind == value.kind

???

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.

1 participant