Thanks to visit codestin.com
Credit goes to github.com

Skip to content

next: issue with domain inference with concat_where at domain boundaries #2205

@havogt

Description

@havogt
testee_program(a, b, out, edges, levels) {
  __tmp_1 = temporary(domain=u⟨ Edgeₕ: [0, edges[, KDimᵥ: [0, 11[ ⟩, dtype=int32);
  __tmp_1 @ u⟨ Edgeₕ: [0, edges[, KDimᵥ: [0, 11[ ⟩
       ← as_fieldop(λ(a, b) → ·⟪E2Vₒ, 0ₒ⟫(a) + ·b, u⟨ Edgeₕ: [0, edges[, KDimᵥ: [0, 11[ ⟩)(a, b);
  out @ u⟨ Edgeₕ: [0, edges[, KDimᵥ: [0, 10[ ⟩
       ← as_fieldop(
           λ(__ct_flat_el_0___tcw_pos, tmp0ᐞ0) → 
             (λ(_cs_1, _icdlv_6) → 
                if True ∧ _cs_1 < 9 then _icdlv_6() else if 10 <= _cs_1 ∧ True then _icdlv_6() else ·tmp0ᐞ0)(
               ·__ct_flat_el_0___tcw_pos, λ() → ·tmp0ᐞ0 - ·⟪Koffₒ, 1ₒ⟫(tmp0ᐞ0)
             ), u⟨ Edgeₕ: [0, edges[, KDimᵥ: [0, 10[ ⟩
         )(index(KDimᵥ), __tmp_1);
}

In this example __tmp_1 is only consumed in KDim: [0, 10[, but computed in [0, 11[. The reason is that the domain inference takes both branches of the if (from concat_where) into account and therefore concludes that K domain needs to have the extra level.

Metadata

Metadata

Assignees

No one assigned

    Labels

    gt4py.nextIssues concerning the new version with support for non-cartesian grids.triage: bugSomething isn't working

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions