-
Notifications
You must be signed in to change notification settings - Fork 55
Closed
Labels
gt4py.cartesianIssues concerning the current version with support only for cartesian grids.Issues concerning the current version with support only for cartesian grids.module: backendRelated to analysis/backend subpackagesRelated to analysis/backend subpackagestriage: bugSomething isn't workingSomething isn't working
Description
Description
DaCe backends are currently missing support for casting in VariableKOffset. The issue comes from the fact that we "sympify" index computations in the _visit_offsets() function of tasklet_codegen.
gt4py/src/gt4py/cartesian/gtc/dace/expansion/tasklet_codegen.py
Lines 46 to 49 in 1a46fb0
| sym_offsets = [ | |
| dace.symbolic.pystr_to_symbolic(self.visit(off, **kwargs)) | |
| for off in (node.to_dict()["i"], node.to_dict()["j"], node.k) | |
| ] |
However, before we "sympify", casts are already translated to dace types, e.g. dace.int64 and then this isn't plain python anymore and fails sympy's python parser.
PR ... puts a mitigation in place to catch casts in indices of type VariableKOffset in the DaCe backends. The PR also adds a codgen test which
- uses
xfailfor all DaCe backends - succeeds for all other backends
That behavior can be simplified once DaCe backends also support casting in variable k offset expressions.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
gt4py.cartesianIssues concerning the current version with support only for cartesian grids.Issues concerning the current version with support only for cartesian grids.module: backendRelated to analysis/backend subpackagesRelated to analysis/backend subpackagestriage: bugSomething isn't workingSomething isn't working