Registry / data / gt4py
library1.1.11pypypiunverified

GT4Py (GridTools for Python) is a Python library for generating high-performance implementations of stencil kernels for weather and climate modeling from a domain-specific language (DSL). It supports multiple backends including numpy, CUDA, and DaCe. Currently at version 1.1.9, released irregularly (multiple minor releases per year). Requires Python >=3.10, <3.15.

pip install gt4py
INSTALL
IMPORT
SIG · GT4PY
G
gt4py
datapythonv1.1.11
Install
20.0s avg
Import
Disk
398MB
Pass rate
9/ 10
Env Coverage9 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v1.1.11 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
glibc
py 3.10
✓ —
✓ 21.1s
py 3.11
✓ —
✓ 21s
py 3.12
✓ —
✓ 23s
py 3.13
✓ —
✓ 22.5s
py 3.9
✕ build_error
✓ 12.2s
398MB installed
● package 398MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

Stencil
from gt4py import Stencil
from gt4py.cartesian import Stencil

Define a simple stencil that adds 1 to each element, compile it with the numpy backend, and execute.

import numpy as np from gt4py.cartesian import Stencil, gtscript def my_stencil_def(in_field: gtscript.Field[float], out_field: gtscript.Field[float]): with computation(PARALLEL), interval(...): out_field = in_field[0, 0, 0] + 1.0 # Create the stencil my_stencil = Stencil( definition=my_stencil_def, backend="numpy", rebuild=False, ) # Run on sample data inp = np.random.rand(10, 10, 10).astype(np.float64) out = np.empty_like(inp) my_stencil(inp=inp, out_field=out, origin=(0, 0, 0), domain=(10, 10, 10))
Debug
Known issues
breakingThe 'cuda' backend was removed in v1.1.0. Use 'gtcuda' or 'dace:cuda' instead.
fix
Change backend from 'cuda' to 'gtcuda' or use Dace with CUDA backend 'dace:cuda'.
affects: >=1.1.0
deprecatedThe 'redundant region syntax' is removed in v1.1.9. Old code using `region` that is now redundant will break.
fix
Remove redundant region syntax; ensure all regions are necessary.
affects: >=1.1.9
gotchaFor DaCe backends, field layout must match the stencil's iteration order. Use `dace:gpu` with Fortran layout or specify layout explicitly.
fix
Set environment variable GT4PY_CARTESIAN_ENABLE_OPENMP=0 if OpenMP is not available (e.g., on macOS with Apple Clang).
affects: >=1.1.3
gotchaOpenMP is enabled by default but may not be supported by all compilers (e.g., Apple Clang). This can cause build failures.
fix
Set environment variable GT4PY_CARTESIAN_ENABLE_OPENMP=0 to disable OpenMP.
affects: >=1.1.6
Upgrade
Version history
1.1.11latest on PyPI · released Jun 18, 2026
Audit
Dependencies

No dependency data recorded yet.

Agent activity
17 hits · last 30 days
node
16
Resources