Skip to content

Commit 8fafac6

Browse files
havogtedopao
andauthored
Update GT4Py to v1.1.9 (#1187)
Co-authored-by: Edoardo Paone <[email protected]>
1 parent f7f2f48 commit 8fafac6

File tree

16 files changed

+262
-180
lines changed

16 files changed

+262
-180
lines changed

ci/base.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ build_image_aarch64:
8585
# variables:
8686
# CSCS_ADDITIONAL_MOUNTS: '["/project/d121/icon4py/ci/testdata:$ICON4PY_TEST_DATA_PATH"]'
8787
# HPC_SDK_PATH: "/opt/nvidia/hpc_sdk/Linux_${ARCH}/22.11"
88-
# ICON4PY_NOX_UV_CUSTOM_SESSION_EXTRAS: "cuda11"
88+
# ICON4PY_NOX_UV_CUSTOM_SESSION_EXTRAS: "cuda12"
8989
.test_template_aarch64:
9090
extends: [.container-runner-santis-gh200, .test_template]
9191
needs: [build_image_aarch64]

model/atmosphere/advection/pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ dependencies = [
2626
# workspace members
2727
"icon4py-common~=0.1.0",
2828
# external dependencies
29-
"gt4py==1.1.8",
29+
"gt4py==1.1.9",
3030
'packaging>=20.0'
3131
]
3232
description = "ICON advection."

model/atmosphere/diffusion/pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ dependencies = [
2626
# workspace members
2727
"icon4py-common~=0.1.0",
2828
# external dependencies
29-
"gt4py==1.1.8",
29+
"gt4py==1.1.9",
3030
'packaging>=20.0'
3131
]
3232
description = "ICON diffusion."

model/atmosphere/dycore/pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ dependencies = [
2626
# workspace members
2727
"icon4py-common~=0.1.0",
2828
# external dependencies
29-
"gt4py==1.1.8",
29+
"gt4py==1.1.9",
3030
'packaging>=20.0'
3131
]
3232
description = "ICON dynamical core."

model/atmosphere/dycore/tests/dycore/stencil_tests/test_compute_advection_in_vertical_momentum_equation.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ def interpolate_contravariant_vertical_velocity_to_full_levels_numpy(
7676
)
7777
contravariant_corrected_w_at_cells_on_model_levels = 0.5 * (
7878
contravariant_corrected_w_with_surface[:, :-1]
79-
+ contravariant_corrected_w_with_surface[:, 1:] # type: ignore[operator] # unclear why mypy complains (might be fixable in gt4py mypy plugin)
79+
+ contravariant_corrected_w_with_surface[:, 1:]
8080
)
8181
return contravariant_corrected_w_at_cells_on_model_levels
8282

model/atmosphere/subgrid_scale_physics/microphysics/pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ dependencies = [
2626
# workspace members
2727
"icon4py-common~=0.1.0",
2828
# external dependencies
29-
"gt4py==1.1.8",
29+
"gt4py==1.1.9",
3030
'packaging>=20.0'
3131
]
3232
description = "ICON microphysics."

model/atmosphere/subgrid_scale_physics/muphys/pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ dependencies = [
2626
"icon4py-common[io]~=0.1.0",
2727
# external dependencies
2828
"numpy>=1.23.3",
29-
"gt4py==1.1.8",
29+
"gt4py==1.1.9",
3030
"packaging>=20.0"
3131
]
3232
description = "ICON subgrid scale muphys parameterization."

model/common/pyproject.toml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ classifiers = [
2424
]
2525
dependencies = [
2626
'array-api-compat>=1.13.0',
27-
'gt4py==1.1.8',
27+
'gt4py==1.1.9',
2828
'packaging>=20.0',
2929
'typing-extensions>=4.11.0',
3030
'numpy>=1.23.3',
@@ -41,8 +41,8 @@ version = "0.1.0"
4141

4242
[project.optional-dependencies]
4343
all = ["icon4py-common[distributed,io]"]
44-
cuda11 = ['cupy-cuda11x>=13.0', 'gt4py[cuda11]']
4544
cuda12 = ['cupy-cuda12x>=13.0', 'gt4py[cuda12]']
45+
cuda13 = ['gt4py[cuda13]']
4646
distributed = ["ghex>=0.5.1", "mpi4py>=3.1.5"]
4747
io = [
4848
# external dependencies
@@ -60,6 +60,7 @@ io = [
6060
"uxarray==2024.3.0",
6161
"xarray[complete]>=2024.3.0"
6262
]
63+
rocm7 = ['gt4py[rocm7]']
6364

6465
[project.urls]
6566
repository = "https://github.com/C2SM/icon4py"

model/common/src/icon4py/model/common/utils/data_allocation.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -144,11 +144,11 @@ def random_mask(
144144
) -> gtx.Field:
145145
rng = np.random.default_rng()
146146
shape = _shape(grid, *dims, extend=extend)
147-
arr = np.full(shape, False).flatten()
148-
num_true = int(arr.size * 0.5)
149-
arr[:num_true] = True
150-
rng.shuffle(arr)
151-
arr = np.reshape(arr, newshape=shape)
147+
flat_arr = np.full(shape, False).flatten()
148+
num_true = int(flat_arr.size * 0.5)
149+
flat_arr[:num_true] = True
150+
rng.shuffle(flat_arr)
151+
arr = flat_arr.reshape(shape)
152152
if dtype:
153153
arr = arr.astype(dtype)
154154
return gtx.as_field(dims, arr, allocator=allocator) # type: ignore [arg-type] # type "ndarray[Any, Any] | NDArrayObject"; expected "NDArrayObject"

model/driver/pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ dependencies = [
3131
# external dependencies
3232
"click>=8.0.1",
3333
"devtools>=0.12",
34-
"gt4py==1.1.8",
34+
"gt4py==1.1.9",
3535
"packaging>=20.0",
3636
"numpy>=1.23.3"
3737
]

0 commit comments

Comments
 (0)