From 2c5e28eacc1c917abf6d1ca8c43738818a4b6d9f Mon Sep 17 00:00:00 2001 From: Leo Fang Date: Mon, 17 Nov 2025 18:26:51 -0500 Subject: [PATCH 1/4] avoid triggering module-level delattr --- cuda_core/cuda/core/experimental/__init__.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cuda_core/cuda/core/experimental/__init__.py b/cuda_core/cuda/core/experimental/__init__.py index 94fb0aa083..bb3c6dcf80 100644 --- a/cuda_core/cuda/core/experimental/__init__.py +++ b/cuda_core/cuda/core/experimental/__init__.py @@ -3,11 +3,11 @@ # SPDX-License-Identifier: Apache-2.0 try: - import cuda.bindings + from cuda import bindings except ImportError: raise ImportError("cuda.bindings 12.x or 13.x must be installed") from None else: - cuda_major, cuda_minor = cuda.bindings.__version__.split(".")[:2] + cuda_major, cuda_minor = bindings.__version__.split(".")[:2] if cuda_major not in ("12", "13"): raise ImportError("cuda.bindings 12.x or 13.x must be installed") @@ -24,7 +24,7 @@ else: del versioned_mod finally: - del cuda.bindings, importlib, subdir, cuda_major, cuda_minor + del bindings, importlib, subdir, cuda_major, cuda_minor import sys # noqa: E402 import warnings # noqa: E402 From 58815727ab49b5d54f9ccf49d0aae4b174a6c286 Mon Sep 17 00:00:00 2001 From: Leo Fang Date: Mon, 17 Nov 2025 18:31:40 -0500 Subject: [PATCH 2/4] allow building/testing on release branches --- .github/workflows/ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2cf129deac..b92713c2de 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -15,6 +15,7 @@ on: branches: - "pull-request/[0-9]+" - "main" + - "release/*" jobs: ci-vars: From 72198477e6d8384ae393d624598e71c9467f5811 Mon Sep 17 00:00:00 2001 From: Leo Fang Date: Mon, 17 Nov 2025 14:26:22 -0500 Subject: [PATCH 3/4] use default fetch-depth (1) to accelerate checkout --- .github/workflows/test-wheel-linux.yml | 4 ---- .github/workflows/test-wheel-windows.yml | 4 ---- 2 files changed, 8 deletions(-) diff --git a/.github/workflows/test-wheel-linux.yml b/.github/workflows/test-wheel-linux.yml index 796ab306e2..e823485a77 100644 --- a/.github/workflows/test-wheel-linux.yml +++ b/.github/workflows/test-wheel-linux.yml @@ -36,8 +36,6 @@ jobs: steps: - name: Checkout ${{ github.event.repository.name }} uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 - with: - fetch-depth: 1 - name: Validate Test Type run: | @@ -97,8 +95,6 @@ jobs: - name: Checkout ${{ github.event.repository.name }} uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 - with: - fetch-depth: 0 - name: Setup proxy cache uses: nv-gha-runners/setup-proxy-cache@main diff --git a/.github/workflows/test-wheel-windows.yml b/.github/workflows/test-wheel-windows.yml index 93b81ff0a7..9133170bc4 100644 --- a/.github/workflows/test-wheel-windows.yml +++ b/.github/workflows/test-wheel-windows.yml @@ -34,8 +34,6 @@ jobs: steps: - name: Checkout ${{ github.event.repository.name }} uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 - with: - fetch-depth: 1 - name: Validate Test Type run: | @@ -76,8 +74,6 @@ jobs: steps: - name: Checkout ${{ github.event.repository.name }} uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 - with: - fetch-depth: 0 - name: Setup proxy cache uses: nv-gha-runners/setup-proxy-cache@main From 039ea97722d7a8724cfaea915a8c4fa29938591f Mon Sep 17 00:00:00 2001 From: Michael Droettboom Date: Wed, 12 Nov 2025 16:26:52 -0500 Subject: [PATCH 4/4] Fix #1051: Make _graph.py compatible with cuda-python==12.6.* and fix tests --- cuda_core/cuda/core/experimental/_graph.py | 5 ++++- cuda_core/tests/test_graph.py | 8 ++++---- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/cuda_core/cuda/core/experimental/_graph.py b/cuda_core/cuda/core/experimental/_graph.py index b8ebe9ae52..a82bd70f55 100644 --- a/cuda_core/cuda/core/experimental/_graph.py +++ b/cuda_core/cuda/core/experimental/_graph.py @@ -318,7 +318,10 @@ def complete(self, options: GraphCompleteOptions | None = None) -> Graph: raise RuntimeError( "Instantiation for device launch failed due to the nodes belonging to different contexts." ) - elif params.result_out == driver.CUgraphInstantiateResult.CUDA_GRAPH_INSTANTIATE_CONDITIONAL_HANDLE_UNUSED: + elif ( + _py_major_minor >= (12, 8) + and params.result_out == driver.CUgraphInstantiateResult.CUDA_GRAPH_INSTANTIATE_CONDITIONAL_HANDLE_UNUSED + ): raise RuntimeError("One or more conditional handles are not associated with conditional builders.") elif params.result_out != driver.CUgraphInstantiateResult.CUDA_GRAPH_INSTANTIATE_SUCCESS: raise RuntimeError(f"Graph instantiation failed with unexpected error code: {params.result_out}") diff --git a/cuda_core/tests/test_graph.py b/cuda_core/tests/test_graph.py index cc558b6d22..615f7242c4 100644 --- a/cuda_core/tests/test_graph.py +++ b/cuda_core/tests/test_graph.py @@ -304,7 +304,7 @@ def test_graph_conditional_if_else(init_cuda, condition_value): try: gb_if, gb_else = gb.if_else(handle) except RuntimeError as e: - with pytest.raises(RuntimeError, match="^Driver version"): + with pytest.raises(RuntimeError, match="^(Driver|Binding) version"): raise e gb.end_building() b.close() @@ -377,7 +377,7 @@ def test_graph_conditional_switch(init_cuda, condition_value): try: gb_case = list(gb.switch(handle, 3)) except RuntimeError as e: - with pytest.raises(RuntimeError, match="^Driver version"): + with pytest.raises(RuntimeError, match="^(Driver|Binding) version"): raise e gb.end_building() b.close() @@ -568,7 +568,7 @@ def build_graph(condition_value): try: gb_case = list(gb.switch(handle, 3)) except Exception as e: - with pytest.raises(RuntimeError, match="^Driver version"): + with pytest.raises(RuntimeError, match="^(Driver|Binding) version"): raise e gb.end_building() raise e @@ -599,7 +599,7 @@ def build_graph(condition_value): try: graph_variants = [build_graph(0), build_graph(1), build_graph(2)] except Exception as e: - with pytest.raises(RuntimeError, match="^Driver version"): + with pytest.raises(RuntimeError, match="^(Driver|Binding) version"): raise e b.close() pytest.skip("Driver does not support conditional switch")