Skip to content

cartesian: dace backends missing support for casting in variable k offsets #1881

@romanc

Description

@romanc

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.

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 xfail for all DaCe backends
  • succeeds for all other backends

That behavior can be simplified once DaCe backends also support casting in variable k offset expressions.

Metadata

Metadata

Assignees

No one assigned

    Labels

    gt4py.cartesianIssues concerning the current version with support only for cartesian grids.module: backendRelated to analysis/backend subpackagestriage: bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions