GridTools / gt4py

Python library for generating high-performance implementations of stencil kernels for weather and climate modeling from a domain-specific language (DSL).
https://GridTools.github.io/gt4py
Other
106 stars 48 forks source link

feat[next][dace]: GTIR-to-SDFG lowering of cast_ builtin #1610

Closed edopao closed 1 month ago

edopao commented 1 month ago

Add support to lower GTIR like: y @ c⟨ IDimₕ: [0, size) ⟩ ← as_fieldop(λ(a) → cast_(·a, float64), c⟨ IDimₕ: [0, size) ⟩)(x);

Test case added.

edopao commented 1 month ago

did you intentionally remove the copy test?

Yes, the test was not useful because it used as_fieldop to do element-wise copy of the field. Besides, in #1609 I will introduce another kind of copy test which covers an interesting corner case of lowering to SDFG.