Skip to content

Commit

Permalink
feat[next][dace]: Fix for broken DaCe test (#1396)
Browse files Browse the repository at this point in the history
Fix for broken DaCe test in baseline:
- use `flatten_list` to get `ValueExpr` arguments to numeric builtin function

Additionally, enable test for DaCe backend (left-over from PR #1393).
  • Loading branch information
edopao authored Dec 12, 2023
1 parent a14ad09 commit 3f595ff
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1010,9 +1010,7 @@ def _visit_reduce(self, node: itir.FunCall):
def _visit_numeric_builtin(self, node: itir.FunCall) -> list[ValueExpr]:
assert isinstance(node.fun, itir.SymRef)
fmt = _MATH_BUILTINS_MAPPING[str(node.fun.id)]
args: list[SymbolExpr | ValueExpr] = list(
itertools.chain(*[self.visit(arg) for arg in node.args])
)
args = flatten_list(self.visit(node.args))
expr_args = [
(arg, f"{arg.value.data}_v") for arg in args if not isinstance(arg, SymbolExpr)
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ def stencil_conditional(inp):
return tuple_get(0, tmp) + tuple_get(1, tmp)


@pytest.mark.uses_tuple_returns
def test_conditional_w_tuple(program_processor):
program_processor, validate = program_processor

Expand Down

0 comments on commit 3f595ff

Please sign in to comment.