We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
This code fails because the data dims get unrolled
import numpy as np from gt4py.cartesian import gtscript from gt4py.cartesian.gtscript import ( PARALLEL, computation, interval, ) from gt4py import storage as gt_storage backend = "numpy" full_shape = (1, 1, 1) aligned_index = (0, 0, 0) datadim_len = 4 FLOAT64_NDDIM = (np.float64, (datadim_len,)) @gtscript.stencil(backend=backend) def stencil( out_vec_field: gtscript.Field[FLOAT64_NDDIM], vec_field: gtscript.Field[FLOAT64_NDDIM], ): with computation(PARALLEL), interval(...): # The indexation doesn't work, it will silently unrolls for all dims # instead of failing because out_vect_field is not indexed properly out_vec_field[0, 0, 0] = vec_field[0, 0, 0][2] out_vec_field = gt_storage.ones( full_shape, backend=backend, aligned_index=aligned_index, dtype=FLOAT64_NDDIM ) vec_field = gt_storage.ones( full_shape, backend=backend, aligned_index=aligned_index, dtype=FLOAT64_NDDIM ) vec_field[:] = 2.0 stencil( out_vec_field, vec_field, origin=(0, 0, 0), domain=full_shape, )
Parent: GEOS-ESM/SMT-Nebulae#36
The text was updated successfully, but these errors were encountered:
gt4py.cartesian
No branches or pull requests
This code fails because the data dims get unrolled
Parent: GEOS-ESM/SMT-Nebulae#36
The text was updated successfully, but these errors were encountered: