From 62466a5e2e8f1ef7ca6ea521d0993155ad1b73fa Mon Sep 17 00:00:00 2001 From: Phillip Cloud <417981+cpcloud@users.noreply.github.com> Date: Tue, 23 Sep 2025 15:40:28 -0400 Subject: [PATCH 1/4] ci: sync test-matrix --- ci/test-matrix.json | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/ci/test-matrix.json b/ci/test-matrix.json index f9f89bea49..10721659b8 100644 --- a/ci/test-matrix.json +++ b/ci/test-matrix.json @@ -15,6 +15,8 @@ { "ARCH": "amd64", "PY_VER": "3.13", "CUDA_VER": "12.9.1", "LOCAL_CTK": "0", "GPU": "l4", "DRIVER": "latest" }, { "ARCH": "amd64", "PY_VER": "3.13", "CUDA_VER": "13.0.1", "LOCAL_CTK": "1", "GPU": "l4", "DRIVER": "latest" }, { "ARCH": "amd64", "PY_VER": "3.13t", "CUDA_VER": "13.0.1", "LOCAL_CTK": "1", "GPU": "l4", "DRIVER": "latest" }, + { "ARCH": "amd64", "PY_VER": "3.14", "CUDA_VER": "13.0.1", "LOCAL_CTK": "1", "GPU": "l4", "DRIVER": "latest" }, + { "ARCH": "amd64", "PY_VER": "3.14t", "CUDA_VER": "13.0.1", "LOCAL_CTK": "1", "GPU": "l4", "DRIVER": "latest" }, { "ARCH": "arm64", "PY_VER": "3.9", "CUDA_VER": "12.9.1", "LOCAL_CTK": "0", "GPU": "a100", "DRIVER": "latest" }, { "ARCH": "arm64", "PY_VER": "3.9", "CUDA_VER": "13.0.1", "LOCAL_CTK": "1", "GPU": "a100", "DRIVER": "latest" }, { "ARCH": "arm64", "PY_VER": "3.10", "CUDA_VER": "12.9.1", "LOCAL_CTK": "1", "GPU": "a100", "DRIVER": "latest" }, @@ -25,7 +27,9 @@ { "ARCH": "arm64", "PY_VER": "3.12", "CUDA_VER": "13.0.1", "LOCAL_CTK": "0", "GPU": "a100", "DRIVER": "latest" }, { "ARCH": "arm64", "PY_VER": "3.13", "CUDA_VER": "12.9.1", "LOCAL_CTK": "0", "GPU": "a100", "DRIVER": "latest" }, { "ARCH": "arm64", "PY_VER": "3.13", "CUDA_VER": "13.0.1", "LOCAL_CTK": "1", "GPU": "a100", "DRIVER": "latest" }, - { "ARCH": "arm64", "PY_VER": "3.13t", "CUDA_VER": "13.0.1", "LOCAL_CTK": "1", "GPU": "a100", "DRIVER": "latest" } + { "ARCH": "arm64", "PY_VER": "3.13t", "CUDA_VER": "13.0.1", "LOCAL_CTK": "1", "GPU": "a100", "DRIVER": "latest" }, + { "ARCH": "arm64", "PY_VER": "3.14", "CUDA_VER": "13.0.1", "LOCAL_CTK": "1", "GPU": "a100", "DRIVER": "latest" }, + { "ARCH": "arm64", "PY_VER": "3.14t", "CUDA_VER": "13.0.1", "LOCAL_CTK": "1", "GPU": "a100", "DRIVER": "latest" } ], "nightly": [ { "ARCH": "amd64", "PY_VER": "3.9", "CUDA_VER": "11.8.0", "LOCAL_CTK": "0", "GPU": "l4", "DRIVER": "earliest" }, @@ -92,7 +96,11 @@ { "ARCH": "amd64", "PY_VER": "3.13", "CUDA_VER": "13.0.1", "LOCAL_CTK": "0", "GPU": "t4", "DRIVER": "latest" }, { "ARCH": "amd64", "PY_VER": "3.13", "CUDA_VER": "13.0.1", "LOCAL_CTK": "1", "GPU": "l4", "DRIVER": "latest" }, { "ARCH": "amd64", "PY_VER": "3.13t", "CUDA_VER": "13.0.1", "LOCAL_CTK": "0", "GPU": "t4", "DRIVER": "latest" }, - { "ARCH": "amd64", "PY_VER": "3.13t", "CUDA_VER": "13.0.1", "LOCAL_CTK": "1", "GPU": "l4", "DRIVER": "latest" } + { "ARCH": "amd64", "PY_VER": "3.13t", "CUDA_VER": "13.0.1", "LOCAL_CTK": "1", "GPU": "l4", "DRIVER": "latest" }, + { "ARCH": "amd64", "PY_VER": "3.14", "CUDA_VER": "13.0.1", "LOCAL_CTK": "0", "GPU": "t4", "DRIVER": "latest" }, + { "ARCH": "amd64", "PY_VER": "3.14", "CUDA_VER": "13.0.1", "LOCAL_CTK": "1", "GPU": "l4", "DRIVER": "latest" }, + { "ARCH": "amd64", "PY_VER": "3.14t", "CUDA_VER": "13.0.1", "LOCAL_CTK": "0", "GPU": "t4", "DRIVER": "latest" }, + { "ARCH": "amd64", "PY_VER": "3.14t", "CUDA_VER": "13.0.1", "LOCAL_CTK": "1", "GPU": "l4", "DRIVER": "latest" } ], "nightly": [ { "ARCH": "amd64", "PY_VER": "3.12", "CUDA_VER": "11.8.0", "LOCAL_CTK": "0", "GPU": "l4", "DRIVER": "latest" }, From 53eaf7a9ac48f338e7c17848df76a94c798a348e Mon Sep 17 00:00:00 2001 From: Phillip Cloud <417981+cpcloud@users.noreply.github.com> Date: Tue, 23 Sep 2025 15:44:46 -0400 Subject: [PATCH 2/4] ci: backport free-threading builds --- ci/test-matrix.json | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/ci/test-matrix.json b/ci/test-matrix.json index 10721659b8..10c6f0e050 100644 --- a/ci/test-matrix.json +++ b/ci/test-matrix.json @@ -14,8 +14,10 @@ { "ARCH": "amd64", "PY_VER": "3.12", "CUDA_VER": "13.0.1", "LOCAL_CTK": "0", "GPU": "l4", "DRIVER": "latest" }, { "ARCH": "amd64", "PY_VER": "3.13", "CUDA_VER": "12.9.1", "LOCAL_CTK": "0", "GPU": "l4", "DRIVER": "latest" }, { "ARCH": "amd64", "PY_VER": "3.13", "CUDA_VER": "13.0.1", "LOCAL_CTK": "1", "GPU": "l4", "DRIVER": "latest" }, + { "ARCH": "amd64", "PY_VER": "3.13t", "CUDA_VER": "12.9.1", "LOCAL_CTK": "1", "GPU": "l4", "DRIVER": "latest" }, { "ARCH": "amd64", "PY_VER": "3.13t", "CUDA_VER": "13.0.1", "LOCAL_CTK": "1", "GPU": "l4", "DRIVER": "latest" }, { "ARCH": "amd64", "PY_VER": "3.14", "CUDA_VER": "13.0.1", "LOCAL_CTK": "1", "GPU": "l4", "DRIVER": "latest" }, + { "ARCH": "amd64", "PY_VER": "3.14t", "CUDA_VER": "12.9.1", "LOCAL_CTK": "1", "GPU": "l4", "DRIVER": "latest" }, { "ARCH": "amd64", "PY_VER": "3.14t", "CUDA_VER": "13.0.1", "LOCAL_CTK": "1", "GPU": "l4", "DRIVER": "latest" }, { "ARCH": "arm64", "PY_VER": "3.9", "CUDA_VER": "12.9.1", "LOCAL_CTK": "0", "GPU": "a100", "DRIVER": "latest" }, { "ARCH": "arm64", "PY_VER": "3.9", "CUDA_VER": "13.0.1", "LOCAL_CTK": "1", "GPU": "a100", "DRIVER": "latest" }, @@ -27,8 +29,10 @@ { "ARCH": "arm64", "PY_VER": "3.12", "CUDA_VER": "13.0.1", "LOCAL_CTK": "0", "GPU": "a100", "DRIVER": "latest" }, { "ARCH": "arm64", "PY_VER": "3.13", "CUDA_VER": "12.9.1", "LOCAL_CTK": "0", "GPU": "a100", "DRIVER": "latest" }, { "ARCH": "arm64", "PY_VER": "3.13", "CUDA_VER": "13.0.1", "LOCAL_CTK": "1", "GPU": "a100", "DRIVER": "latest" }, + { "ARCH": "arm64", "PY_VER": "3.13t", "CUDA_VER": "12.9.1", "LOCAL_CTK": "1", "GPU": "a100", "DRIVER": "latest" }, { "ARCH": "arm64", "PY_VER": "3.13t", "CUDA_VER": "13.0.1", "LOCAL_CTK": "1", "GPU": "a100", "DRIVER": "latest" }, { "ARCH": "arm64", "PY_VER": "3.14", "CUDA_VER": "13.0.1", "LOCAL_CTK": "1", "GPU": "a100", "DRIVER": "latest" }, + { "ARCH": "arm64", "PY_VER": "3.14t", "CUDA_VER": "12.9.1", "LOCAL_CTK": "1", "GPU": "a100", "DRIVER": "latest" }, { "ARCH": "arm64", "PY_VER": "3.14t", "CUDA_VER": "13.0.1", "LOCAL_CTK": "1", "GPU": "a100", "DRIVER": "latest" } ], "nightly": [ @@ -95,10 +99,14 @@ { "ARCH": "amd64", "PY_VER": "3.12", "CUDA_VER": "12.9.1", "LOCAL_CTK": "1", "GPU": "t4", "DRIVER": "latest" }, { "ARCH": "amd64", "PY_VER": "3.13", "CUDA_VER": "13.0.1", "LOCAL_CTK": "0", "GPU": "t4", "DRIVER": "latest" }, { "ARCH": "amd64", "PY_VER": "3.13", "CUDA_VER": "13.0.1", "LOCAL_CTK": "1", "GPU": "l4", "DRIVER": "latest" }, + { "ARCH": "amd64", "PY_VER": "3.13t", "CUDA_VER": "12.8.1", "LOCAL_CTK": "0", "GPU": "t4", "DRIVER": "latest" }, + { "ARCH": "amd64", "PY_VER": "3.13t", "CUDA_VER": "12.9.1", "LOCAL_CTK": "1", "GPU": "l4", "DRIVER": "latest" }, { "ARCH": "amd64", "PY_VER": "3.13t", "CUDA_VER": "13.0.1", "LOCAL_CTK": "0", "GPU": "t4", "DRIVER": "latest" }, { "ARCH": "amd64", "PY_VER": "3.13t", "CUDA_VER": "13.0.1", "LOCAL_CTK": "1", "GPU": "l4", "DRIVER": "latest" }, { "ARCH": "amd64", "PY_VER": "3.14", "CUDA_VER": "13.0.1", "LOCAL_CTK": "0", "GPU": "t4", "DRIVER": "latest" }, { "ARCH": "amd64", "PY_VER": "3.14", "CUDA_VER": "13.0.1", "LOCAL_CTK": "1", "GPU": "l4", "DRIVER": "latest" }, + { "ARCH": "amd64", "PY_VER": "3.14t", "CUDA_VER": "12.9.1", "LOCAL_CTK": "0", "GPU": "t4", "DRIVER": "latest" }, + { "ARCH": "amd64", "PY_VER": "3.14t", "CUDA_VER": "12.9.1", "LOCAL_CTK": "1", "GPU": "l4", "DRIVER": "latest" }, { "ARCH": "amd64", "PY_VER": "3.14t", "CUDA_VER": "13.0.1", "LOCAL_CTK": "0", "GPU": "t4", "DRIVER": "latest" }, { "ARCH": "amd64", "PY_VER": "3.14t", "CUDA_VER": "13.0.1", "LOCAL_CTK": "1", "GPU": "l4", "DRIVER": "latest" } ], From 76a5fcb969989272bd6ae9f3faed5b2960a7690d Mon Sep 17 00:00:00 2001 From: Phillip Cloud <417981+cpcloud@users.noreply.github.com> Date: Tue, 23 Sep 2025 15:46:56 -0400 Subject: [PATCH 3/4] chore: backport pyproject.toml files --- cuda_bindings/pyproject.toml | 37 +++++++++++++++++++++++++----------- cuda_core/pyproject.toml | 34 +++++++++++++++++++++++++++------ 2 files changed, 54 insertions(+), 17 deletions(-) diff --git a/cuda_bindings/pyproject.toml b/cuda_bindings/pyproject.toml index 4ef63b6ab6..31994f2ce6 100644 --- a/cuda_bindings/pyproject.toml +++ b/cuda_bindings/pyproject.toml @@ -2,7 +2,7 @@ # SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE [build-system] -requires = ["setuptools>=77.0.0", "cython>=3.0,<3.1.0", "pyclibrary>=0.1.7"] +requires = ["setuptools>=77.0.0", "cython>=3.1,<3.2", "pyclibrary>=0.1.7"] build-backend = "setuptools.build_meta" [project] @@ -28,19 +28,16 @@ dynamic = [ ] dependencies = [ "cuda-pathfinder ~=1.1", - "pywin32; sys_platform == 'win32'", ] [project.optional-dependencies] all = [ - "nvidia-cuda-nvcc-cu12", - "nvidia-cuda-nvrtc-cu12", - "nvidia-nvjitlink-cu12>=12.3", - "nvidia-cufile-cu12; sys_platform == 'linux'", + "cuda-toolkit[nvrtc,nvjitlink,nvvm]==13.*", + "cuda-toolkit[cufile]==13.*; sys_platform == 'linux'", ] test = [ - "cython>=3.0,<3.1.0", + "cython>=3.1,<3.2", "setuptools>=77.0.0", "numpy>=1.21.1", "pytest>=6.2.4", @@ -85,9 +82,9 @@ select = [ ] ignore = [ - "UP007", + "UP007", "E741", # ambiguous variable name such as I - "B007", # rename unsued loop variable to _name + "B007", # rename unsued loop variable to _name "UP035" # UP006, UP007, UP035 complain about deprecated Typing. use, but disregard backward compatibility of python version ] @@ -103,13 +100,31 @@ exclude = ["cuda/bindings/_version.py"] ] "tests/**/*" = [ - "E722", + "E722", "UP022", "E402", # module level import not at top of file "F841"] # F841 complains about unused variables, but some assignments have side-effects that could be useful for tests (func calls for example) "benchmarks/**/*" = [ - "E722", + "E722", "UP022", "E402", # module level import not at top of file "F841"] # F841 complains about unused variables, but some assignments have side-effects that could be useful for tests (func calls for example) + +[tool.cibuildwheel] +skip = "*-musllinux_*" +enable = "cpython-freethreading" +build-verbosity = 1 +environment-pass = ["CUDA_PATH", "CUDA_PYTHON_PARALLEL_LEVEL"] + +[tool.cibuildwheel.linux] +archs = "native" +# CIBW mounts the host filesystem under /host +environment-pass = ["CUDA_PATH"] +environment = { CUDA_HOME = "/host/$CUDA_PATH" } + +[tool.cibuildwheel.windows] +archs = "AMD64" +before-build = "pip install delvewheel" +repair-wheel-command = "delvewheel repair --namespace-pkg cuda -w {dest_dir} {wheel}" +environment = { CUDA_HOME = "$(cygpath -w $CUDA_PATH)" } diff --git a/cuda_core/pyproject.toml b/cuda_core/pyproject.toml index ed2f8aa992..5f71c8a8cb 100644 --- a/cuda_core/pyproject.toml +++ b/cuda_core/pyproject.toml @@ -3,7 +3,7 @@ # SPDX-License-Identifier: Apache-2.0 [build-system] -requires = ["setuptools>=77.0.0", "Cython>=3.0"] +requires = ["setuptools>=77.0.0", "Cython>=3.1"] build-backend = "setuptools.build_meta" @@ -48,9 +48,17 @@ dependencies = [ [project.optional-dependencies] cu11 = ["cuda-bindings[all]==11.8.*"] cu12 = ["cuda-bindings[all]==12.*"] -test = ["cython>=3.0", "setuptools", "pytest>=6.2.4"] -test-cu11 = ["cuda-core[test]", "cupy-cuda11x", "nvidia-cuda-runtime-cu11"] # runtime headers needed by CuPy -test-cu12 = ["cuda-core[test]", "cupy-cuda12x", "nvidia-cuda-runtime-cu12"] # runtime headers needed by CuPy +cu13 = ["cuda-bindings[all]==13.*"] +# TODO: these should all be in development dependencies; optional dependencies +# are for features exposed to *users*, not a dumping ground for all tooling +# needed to build and test the project +test = ["cython>=3.1", "setuptools", "pytest>=6.2.4"] +test-cu11 = ["cuda-core[test]", "cupy-cuda11x; python_version < '3.14'", "cuda-toolkit[cudart]==11.*"] # runtime headers needed by CuPy +test-cu12 = ["cuda-core[test]", "cupy-cuda12x; python_version < '3.14'", "cuda-toolkit[cudart]==12.*"] # runtime headers needed by CuPy +test-cu13 = ["cuda-core[test]", "cupy-cuda13x; python_version < '3.14'", "cuda-toolkit[cudart]==13.*"] # runtime headers needed by CuPy +# free threaded build, cupy doesn't support free-threaded builds yet, so avoid installing it for now +# TODO: cupy should support free threaded builds +test-cu13-ft = ["cuda-core[test]", "cuda-toolkit[cudart]==13.*"] [project.urls] homepage = "https://nvidia.github.io/cuda-python/" @@ -95,9 +103,9 @@ select = [ ] ignore = [ - "UP007", + "UP007", "E741", # ambiguous variable name such as I - "B007", # rename unsued loop variable to _name + "B007", # rename unsued loop variable to _name "UP035" # UP006, UP007, UP035 complain about deprecated Typing. use, but disregard backward compatibility of python version ] @@ -106,3 +114,17 @@ exclude = ["cuda/core/_version.py"] [tool.ruff.lint.per-file-ignores] "__init__.py" = ["F401"] "setup.py" = ["F401"] + +[tool.cibuildwheel] +skip = "*-musllinux_*" +enable = "cpython-freethreading" +build-verbosity = 1 +environment-pass = ["CUDA_PYTHON_PARALLEL_LEVEL"] + +[tool.cibuildwheel.linux] +archs = "native" + +[tool.cibuildwheel.windows] +archs = "AMD64" +before-build = "pip install delvewheel" +repair-wheel-command = "delvewheel repair --namespace-pkg cuda -w {dest_dir} {wheel}" From 08c5d92b71f6406332faef825c8f4535fdd71af5 Mon Sep 17 00:00:00 2001 From: Phillip Cloud <417981+cpcloud@users.noreply.github.com> Date: Tue, 23 Sep 2025 15:47:03 -0400 Subject: [PATCH 4/4] chore: backport ci scripts --- ci/tools/env-vars | 38 +++++++++++++++++++++++--------------- ci/tools/run-tests | 19 +++++++++++++++---- 2 files changed, 38 insertions(+), 19 deletions(-) diff --git a/ci/tools/env-vars b/ci/tools/env-vars index 3dcb81a4c0..de4a5a6b9a 100755 --- a/ci/tools/env-vars +++ b/ci/tools/env-vars @@ -16,12 +16,11 @@ if [[ ${#} -ne 1 ]]; then fi PYTHON_VERSION_FORMATTED=$(echo "${PY_VER}" | tr -d '.') + if [[ "${HOST_PLATFORM}" == linux* ]]; then - CIBW_BUILD="cp${PYTHON_VERSION_FORMATTED}-manylinux*" REPO_DIR=$(pwd) TOOLS_PATH="${REPO_DIR}/ci/tools" elif [[ "${HOST_PLATFORM}" == win* ]]; then - CIBW_BUILD="cp${PYTHON_VERSION_FORMATTED}-win_amd64" PWD=$(pwd) REPO_DIR=$(cygpath -w ${PWD}) TOOLS_PATH=$(cygpath -w ${PWD}/ci/tools) @@ -30,14 +29,18 @@ fi echo "${TOOLS_PATH}" >> $GITHUB_PATH echo "CUDA_PYTHON_PARALLEL_LEVEL=$(nproc)" >> $GITHUB_ENV CUDA_CORE_ARTIFACT_BASENAME="cuda-core-python${PYTHON_VERSION_FORMATTED}-${HOST_PLATFORM}" -echo "CUDA_CORE_ARTIFACT_BASENAME=${CUDA_CORE_ARTIFACT_BASENAME}" >> $GITHUB_ENV -echo "CUDA_CORE_ARTIFACT_NAME=${CUDA_CORE_ARTIFACT_BASENAME}-${SHA}" >> $GITHUB_ENV -echo "CUDA_CORE_ARTIFACTS_DIR=$(realpath "${REPO_DIR}/cuda_core/dist")" >> $GITHUB_ENV -echo "CUDA_CORE_CYTHON_TESTS_DIR=$(realpath "${REPO_DIR}/cuda_core/tests/cython")" >> $GITHUB_ENV -echo "PYTHON_VERSION_FORMATTED=${PYTHON_VERSION_FORMATTED}" >> $GITHUB_ENV +{ + echo "CUDA_CORE_ARTIFACT_BASENAME=${CUDA_CORE_ARTIFACT_BASENAME}" + echo "CUDA_CORE_ARTIFACT_NAME=${CUDA_CORE_ARTIFACT_BASENAME}-${SHA}" + echo "CUDA_CORE_ARTIFACTS_DIR=$(realpath "${REPO_DIR}/cuda_core/dist")" + echo "CUDA_CORE_CYTHON_TESTS_DIR=$(realpath "${REPO_DIR}/cuda_core/tests/cython")" + echo "PYTHON_VERSION_FORMATTED=${PYTHON_VERSION_FORMATTED}" +} >> $GITHUB_ENV if [[ "${1}" == "build" ]]; then - echo "CIBW_BUILD=${CIBW_BUILD}" >> $GITHUB_ENV + # platform is handled by the default value of platform (`auto`) in cibuildwheel + # here we only need to specify the python version we want + echo "CIBW_BUILD=cp${PYTHON_VERSION_FORMATTED}-*" >> $GITHUB_ENV CUDA_BINDINGS_ARTIFACT_BASENAME="cuda-bindings-python${PYTHON_VERSION_FORMATTED}-cuda${CUDA_VER}-${HOST_PLATFORM}" elif [[ "${1}" == "test" ]]; then BUILD_CUDA_MAJOR="$(cut -d '.' -f 1 <<< ${BUILD_CUDA_VER})" @@ -66,12 +69,17 @@ elif [[ "${1}" == "test" ]]; then SETUP_SANITIZER=0 echo "SANITIZER_CMD=" >> $GITHUB_ENV fi - echo "SETUP_SANITIZER=${SETUP_SANITIZER}" >> $GITHUB_ENV - echo "SKIP_CUDA_BINDINGS_TEST=${SKIP_CUDA_BINDINGS_TEST}" >> $GITHUB_ENV - echo "SKIP_CYTHON_TEST=${SKIP_CYTHON_TEST}" >> $GITHUB_ENV + { + echo "SETUP_SANITIZER=${SETUP_SANITIZER}" + echo "SKIP_CUDA_BINDINGS_TEST=${SKIP_CUDA_BINDINGS_TEST}" + echo "SKIP_CYTHON_TEST=${SKIP_CYTHON_TEST}" + echo "TEST_CUDA_MAJOR=${TEST_CUDA_MAJOR}" + } >> $GITHUB_ENV fi -echo "CUDA_BINDINGS_ARTIFACT_BASENAME=${CUDA_BINDINGS_ARTIFACT_BASENAME}" >> $GITHUB_ENV -echo "CUDA_BINDINGS_ARTIFACT_NAME=${CUDA_BINDINGS_ARTIFACT_BASENAME}-${SHA}" >> $GITHUB_ENV -echo "CUDA_BINDINGS_ARTIFACTS_DIR=$(realpath "${REPO_DIR}/cuda_bindings/dist")" >> $GITHUB_ENV -echo "CUDA_BINDINGS_CYTHON_TESTS_DIR=$(realpath "${REPO_DIR}/cuda_bindings/tests/cython")" >> $GITHUB_ENV +{ + echo "CUDA_BINDINGS_ARTIFACT_BASENAME=${CUDA_BINDINGS_ARTIFACT_BASENAME}" + echo "CUDA_BINDINGS_ARTIFACT_NAME=${CUDA_BINDINGS_ARTIFACT_BASENAME}-${SHA}" + echo "CUDA_BINDINGS_ARTIFACTS_DIR=$(realpath "${REPO_DIR}/cuda_bindings/dist")" + echo "CUDA_BINDINGS_CYTHON_TESTS_DIR=$(realpath "${REPO_DIR}/cuda_bindings/tests/cython")" +} >> $GITHUB_ENV diff --git a/ci/tools/run-tests b/ci/tools/run-tests index ad1dbd6a9e..8992dfcedb 100755 --- a/ci/tools/run-tests +++ b/ci/tools/run-tests @@ -31,9 +31,14 @@ popd if [[ "${test_module}" == "pathfinder" ]]; then pushd ./cuda_pathfinder - echo "Running pathfinder tests with ${CUDA_PATHFINDER_TEST_LOAD_NVIDIA_DYNAMIC_LIB_STRICTNESS}" + echo "Running pathfinder tests with " \ + "LD:${CUDA_PATHFINDER_TEST_LOAD_NVIDIA_DYNAMIC_LIB_STRICTNESS} " \ + "FH:${CUDA_PATHFINDER_TEST_FIND_NVIDIA_HEADERS_STRICTNESS}" pwd - pytest -ra -s -v tests/ + pytest -ra -s -v tests/ |& tee /tmp/pathfinder_test_log.txt + # Fail if no "INFO test_" lines are found; capture line count otherwise + line_count=$(grep '^INFO test_' /tmp/pathfinder_test_log.txt | wc -l) + echo "Number of \"INFO test_\" lines: $line_count" popd elif [[ "${test_module}" == "bindings" ]]; then pushd "${CUDA_BINDINGS_ARTIFACTS_DIR}" @@ -75,12 +80,18 @@ elif [[ "${test_module}" == "core" ]]; then echo "Installing core wheel" pwd ls + + FREE_THREADING="" + if python -c 'import sys; assert not sys._is_gil_enabled()' 2> /dev/null; then + FREE_THREADING+="-ft" + fi + if [[ "${LOCAL_CTK}" == 1 ]]; then # We already installed cuda-bindings, and all CTK components exist locally, # so just install the test dependencies. - pip install $(ls *.whl)["test-cu${TEST_CUDA_MAJOR}"] + pip install $(ls *.whl)["test-cu${TEST_CUDA_MAJOR}${FREE_THREADING}"] else - pip install $(ls *.whl)["cu${TEST_CUDA_MAJOR}","test-cu${TEST_CUDA_MAJOR}"] + pip install $(ls *.whl)["cu${TEST_CUDA_MAJOR}","test-cu${TEST_CUDA_MAJOR}${FREE_THREADING}"] fi popd pushd ./cuda_core