From fb1369b6e7a983e5f787ec44664c06e2ed22fc71 Mon Sep 17 00:00:00 2001 From: Edoardo Paone Date: Mon, 10 Aug 2026 16:39:16 +0200 Subject: [PATCH 1/9] test dace main --- pyproject.toml | 5 ++++- .../program_processors/runners/dace/workflow/common.py | 9 ++------- uv.lock | 6 +++--- 3 files changed, 9 insertions(+), 11 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 6b5a08f78a..e7a293fca7 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -98,7 +98,7 @@ dependencies = [ 'click>=8.0.0', 'cmake>=3.22', 'cytoolz>=1.0.1', - 'dace>=2.0.0a5', + 'dace==2.3.36', 'deepdiff>=8.1.0', 'devtools>=0.6', 'factory-boy>=3.3.3', @@ -471,6 +471,9 @@ url = 'https://gridtools.github.io/pypi/' # Add the uv source below to pull dace from the gridtools index instead of PyPI: [tool.uv.sources] atlas4py = {index = "test.pypi"} +dace = [ + {git = "https://github.com/SPCL/dace", branch = "main"} +] # -- versioningit -- [tool.versioningit] diff --git a/src/gt4py/next/program_processors/runners/dace/workflow/common.py b/src/gt4py/next/program_processors/runners/dace/workflow/common.py index 07f053bbc9..00e2506720 100644 --- a/src/gt4py/next/program_processors/runners/dace/workflow/common.py +++ b/src/gt4py/next/program_processors/runners/dace/workflow/common.py @@ -71,14 +71,9 @@ def set_dace_config( # creating any further sub-folder to compile the SDFG. dace.Config.set("cache", value="single") - # Workaround to disable detection of the CUDA architecture in DaCe, and instead use the one provided by GT4Py. - # TODO(edopao): revisit this workaround once it is possible to disable GPU detection in DaCe. - # (see https://github.com/spcl/dace/pull/2424) + # Disable detection of the CUDA architecture in DaCe, and instead use the one provided by GT4Py. if device_arch := gtx_compilation_common.get_device_arch(): - dace.Config.set( - "compiler.extra_cmake_args", - value=f"-DLOCAL_CUDA_ARCHITECTURES={device_arch}", - ) + dace.Config.set("compiler.cuda.cuda_arch", value=device_arch) # Prevents the implicit change of Memlets to Maps. Instead they should be handled by # `gt4py.next.program_processors.runners.dace.transfromations.gpu_utils.gt_gpu_transform_non_standard_memlet()`. diff --git a/uv.lock b/uv.lock index 2211528abd..d7e7d46252 100644 --- a/uv.lock +++ b/uv.lock @@ -908,11 +908,12 @@ wheels = [ [[package]] name = "dace" version = "2.0.0a5" -source = { registry = "https://pypi.org/simple" } +source = { git = "https://github.com/SPCL/dace?branch=main#b68b9eddd2267f442a9eee17bfa5ee18f61b035e" } dependencies = [ { name = "astunparse" }, { name = "dill" }, { name = "fparser" }, + { name = "ml-dtypes" }, { name = "networkx" }, { name = "numpy" }, { name = "packaging" }, @@ -922,7 +923,6 @@ dependencies = [ { name = "sympy" }, { name = "typing-extensions" }, ] -sdist = { url = "https://files.pythonhosted.org/packages/55/b1/6ecb926fad1efcb99afc9f148493f4bd33a788c3c7079b90ad764e7f56f3/dace-2.0.0a5.tar.gz", hash = "sha256:09d9185c9d0dd663ce00c3cfd11d0c9048f80415db7080d09d109fce0e044a02", size = 6185419, upload-time = "2026-07-23T17:57:33.557Z" } [[package]] name = "debugpy" @@ -1442,7 +1442,7 @@ requires-dist = [ { name = "cupy-cuda13x", marker = "extra == 'cuda13'", specifier = ">=14.0" }, { name = "cupy-rocm-7-0", marker = "extra == 'rocm7'", specifier = ">=14.0" }, { name = "cytoolz", specifier = ">=1.0.1" }, - { name = "dace", specifier = ">=2.0.0a5" }, + { name = "dace", git = "https://github.com/SPCL/dace?branch=main" }, { name = "deepdiff", specifier = ">=8.1.0" }, { name = "devtools", specifier = ">=0.6" }, { name = "factory-boy", specifier = ">=3.3.3" }, From 39591eb7388f21417b4950f9db1151735d0be360 Mon Sep 17 00:00:00 2001 From: Edoardo Paone Date: Wed, 12 Aug 2026 09:55:56 +0200 Subject: [PATCH 2/9] update uv lock --- uv.lock | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/uv.lock b/uv.lock index 1d2a3966ba..47c607a717 100644 --- a/uv.lock +++ b/uv.lock @@ -992,7 +992,7 @@ wheels = [ [[package]] name = "dace" version = "2.0.0a5" -source = { git = "https://github.com/SPCL/dace?branch=main#b68b9eddd2267f442a9eee17bfa5ee18f61b035e" } +source = { git = "https://github.com/SPCL/dace?branch=main#1216e6624900df412e8254263e35d7eaa77424a2" } dependencies = [ { name = "astunparse" }, { name = "dill" }, @@ -1000,6 +1000,7 @@ dependencies = [ { name = "ml-dtypes" }, { name = "networkx" }, { name = "numpy" }, + { name = "ordered-set" }, { name = "packaging" }, { name = "ply" }, { name = "pyreadline", marker = "sys_platform == 'win32' or (extra == 'extra-5-gt4py-cuda12' and extra == 'extra-5-gt4py-jax-cuda13') or (extra == 'extra-5-gt4py-cuda12' and extra == 'extra-5-gt4py-rocm6') or (extra == 'extra-5-gt4py-cuda12' and extra == 'extra-5-gt4py-rocm7') or (extra == 'extra-5-gt4py-jax-cuda13' and extra == 'extra-5-gt4py-rocm6') or (extra == 'extra-5-gt4py-jax-cuda13' and extra == 'extra-5-gt4py-rocm7') or (extra == 'extra-5-gt4py-rocm6' and extra == 'extra-5-gt4py-rocm7')" }, From d46faddd83fd0c935a44e3cebb6f2ab286ec5f51 Mon Sep 17 00:00:00 2001 From: Edoardo Paone Date: Wed, 12 Aug 2026 17:48:33 +0200 Subject: [PATCH 3/9] update uv lock --- uv.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/uv.lock b/uv.lock index 47c607a717..0dc8054c35 100644 --- a/uv.lock +++ b/uv.lock @@ -992,7 +992,7 @@ wheels = [ [[package]] name = "dace" version = "2.0.0a5" -source = { git = "https://github.com/SPCL/dace?branch=main#1216e6624900df412e8254263e35d7eaa77424a2" } +source = { git = "https://github.com/SPCL/dace?branch=main#17ecffef75f73df2a787d9ff52f1acb102e07608" } dependencies = [ { name = "astunparse" }, { name = "dill" }, From 5839ef12ddf064b6d6dbea38ca2ff9d36ecc231e Mon Sep 17 00:00:00 2001 From: Edoardo Paone Date: Thu, 13 Aug 2026 13:26:03 +0200 Subject: [PATCH 4/9] update uv lock --- uv.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/uv.lock b/uv.lock index 0dc8054c35..3bceb1d193 100644 --- a/uv.lock +++ b/uv.lock @@ -992,7 +992,7 @@ wheels = [ [[package]] name = "dace" version = "2.0.0a5" -source = { git = "https://github.com/SPCL/dace?branch=main#17ecffef75f73df2a787d9ff52f1acb102e07608" } +source = { git = "https://github.com/SPCL/dace?branch=main#bc2ddf3ca24acd02f1d08422ea4d822b696d267f" } dependencies = [ { name = "astunparse" }, { name = "dill" }, From d23b086a25713065bfc6001548c45f78d7da83ee Mon Sep 17 00:00:00 2001 From: Edoardo Paone Date: Thu, 13 Aug 2026 14:56:19 +0200 Subject: [PATCH 5/9] enable test verdict in dace-determinism test pipeline --- ci/cscs-ci-dace-determinism.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/ci/cscs-ci-dace-determinism.yml b/ci/cscs-ci-dace-determinism.yml index f9764e2061..6bead3c2e5 100644 --- a/ci/cscs-ci-dace-determinism.yml +++ b/ci/cscs-ci-dace-determinism.yml @@ -64,7 +64,6 @@ build_cscs_amd_rocm: USE_MPI: 0 # TODO(havogt): to workaround the libfabric hook injecting incompatible libraries SLURM_JOB_NUM_NODES: 1 SLURM_TIMELIMIT: 60 - allow_failure: true artifacts: when: always paths: From 6d9c0e2ea17d9db7368b7046f8c4af5889d733e5 Mon Sep 17 00:00:00 2001 From: Edoardo Paone Date: Thu, 13 Aug 2026 14:37:53 +0200 Subject: [PATCH 6/9] fix[next-dace]: fix sorting of edges in gt_data_descriptor_mapping --- .../program_processors/runners/dace/transformations/utils.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/gt4py/next/program_processors/runners/dace/transformations/utils.py b/src/gt4py/next/program_processors/runners/dace/transformations/utils.py index f80809bec5..9ddb308e23 100644 --- a/src/gt4py/next/program_processors/runners/dace/transformations/utils.py +++ b/src/gt4py/next/program_processors/runners/dace/transformations/utils.py @@ -802,7 +802,7 @@ def gt_data_descriptor_mapping( nsdfg: The nested SDFG node we want to process. only_fully_mapped: Only look at the fully mapped data. only_inputs: Only consider the data that are used as inputs. - only_inputs: Only consider the data that are used as outputs. + only_outputs: Only consider the data that are used as outputs. """ assert not (only_inputs and only_outputs) name_mapping: dict[str, str] = {} @@ -829,7 +829,7 @@ def gt_data_descriptor_mapping( oedges = sorted( (oedge for oedge in state.out_edges(nsdfg) if not oedge.data.is_empty()), - key=lambda oedge: iedge.src_conn, + key=lambda oedge: oedge.src_conn, ) for oedge in oedges: data_outside = oedge.data.data From 06595359cb98784d5acd7755979da225b5027bcd Mon Sep 17 00:00:00 2001 From: Edoardo Paone Date: Fri, 14 Aug 2026 12:29:37 +0200 Subject: [PATCH 7/9] pull new dace pypi release --- pyproject.toml | 5 +---- uv.lock | 7 ++++--- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 0b29d26182..571b0ecdbc 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -98,7 +98,7 @@ dependencies = [ 'click>=8.0.0', 'cmake>=3.22', 'cytoolz>=1.0.1', - 'dace==2.3.36', + 'dace>=2.0.0a6', 'deepdiff>=8.1.0', 'devtools>=0.6', 'factory-boy>=3.3.3', @@ -471,9 +471,6 @@ url = 'https://gridtools.github.io/pypi/' # Add the uv source below to pull dace from the gridtools index instead of PyPI: [tool.uv.sources] atlas4py = {index = "test.pypi"} -dace = [ - {git = "https://github.com/SPCL/dace", branch = "main"} -] # -- versioningit -- [tool.versioningit] diff --git a/uv.lock b/uv.lock index 3bceb1d193..f1e2b6bc26 100644 --- a/uv.lock +++ b/uv.lock @@ -991,8 +991,8 @@ wheels = [ [[package]] name = "dace" -version = "2.0.0a5" -source = { git = "https://github.com/SPCL/dace?branch=main#bc2ddf3ca24acd02f1d08422ea4d822b696d267f" } +version = "2.0.0a6" +source = { registry = "https://pypi.org/simple" } dependencies = [ { name = "astunparse" }, { name = "dill" }, @@ -1008,6 +1008,7 @@ dependencies = [ { name = "sympy" }, { name = "typing-extensions" }, ] +sdist = { url = "https://files.pythonhosted.org/packages/ea/f2/31941fed070b22a94a265e612fb9615080a3d5f788273e37be6eadf57042/dace-2.0.0a6.tar.gz", hash = "sha256:d05884911a5f49bc89bf4b90b1aca2c1dc713541c5e0b5c9039cb7b39de24102", size = 6373222, upload-time = "2026-08-14T10:17:41.117Z" } [[package]] name = "debugpy" @@ -1525,7 +1526,7 @@ requires-dist = [ { name = "cupy-cuda13x", marker = "extra == 'cuda13'", specifier = ">=14.0" }, { name = "cupy-rocm-7-0", marker = "extra == 'rocm7'", specifier = ">=14.0" }, { name = "cytoolz", specifier = ">=1.0.1" }, - { name = "dace", git = "https://github.com/SPCL/dace?branch=main" }, + { name = "dace", specifier = ">=2.0.0a6" }, { name = "deepdiff", specifier = ">=8.1.0" }, { name = "devtools", specifier = ">=0.6" }, { name = "factory-boy", specifier = ">=3.3.3" }, From 5a6ca3a816657a9e386b90db2b9e56d84481e7ce Mon Sep 17 00:00:00 2001 From: Edoardo Paone Date: Fri, 14 Aug 2026 12:59:16 +0200 Subject: [PATCH 8/9] edit --- .../next/program_processors/runners/dace/workflow/common.py | 1 + 1 file changed, 1 insertion(+) diff --git a/src/gt4py/next/program_processors/runners/dace/workflow/common.py b/src/gt4py/next/program_processors/runners/dace/workflow/common.py index 0f7b3e453e..0c108313ce 100644 --- a/src/gt4py/next/program_processors/runners/dace/workflow/common.py +++ b/src/gt4py/next/program_processors/runners/dace/workflow/common.py @@ -86,6 +86,7 @@ def set_dace_config( # Disable detection of the CUDA architecture in DaCe, and instead use the one provided by GT4Py. if device_arch := gtx_compilation_common.get_device_arch(): dace.Config.set("compiler.cuda.cuda_arch", value=device_arch) + dace.Config.set("compiler.cuda.hip_arch", value=device_arch) # Prevents the implicit change of Memlets to Maps. Instead they should be handled by # `gt4py.next.program_processors.runners.dace.transfromations.gpu_utils.gt_gpu_transform_non_standard_memlet()`. From f161b9f2714bfd07ecd0fd9ed0ff5dc6ed235f40 Mon Sep 17 00:00:00 2001 From: Edoardo Paone Date: Fri, 14 Aug 2026 16:19:04 +0200 Subject: [PATCH 9/9] keep forward declarations in codegen of cartesian dace backend --- src/gt4py/cartesian/backend/dace_backend.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/gt4py/cartesian/backend/dace_backend.py b/src/gt4py/cartesian/backend/dace_backend.py index 6dacdd08e1..031c8403b5 100644 --- a/src/gt4py/cartesian/backend/dace_backend.py +++ b/src/gt4py/cartesian/backend/dace_backend.py @@ -596,8 +596,6 @@ def keep_line(line: str) -> bool: line = line.strip() if line == '#include "../../include/hash.h"': return False - if line.startswith("DACE_EXPORTED") and line.endswith(");"): - return False if line == "#include ": return False return True