Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
fb53d16
[API Update] `NDSLRuntime` uses the wider `StencilFactory` rather tha…
FlorianDeconinck Nov 28, 2025
c150878
:wrench: Harden `Quantity` to hybrid usage (#336)
FlorianDeconinck Dec 9, 2025
5e49ee1
:earth_americas: A few more basic stencils (#337)
FlorianDeconinck Dec 9, 2025
2724861
:rocket: `LocalState` class: a state-like class for organizing `Loca…
FlorianDeconinck Dec 9, 2025
07acf0b
[Fix | ScheduleTreeOpt | Experimental] `CartesianAxisMerge` correct p…
FlorianDeconinck Dec 11, 2025
4eec8a7
[Feature] `LocalState` allocation as `State` for test (#340)
FlorianDeconinck Dec 11, 2025
6533aff
Push ForScope when the Axis Map below is unique + utest (#342)
FlorianDeconinck Dec 12, 2025
7b5e974
[Feature | Fix] Boilerplate adjustements for physics and bench (#343)
FlorianDeconinck Dec 15, 2025
b20767b
[Feat] Better `State` and `LocaL` for real model use case (#344)
FlorianDeconinck Dec 15, 2025
4a41a42
[Feature] Introducing `Xumpy` (#345)
FlorianDeconinck Dec 19, 2025
753fa24
Minor fix to column min/max functions (#349)
CharlesKrop Jan 5, 2026
8769f12
BREAKING CHANGE: remove deprecated `CopyCornersXY` (#351)
romanc Jan 6, 2026
07aebdc
BREAKING CHANGE: require comm object in `ZarrMonitor` (#352)
romanc Jan 6, 2026
63cf842
refactor: update GitHub workflow dependencies (#354)
romanc Jan 7, 2026
b49e6a0
[Feature | Orchestration] Optimizated C call overhead away, update pi…
FlorianDeconinck Jan 7, 2026
afb097b
[Update] GT4Py up to January 7th `develop` (#355)
FlorianDeconinck Jan 8, 2026
d233c87
Parameterize `SubtileGridSizer` to allow variation of the padding on …
FlorianDeconinck Jan 8, 2026
5a6c878
refactor: deprecate duplicate basic stencil definitions (#358)
romanc Jan 9, 2026
0702698
[Feature | Experimental] SDFG code labeler (#359)
FlorianDeconinck Jan 12, 2026
eddecce
BREAKING CHANGE: remove `get_tile_number()` in partitioner (#353)
romanc Jan 14, 2026
be24390
refactor: cleanup in translate tests (#360)
romanc Jan 14, 2026
2277f36
testing ... (#363)
romanc Jan 16, 2026
f5605ca
BREAKING CHANGE: remove deprecated QuanityFactory.from_backend() (#356)
romanc Jan 16, 2026
698de25
BREAKING CHANGE: `Quantity` & `QuantityMetadata` changes (#357)
romanc Jan 16, 2026
10e86ca
refactor: Types for non-deprecated corner code (#361)
romanc Jan 16, 2026
c5705e0
BREAKING CHANE: remove deprecated NullComm (#350)
romanc Jan 19, 2026
1ca8019
refactor: improve types in python extension (#365)
romanc Jan 19, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/workflows/create-cache.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,14 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v5
uses: actions/checkout@v6

- name: Setup Python 3.11
uses: actions/setup-python@v5
uses: actions/setup-python@v6
with:
python-version: '3.11'

- uses: actions/cache@v4
- uses: actions/cache@v5
id: cache
with:
path: ~/.cache/pre-commit
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/docs_build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v5
uses: actions/checkout@v6

- name: Setup Python 3.11
uses: actions/setup-python@v5
uses: actions/setup-python@v6
with:
python-version: '3.11'

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/docs_deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,15 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v5
uses: actions/checkout@v6

- name: Configure Git Credentials
run: |
git config user.name github-actions[bot]
git config user.email github-actions[bot]@users.noreply.github.com

- name: Setup python
uses: actions/setup-python@v5
uses: actions/setup-python@v6
with:
python-version: 3.11

Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/lint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,16 +18,16 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v5
uses: actions/checkout@v6

- name: Setup Python 3.11
uses: actions/setup-python@v5
uses: actions/setup-python@v6
with:
python-version: '3.11'

# Only restore (don't save) caches on PRs. New caches created from PRs won't be
# accessible from other PRs, see workflows/create-cache.yaml.
- uses: actions/cache/restore@v4
- uses: actions/cache/restore@v5
with:
path: ~/.cache/pre-commit
key: pre-commit_${{ env.pythonLocation }}_${{ hashFiles('.pre-commit-config.yaml') }}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/unit_tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,12 @@ jobs:
steps:

- name: Checkout repository
uses: actions/checkout@v5
uses: actions/checkout@v6
with:
submodules: 'recursive'

- name: Setup Python 3.11
uses: actions/setup-python@v5
uses: actions/setup-python@v6
with:
python-version: '3.11'

Expand Down
3 changes: 0 additions & 3 deletions docs/docstrings/comm/null_comm.md

This file was deleted.

34 changes: 17 additions & 17 deletions examples/NDSL/01_gt4py_basics.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -66,14 +66,14 @@
"shape = (nx, ny, nz)\n",
"\n",
"qty_out = Quantity(\n",
" data=np.zeros([nx, ny, nz]), dims=[\"I\", \"J\", \"K\"], units=\"m\", gt4py_backend=backend\n",
" data=np.zeros([nx, ny, nz]), dims=[\"I\", \"J\", \"K\"], units=\"m\", backend=backend\n",
")\n",
"\n",
"arr = np.indices(shape, dtype=float).sum(\n",
" axis=0\n",
") # Value of each entry is sum of the I and J index at each point\n",
"\n",
"qty_in = Quantity(data=arr, dims=[\"I\", \"J\", \"K\"], units=\"m\", gt4py_backend=backend)"
"qty_in = Quantity(data=arr, dims=[\"I\", \"J\", \"K\"], units=\"m\", backend=backend)"
]
},
{
Expand Down Expand Up @@ -199,7 +199,7 @@
"outputs": [],
"source": [
"qty_out = Quantity(\n",
" data=np.zeros([nx, ny, nz]), dims=[\"I\", \"J\", \"K\"], units=\"m\", gt4py_backend=backend\n",
" data=np.zeros([nx, ny, nz]), dims=[\"I\", \"J\", \"K\"], units=\"m\", backend=backend\n",
")\n",
"\n",
"print(\"Plotting values of qty_in at K = 0\")\n",
Expand All @@ -212,7 +212,7 @@
"qty_out.plot_k_level(0)\n",
"\n",
"qty_out = Quantity(\n",
" data=np.zeros([nx, ny, nz]), dims=[\"I\", \"J\", \"K\"], units=\"m\", gt4py_backend=backend\n",
" data=np.zeros([nx, ny, nz]), dims=[\"I\", \"J\", \"K\"], units=\"m\", backend=backend\n",
")\n",
"\n",
"print(\"Resetting qty_out to zero...\")\n",
Expand All @@ -224,7 +224,7 @@
"qty_out.plot_k_level(0)\n",
"\n",
"qty_out = Quantity(\n",
" data=np.zeros([nx, ny, nz]), dims=[\"I\", \"J\", \"K\"], units=\"m\", gt4py_backend=backend\n",
" data=np.zeros([nx, ny, nz]), dims=[\"I\", \"J\", \"K\"], units=\"m\", backend=backend\n",
")\n",
"\n",
"print(\"Resetting qty_out to zero...\")\n",
Expand All @@ -238,7 +238,7 @@
"qty_out.plot_k_level(1)\n",
"\n",
"qty_out = Quantity(\n",
" data=np.zeros([nx, ny, nz]), dims=[\"I\", \"J\", \"K\"], units=\"m\", gt4py_backend=backend\n",
" data=np.zeros([nx, ny, nz]), dims=[\"I\", \"J\", \"K\"], units=\"m\", backend=backend\n",
")\n",
"print(\"Resetting qty_out to zero...\")\n",
"print(\"Plotting values of qty_in at K = 0\")\n",
Expand All @@ -251,7 +251,7 @@
"qty_out.plot_k_level(0)\n",
"\n",
"qty_out = Quantity(\n",
" data=np.zeros([nx, ny, nz]), dims=[\"I\", \"J\", \"K\"], units=\"m\", gt4py_backend=backend\n",
" data=np.zeros([nx, ny, nz]), dims=[\"I\", \"J\", \"K\"], units=\"m\", backend=backend\n",
")\n",
"print(\"Resetting qty_out to zero...\")\n",
"print(\"Plotting values of qty_out at K = 0\")\n",
Expand Down Expand Up @@ -294,13 +294,13 @@
"shape = (nx + 2 * nhalo, ny + 2 * nhalo, nz)\n",
"\n",
"qty_out = Quantity(\n",
" data=np.zeros(shape), dims=[\"I\", \"J\", \"K\"], units=\"m\", gt4py_backend=backend\n",
" data=np.zeros(shape), dims=[\"I\", \"J\", \"K\"], units=\"m\", backend=backend\n",
")\n",
"\n",
"arr = np.indices(shape, dtype=float).sum(\n",
" axis=0\n",
") # Value of each entry is sum of the I and J index at each point\n",
"qty_in = Quantity(data=arr, dims=[\"I\", \"J\", \"K\"], units=\"m\", gt4py_backend=backend)\n",
"qty_in = Quantity(data=arr, dims=[\"I\", \"J\", \"K\"], units=\"m\", backend=backend)\n",
"\n",
"print(\"Plotting values of qty_in at K = 0\")\n",
"qty_in.plot_k_level(0)\n",
Expand Down Expand Up @@ -344,7 +344,7 @@
"\n",
"print(\"Resetting qty_out to zeros\")\n",
"qty_out = Quantity(\n",
" data=np.zeros(shape), dims=[\"I\", \"J\", \"K\"], units=\"m\", gt4py_backend=backend\n",
" data=np.zeros(shape), dims=[\"I\", \"J\", \"K\"], units=\"m\", backend=backend\n",
")\n",
"\n",
"print(\"Executing 'copy_downward' with origin=(1, 1, 0), domain=(nx, ny, nz-1)\")\n",
Expand Down Expand Up @@ -401,13 +401,13 @@
"shape = (nx + 2 * nhalo, ny + 2 * nhalo, nz)\n",
"\n",
"qty_out = Quantity(\n",
" data=np.zeros(shape), dims=[\"I\", \"J\", \"K\"], units=\"m\", gt4py_backend=backend\n",
" data=np.zeros(shape), dims=[\"I\", \"J\", \"K\"], units=\"m\", backend=backend\n",
")\n",
"\n",
"arr = np.indices(shape, dtype=float).sum(\n",
" axis=0\n",
") # Value of each entry is sum of the I and J index at each point\n",
"qty_in = Quantity(data=arr, dims=[\"I\", \"J\", \"K\"], units=\"m\", gt4py_backend=backend)\n",
"qty_in = Quantity(data=arr, dims=[\"I\", \"J\", \"K\"], units=\"m\", backend=backend)\n",
"\n",
"\n",
"@stencil(backend=backend)\n",
Expand Down Expand Up @@ -444,13 +444,13 @@
"outputs": [],
"source": [
"qty_out = Quantity(\n",
" data=np.zeros(shape), dims=[\"I\", \"J\", \"K\"], units=\"m\", gt4py_backend=backend\n",
" data=np.zeros(shape), dims=[\"I\", \"J\", \"K\"], units=\"m\", backend=backend\n",
")\n",
"\n",
"arr = np.indices(shape, dtype=float).sum(\n",
" axis=0\n",
") # Value of each entry is sum of the I and J index at each point\n",
"qty_in = Quantity(data=arr, dims=[\"I\", \"J\", \"K\"], units=\"m\", gt4py_backend=backend)\n",
"qty_in = Quantity(data=arr, dims=[\"I\", \"J\", \"K\"], units=\"m\", backend=backend)\n",
"\n",
"print(\"Plotting values of qty_in at K = 0\")\n",
"qty_in.plot_k_level(0)\n",
Expand Down Expand Up @@ -525,13 +525,13 @@
"shape = (nx + 2 * nhalo, ny + 2 * nhalo, nz)\n",
"\n",
"qty_out = Quantity(\n",
" data=np.zeros(shape), dims=[\"I\", \"J\", \"K\"], units=\"m\", gt4py_backend=backend\n",
" data=np.zeros(shape), dims=[\"I\", \"J\", \"K\"], units=\"m\", backend=backend\n",
")\n",
"\n",
"arr = np.indices(shape, dtype=float).sum(\n",
" axis=0\n",
") # Value of each entry is sum of the I and J index at each point\n",
"qty_in = Quantity(data=arr, dims=[\"I\", \"J\", \"K\"], units=\"m\", gt4py_backend=backend)\n",
"qty_in = Quantity(data=arr, dims=[\"I\", \"J\", \"K\"], units=\"m\", backend=backend)\n",
"\n",
"print(\"Plotting values of qty_in at K = 0\")\n",
"qty_in.plot_k_level(0)\n",
Expand All @@ -546,7 +546,7 @@
],
"metadata": {
"kernelspec": {
"display_name": "Python 3 (ipykernel)",
"display_name": ".venv",
"language": "python",
"name": "python3"
},
Expand Down
6 changes: 3 additions & 3 deletions examples/NDSL/02_NDSL_basics.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -133,15 +133,15 @@
"shape = (nx + 2 * nhalo, ny + 2 * nhalo, nz)\n",
"\n",
"qty_out = Quantity(\n",
" data=np.zeros(shape), dims=[\"I\", \"J\", \"K\"], units=\"m\", gt4py_backend=backend\n",
" data=np.zeros(shape), dims=[\"I\", \"J\", \"K\"], units=\"m\", backend=backend\n",
")\n",
"\n",
"\n",
"arr = np.indices(shape, dtype=float).sum(\n",
" axis=0\n",
") # Value of each entry is sum of the I and J index at each point\n",
"\n",
"qty_in = Quantity(data=arr, dims=[\"I\", \"J\", \"K\"], units=\"m\", gt4py_backend=backend)\n",
"qty_in = Quantity(data=arr, dims=[\"I\", \"J\", \"K\"], units=\"m\", backend=backend)\n",
"\n",
"print(\"Plotting qty_in at K = 0\")\n",
"qty_in.plot_k_level(0)\n",
Expand Down Expand Up @@ -224,7 +224,7 @@
"copy_field_offset = CopyFieldOffset(stencil_factory)\n",
"\n",
"qty_out = Quantity(\n",
" data=np.zeros(shape), dims=[\"I\", \"J\", \"K\"], units=\"m\", gt4py_backend=backend\n",
" data=np.zeros(shape), dims=[\"I\", \"J\", \"K\"], units=\"m\", backend=backend\n",
")\n",
"\n",
"print(\"Initialize qty_out to zeros\")"
Expand Down
2 changes: 1 addition & 1 deletion external/gt4py
Submodule gt4py updated 110 files
1 change: 0 additions & 1 deletion mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ nav:
- "decomposition": docstrings/comm/decomposition.md
- "local_comm": docstrings/comm/local_comm.md
- "mpi": docstrings/comm/mpi.md
- "null_comm": docstrings/comm/null_comm.md
- "partitioner": docstrings/comm/partitioner.md
- debug:
- "config": docstrings/debug/config.md
Expand Down
5 changes: 2 additions & 3 deletions ndsl/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
from .comm.communicator import CubedSphereCommunicator, TileCommunicator
from .comm.local_comm import LocalComm
from .comm.mpi import MPIComm
from .comm.null_comm import NullComm
from .comm.partitioner import CubedSpherePartitioner, TilePartitioner
from .constants import ConstantVersions
from .dsl.caches.codepath import FV3CodePath
Expand All @@ -26,7 +25,7 @@
from .performance.collector import NullPerformanceCollector, PerformanceCollector
from .performance.profiler import NullProfiler, Profiler
from .performance.report import Experiment, Report, TimeReport
from .quantity import Local, Quantity, State
from .quantity import Local, LocalState, Quantity, State
from .quantity.field_bundle import FieldBundle, FieldBundleType # Break circular import
from .types import Allocator
from .utils import MetaEnumStr
Expand All @@ -38,7 +37,6 @@
"TileCommunicator",
"LocalComm",
"MPIComm",
"NullComm",
"CubedSpherePartitioner",
"TilePartitioner",
"ConstantVersions",
Expand Down Expand Up @@ -81,6 +79,7 @@
"Allocator",
"MetaEnumStr",
"State",
"LocalState",
"NDSLRuntime",
"Local",
]
19 changes: 15 additions & 4 deletions ndsl/boilerplate.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import warnings

from ndsl import (
CompilationConfig,
DaceConfig,
Expand Down Expand Up @@ -56,9 +58,11 @@ def _get_factories(
if topology == "tile":
mpi_comm = MPIComm()
if mpi_comm.Get_size() != 1:
raise ValueError(
warnings.warn(
"Single tile topology requested with an MPI communicator of size "
f"{mpi_comm.Get_size()} > 1. Re-configure MPI to run on only one rank."
f"{mpi_comm.Get_size()} > 1. Halo exchange will _not_ be done on the cube-sphere.",
category=UserWarning,
stacklevel=2,
)

partitioner = TilePartitioner((1, 1))
Expand All @@ -69,6 +73,7 @@ def _get_factories(
n_halo=nhalo,
layout=partitioner.layout,
tile_partitioner=partitioner,
backend=backend,
)
comm = TileCommunicator(comm=mpi_comm, partitioner=partitioner)
else:
Expand All @@ -82,7 +87,13 @@ def _get_factories(


def get_factories_single_tile_orchestrated(
nx: int, ny: int, nz: int, nhalo: int, backend: str = "dace:cpu"
nx: int,
ny: int,
nz: int,
nhalo: int,
backend: str = "dace:cpu",
*,
orchestration_mode: DaCeOrchestration | None = None,
) -> tuple[StencilFactory, QuantityFactory]:
"""Build the pair of (StencilFactory, QuantityFactory) for orchestrated code on a single tile topology."""

Expand All @@ -95,7 +106,7 @@ def get_factories_single_tile_orchestrated(
nz=nz,
nhalo=nhalo,
backend=backend,
orchestration=DaCeOrchestration.BuildAndRun,
orchestration=orchestration_mode or DaCeOrchestration.BuildAndRun,
topology="tile",
)

Expand Down
Loading