Skip to content

Commit

Permalink
Fix infer domain ops
Browse files Browse the repository at this point in the history
  • Loading branch information
tehrengruber committed Feb 20, 2025
1 parent bd8dbaa commit 2c14648
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/gt4py/next/iterator/transforms/infer_domain_ops.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ def visit_FunCall(self, node: ir.FunCall, **kwargs) -> ir.Node:
raise ValueError(f"{fun} is not a valid comparison operator.")

if cpm.is_call_to(node, builtins.BINARY_LOGICAL_BUILTINS) and all(
isinstance(arg, (ir.Literal, ir.FunCall)) for arg in node.args
isinstance(arg.type, ts.DomainType) for arg in node.args
):
if cpm.is_call_to(node, "and_"):
# TODO: domain promotion
Expand All @@ -102,8 +102,7 @@ def visit_FunCall(self, node: ir.FunCall, **kwargs) -> ir.Node:
*[domain_utils.SymbolicDomain.from_expr(arg) for arg in node.args]
).as_expr()
)

else:
raise NotImplementedError
raise NotImplementedError()

return node

0 comments on commit 2c14648

Please sign in to comment.