Skip to content

Commit

Permalink
bug[next]: Fix ITIR program hash stability (#1733)
Browse files Browse the repository at this point in the history
#1690 included a change to make the hash of an `itir.FencilDefinition`
stable across multiple runs. This PR adopts the same change to an
`itir.Program`,
  • Loading branch information
tehrengruber authored Nov 14, 2024
1 parent 5ce0d9d commit 89fea8f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/gt4py/next/iterator/ir.py
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,9 @@ class Program(Node, ValidatedSymbolTableTrait):
body: List[Stmt]
implicit_domain: bool = False

_NODE_SYMBOLS_: ClassVar[List[Sym]] = [Sym(id=name) for name in GTIR_BUILTINS]
_NODE_SYMBOLS_: ClassVar[List[Sym]] = [
Sym(id=name) for name in sorted(GTIR_BUILTINS)
] # sorted for serialization stability


# TODO(fthaler): just use hashable types in nodes (tuples instead of lists)
Expand Down

0 comments on commit 89fea8f

Please sign in to comment.