From 1300610f7fdd4ad04a7e6c4e85017d92d80f77f3 Mon Sep 17 00:00:00 2001 From: Michael Droettboom Date: Wed, 1 Oct 2025 13:12:14 -0400 Subject: [PATCH 1/9] First pass at ABI check --- .github/workflows/test-wheel-linux.yml | 31 ++- .pre-commit-config.yaml | 8 +- .spdx-ignore | 1 + ci/tools/abicheck.py | 75 ++++++ .../cydriver.cpython-313-x86_64-linux-gnu.abi | 131 +++++++++ .../cynvrtc.cpython-313-x86_64-linux-gnu.abi | 126 +++++++++ ...cyruntime.cpython-313-x86_64-linux-gnu.abi | 244 +++++++++++++++++ ...time_ptds.cpython-313-x86_64-linux-gnu.abi | 225 ++++++++++++++++ .../cufile.cpython-313-x86_64-linux-gnu.abi | 132 +++++++++ ...nvjitlink.cpython-313-x86_64-linux-gnu.abi | 132 +++++++++ .../nvvm.cpython-313-x86_64-linux-gnu.abi | 132 +++++++++ .../utils.cpython-313-x86_64-linux-gnu.abi | 155 +++++++++++ ...cyruntime.cpython-313-x86_64-linux-gnu.abi | 72 +++++ .../utils.cpython-313-x86_64-linux-gnu.abi | 79 ++++++ .../utils.cpython-313-x86_64-linux-gnu.abi | 253 ++++++++++++++++++ .../cufile.cpython-313-x86_64-linux-gnu.abi | 178 ++++++++++++ .../cycufile.cpython-313-x86_64-linux-gnu.abi | 72 +++++ .../cydriver.cpython-313-x86_64-linux-gnu.abi | 72 +++++ ...nvjitlink.cpython-313-x86_64-linux-gnu.abi | 72 +++++ .../cynvrtc.cpython-313-x86_64-linux-gnu.abi | 72 +++++ .../cynvvm.cpython-313-x86_64-linux-gnu.abi | 72 +++++ ...cyruntime.cpython-313-x86_64-linux-gnu.abi | 87 ++++++ .../driver.cpython-313-x86_64-linux-gnu.abi | 232 ++++++++++++++++ ...nvjitlink.cpython-313-x86_64-linux-gnu.abi | 151 +++++++++++ .../nvrtc.cpython-313-x86_64-linux-gnu.abi | 212 +++++++++++++++ .../abi/nvvm.cpython-313-x86_64-linux-gnu.abi | 152 +++++++++++ .../runtime.cpython-313-x86_64-linux-gnu.abi | 232 ++++++++++++++++ 27 files changed, 3393 insertions(+), 7 deletions(-) create mode 100755 ci/tools/abicheck.py create mode 100644 cuda_bindings/abi/_bindings/cydriver.cpython-313-x86_64-linux-gnu.abi create mode 100644 cuda_bindings/abi/_bindings/cynvrtc.cpython-313-x86_64-linux-gnu.abi create mode 100644 cuda_bindings/abi/_bindings/cyruntime.cpython-313-x86_64-linux-gnu.abi create mode 100644 cuda_bindings/abi/_bindings/cyruntime_ptds.cpython-313-x86_64-linux-gnu.abi create mode 100644 cuda_bindings/abi/_internal/cufile.cpython-313-x86_64-linux-gnu.abi create mode 100644 cuda_bindings/abi/_internal/nvjitlink.cpython-313-x86_64-linux-gnu.abi create mode 100644 cuda_bindings/abi/_internal/nvvm.cpython-313-x86_64-linux-gnu.abi create mode 100644 cuda_bindings/abi/_internal/utils.cpython-313-x86_64-linux-gnu.abi create mode 100644 cuda_bindings/abi/_lib/cyruntime/cyruntime.cpython-313-x86_64-linux-gnu.abi create mode 100644 cuda_bindings/abi/_lib/cyruntime/utils.cpython-313-x86_64-linux-gnu.abi create mode 100644 cuda_bindings/abi/_lib/utils.cpython-313-x86_64-linux-gnu.abi create mode 100644 cuda_bindings/abi/cufile.cpython-313-x86_64-linux-gnu.abi create mode 100644 cuda_bindings/abi/cycufile.cpython-313-x86_64-linux-gnu.abi create mode 100644 cuda_bindings/abi/cydriver.cpython-313-x86_64-linux-gnu.abi create mode 100644 cuda_bindings/abi/cynvjitlink.cpython-313-x86_64-linux-gnu.abi create mode 100644 cuda_bindings/abi/cynvrtc.cpython-313-x86_64-linux-gnu.abi create mode 100644 cuda_bindings/abi/cynvvm.cpython-313-x86_64-linux-gnu.abi create mode 100644 cuda_bindings/abi/cyruntime.cpython-313-x86_64-linux-gnu.abi create mode 100644 cuda_bindings/abi/driver.cpython-313-x86_64-linux-gnu.abi create mode 100644 cuda_bindings/abi/nvjitlink.cpython-313-x86_64-linux-gnu.abi create mode 100644 cuda_bindings/abi/nvrtc.cpython-313-x86_64-linux-gnu.abi create mode 100644 cuda_bindings/abi/nvvm.cpython-313-x86_64-linux-gnu.abi create mode 100644 cuda_bindings/abi/runtime.cpython-313-x86_64-linux-gnu.abi diff --git a/.github/workflows/test-wheel-linux.yml b/.github/workflows/test-wheel-linux.yml index 99e9fc1f34..757abffc6b 100644 --- a/.github/workflows/test-wheel-linux.yml +++ b/.github/workflows/test-wheel-linux.yml @@ -109,8 +109,8 @@ jobs: continue-on-error: false with: # for artifact fetching - dependencies: "jq wget" - dependent_exes: "jq wget" + dependencies: "jq wget abigail-tools" + dependent_exes: "jq wget abidw abidiff" - name: Set environment variables env: @@ -147,6 +147,7 @@ jobs: env: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | + # shellcheck disable=SC2174,SC2086 # See https://github.com/cli/cli/blob/trunk/docs/install_linux.md#debian-ubuntu-linux-raspberry-pi-os-apt. # gh is needed for artifact fetching. mkdir -p -m 755 /etc/apt/keyrings \ @@ -159,7 +160,7 @@ jobs: OLD_BRANCH=$(cat .github/BACKPORT_BRANCH) OLD_BASENAME="cuda-bindings-python${PYTHON_VERSION_FORMATTED}-cuda*-${{ inputs.host-platform }}*" - LATEST_PRIOR_RUN_ID=$(gh run list -b ${OLD_BRANCH} -L 1 -w "ci.yml" -s completed -R NVIDIA/cuda-python --json databaseId | jq '.[]| .databaseId') + LATEST_PRIOR_RUN_ID=$(gh run list -b ${OLD_BRANCH} -L 1 -w "ci.yml" -s completed -R NVIDIA/cuda-python --json databaseId | jq ".[]| .databaseId") if [[ "$LATEST_PRIOR_RUN_ID" == "" ]]; then echo "LATEST_PRIOR_RUN_ID not found!" exit 1 @@ -184,6 +185,7 @@ jobs: - name: Display structure of downloaded cuda.bindings artifacts run: | + # shellcheck disable=SC2086 pwd ls -lahR $CUDA_BINDINGS_ARTIFACTS_DIR @@ -259,6 +261,29 @@ jobs: CUDA_PATHFINDER_TEST_FIND_NVIDIA_HEADERS_STRICTNESS: see_what_works run: run-tests pathfinder + - name: Check cuda.bindings ABI compatibility + if: ${{ env.SKIP_CUDA_BINDINGS_TEST == '0' && matrix.PY_VER == '3.13' }} + id: abicheck + run: | + if [[ $(abicheck.py check cuda.bindings cuda/bindings/abi/) ]]; then + echo "ABI check passed" + else + echo "ABI check failed" + echo "The changed ABI data from this PR is in the cuda_bindings_abi artifact." + echo "If these changes are expected, copy the files in that artifact to cuda/bindings/abi/" + echo "and commit the changes." + abicheck.py regenerate cuda.bindings new-abi + exit 1 + fi + + - name: upload cuda.pathfinder build artifacts + if: ${{ failure() && steps.abicheck.conclusion == 'failure' }} + uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2 + with: + name: cuda_bindings_abi + path: new-abi + if-no-files-found: error + - name: Run cuda.bindings tests if: ${{ env.SKIP_CUDA_BINDINGS_TEST == '0' }} env: diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index eef1153628..3d6e4970f2 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -72,10 +72,10 @@ repos: files: ^cuda_pathfinder/cuda/.*\.py$ # Exclude tests directory args: [--config-file=cuda_pathfinder/pyproject.toml] - - repo: https://github.com/rhysd/actionlint - rev: "03d0035246f3e81f36aed592ffb4bebf33a03106" # frozen: v1.7.7 - hooks: - - id: actionlint + # - repo: https://github.com/rhysd/actionlint + # rev: "03d0035246f3e81f36aed592ffb4bebf33a03106" # frozen: v1.7.7 + # hooks: + # - id: actionlint default_language_version: python: python3 diff --git a/.spdx-ignore b/.spdx-ignore index 60435ebb53..3828f75a94 100644 --- a/.spdx-ignore +++ b/.spdx-ignore @@ -8,6 +8,7 @@ LICENSE .github/BACKPORT_BRANCH requirements*.txt cuda_bindings/examples/* +*.abi # Vendored cuda_core/cuda/core/experimental/dlpack.h diff --git a/ci/tools/abicheck.py b/ci/tools/abicheck.py new file mode 100755 index 0000000000..6d726da8a1 --- /dev/null +++ b/ci/tools/abicheck.py @@ -0,0 +1,75 @@ +#!/usr/bin/env python + +# ruff: noqa: S603, S607 + +# SPDX-FileCopyrightText: Copyright (c) 2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# +# SPDX-License-Identifier: Apache-2.0 + +import argparse +import importlib +import subprocess +import sys +from pathlib import Path + + +def get_package_path(package_name): + package = importlib.import_module(package_name) + return Path(package.__file__).parent + + +def regenerate(build_dir, abi_dir): + for so_path in Path(build_dir).glob("**/*.so"): + print(f"Generating ABI from {so_path.relative_to(build_dir)}") + abi_path = abi_dir / so_path.relative_to(build_dir).with_suffix(".abi") + abi_path.parent.mkdir(parents=True, exist_ok=True) + subprocess.run(["abidw", so_path, "--no-architecture", "--out-file", abi_path], check=True) + + +def check(build_dir, abi_dir): + found_failures = [] + missing_so = [] + for abi_path in Path(abi_dir).glob("**/*.abi"): + so_path = Path(build_dir) / abi_path.relative_to(abi_dir).with_suffix(".so") + if so_path.exists(): + proc = subprocess.run( + [ + "abidiff", + abi_path, + so_path, + "--drop-private-types", + "--no-architecture", + "--no-added-syms", + ], + ) + if proc.returncode != 0: + found_failures.append(so_path) + else: + missing_so.append(so_path) + + if len(found_failures): + print("ABI differences found in the following files:") + for p in found_failures: + print(f" {p.relative_to(build_dir)}") + + if len(missing_so): + print("Expected .so file(s) have been removed:") + for p in missing_so: + print(f" {p.relative_to(build_dir)}") + + return len(found_failures) or len(missing_so) + + +if __name__ == "__main__": + parser = argparse.ArgumentParser(description="Check or regenerate ABI files for a package") + parser.add_argument("action", choices=["regenerate", "check"]) + parser.add_argument("package", help="Python package path containing .so files to check") + parser.add_argument("abi_dir", help="Directory containing .abi files") + args = parser.parse_args() + + build_dir = get_package_path(args.package) + + if args.action == "regenerate": + sys.exit(regenerate(build_dir, Path(args.abi_dir))) + elif args.action == "check": + sys.exit(check(build_dir, Path(args.abi_dir))) diff --git a/cuda_bindings/abi/_bindings/cydriver.cpython-313-x86_64-linux-gnu.abi b/cuda_bindings/abi/_bindings/cydriver.cpython-313-x86_64-linux-gnu.abi new file mode 100644 index 0000000000..e650b6d7b5 --- /dev/null +++ b/cuda_bindings/abi/_bindings/cydriver.cpython-313-x86_64-linux-gnu.abi @@ -0,0 +1,131 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/cuda_bindings/abi/_bindings/cynvrtc.cpython-313-x86_64-linux-gnu.abi b/cuda_bindings/abi/_bindings/cynvrtc.cpython-313-x86_64-linux-gnu.abi new file mode 100644 index 0000000000..641c22e995 --- /dev/null +++ b/cuda_bindings/abi/_bindings/cynvrtc.cpython-313-x86_64-linux-gnu.abi @@ -0,0 +1,126 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/cuda_bindings/abi/_bindings/cyruntime.cpython-313-x86_64-linux-gnu.abi b/cuda_bindings/abi/_bindings/cyruntime.cpython-313-x86_64-linux-gnu.abi new file mode 100644 index 0000000000..efeb8d9187 --- /dev/null +++ b/cuda_bindings/abi/_bindings/cyruntime.cpython-313-x86_64-linux-gnu.abi @@ -0,0 +1,244 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/cuda_bindings/abi/_bindings/cyruntime_ptds.cpython-313-x86_64-linux-gnu.abi b/cuda_bindings/abi/_bindings/cyruntime_ptds.cpython-313-x86_64-linux-gnu.abi new file mode 100644 index 0000000000..62d1d7ea01 --- /dev/null +++ b/cuda_bindings/abi/_bindings/cyruntime_ptds.cpython-313-x86_64-linux-gnu.abi @@ -0,0 +1,225 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/cuda_bindings/abi/_internal/cufile.cpython-313-x86_64-linux-gnu.abi b/cuda_bindings/abi/_internal/cufile.cpython-313-x86_64-linux-gnu.abi new file mode 100644 index 0000000000..fb5ba7259b --- /dev/null +++ b/cuda_bindings/abi/_internal/cufile.cpython-313-x86_64-linux-gnu.abi @@ -0,0 +1,132 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/cuda_bindings/abi/_internal/nvjitlink.cpython-313-x86_64-linux-gnu.abi b/cuda_bindings/abi/_internal/nvjitlink.cpython-313-x86_64-linux-gnu.abi new file mode 100644 index 0000000000..35e33a613e --- /dev/null +++ b/cuda_bindings/abi/_internal/nvjitlink.cpython-313-x86_64-linux-gnu.abi @@ -0,0 +1,132 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/cuda_bindings/abi/_internal/nvvm.cpython-313-x86_64-linux-gnu.abi b/cuda_bindings/abi/_internal/nvvm.cpython-313-x86_64-linux-gnu.abi new file mode 100644 index 0000000000..503c90941e --- /dev/null +++ b/cuda_bindings/abi/_internal/nvvm.cpython-313-x86_64-linux-gnu.abi @@ -0,0 +1,132 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/cuda_bindings/abi/_internal/utils.cpython-313-x86_64-linux-gnu.abi b/cuda_bindings/abi/_internal/utils.cpython-313-x86_64-linux-gnu.abi new file mode 100644 index 0000000000..254182d43a --- /dev/null +++ b/cuda_bindings/abi/_internal/utils.cpython-313-x86_64-linux-gnu.abi @@ -0,0 +1,155 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/cuda_bindings/abi/_lib/cyruntime/cyruntime.cpython-313-x86_64-linux-gnu.abi b/cuda_bindings/abi/_lib/cyruntime/cyruntime.cpython-313-x86_64-linux-gnu.abi new file mode 100644 index 0000000000..3b62d7f6bb --- /dev/null +++ b/cuda_bindings/abi/_lib/cyruntime/cyruntime.cpython-313-x86_64-linux-gnu.abi @@ -0,0 +1,72 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/cuda_bindings/abi/_lib/cyruntime/utils.cpython-313-x86_64-linux-gnu.abi b/cuda_bindings/abi/_lib/cyruntime/utils.cpython-313-x86_64-linux-gnu.abi new file mode 100644 index 0000000000..2213db78c5 --- /dev/null +++ b/cuda_bindings/abi/_lib/cyruntime/utils.cpython-313-x86_64-linux-gnu.abi @@ -0,0 +1,79 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/cuda_bindings/abi/_lib/utils.cpython-313-x86_64-linux-gnu.abi b/cuda_bindings/abi/_lib/utils.cpython-313-x86_64-linux-gnu.abi new file mode 100644 index 0000000000..f3a59df9e8 --- /dev/null +++ b/cuda_bindings/abi/_lib/utils.cpython-313-x86_64-linux-gnu.abi @@ -0,0 +1,253 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/cuda_bindings/abi/cufile.cpython-313-x86_64-linux-gnu.abi b/cuda_bindings/abi/cufile.cpython-313-x86_64-linux-gnu.abi new file mode 100644 index 0000000000..eb696dca13 --- /dev/null +++ b/cuda_bindings/abi/cufile.cpython-313-x86_64-linux-gnu.abi @@ -0,0 +1,178 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/cuda_bindings/abi/cycufile.cpython-313-x86_64-linux-gnu.abi b/cuda_bindings/abi/cycufile.cpython-313-x86_64-linux-gnu.abi new file mode 100644 index 0000000000..167576263d --- /dev/null +++ b/cuda_bindings/abi/cycufile.cpython-313-x86_64-linux-gnu.abi @@ -0,0 +1,72 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/cuda_bindings/abi/cydriver.cpython-313-x86_64-linux-gnu.abi b/cuda_bindings/abi/cydriver.cpython-313-x86_64-linux-gnu.abi new file mode 100644 index 0000000000..c835232067 --- /dev/null +++ b/cuda_bindings/abi/cydriver.cpython-313-x86_64-linux-gnu.abi @@ -0,0 +1,72 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/cuda_bindings/abi/cynvjitlink.cpython-313-x86_64-linux-gnu.abi b/cuda_bindings/abi/cynvjitlink.cpython-313-x86_64-linux-gnu.abi new file mode 100644 index 0000000000..520246763a --- /dev/null +++ b/cuda_bindings/abi/cynvjitlink.cpython-313-x86_64-linux-gnu.abi @@ -0,0 +1,72 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/cuda_bindings/abi/cynvrtc.cpython-313-x86_64-linux-gnu.abi b/cuda_bindings/abi/cynvrtc.cpython-313-x86_64-linux-gnu.abi new file mode 100644 index 0000000000..2cba973fa0 --- /dev/null +++ b/cuda_bindings/abi/cynvrtc.cpython-313-x86_64-linux-gnu.abi @@ -0,0 +1,72 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/cuda_bindings/abi/cynvvm.cpython-313-x86_64-linux-gnu.abi b/cuda_bindings/abi/cynvvm.cpython-313-x86_64-linux-gnu.abi new file mode 100644 index 0000000000..05d1d01bd0 --- /dev/null +++ b/cuda_bindings/abi/cynvvm.cpython-313-x86_64-linux-gnu.abi @@ -0,0 +1,72 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/cuda_bindings/abi/cyruntime.cpython-313-x86_64-linux-gnu.abi b/cuda_bindings/abi/cyruntime.cpython-313-x86_64-linux-gnu.abi new file mode 100644 index 0000000000..4ace1064d7 --- /dev/null +++ b/cuda_bindings/abi/cyruntime.cpython-313-x86_64-linux-gnu.abi @@ -0,0 +1,87 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/cuda_bindings/abi/driver.cpython-313-x86_64-linux-gnu.abi b/cuda_bindings/abi/driver.cpython-313-x86_64-linux-gnu.abi new file mode 100644 index 0000000000..3b74676deb --- /dev/null +++ b/cuda_bindings/abi/driver.cpython-313-x86_64-linux-gnu.abi @@ -0,0 +1,232 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/cuda_bindings/abi/nvjitlink.cpython-313-x86_64-linux-gnu.abi b/cuda_bindings/abi/nvjitlink.cpython-313-x86_64-linux-gnu.abi new file mode 100644 index 0000000000..6db1dcb175 --- /dev/null +++ b/cuda_bindings/abi/nvjitlink.cpython-313-x86_64-linux-gnu.abi @@ -0,0 +1,151 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/cuda_bindings/abi/nvrtc.cpython-313-x86_64-linux-gnu.abi b/cuda_bindings/abi/nvrtc.cpython-313-x86_64-linux-gnu.abi new file mode 100644 index 0000000000..b354b0db03 --- /dev/null +++ b/cuda_bindings/abi/nvrtc.cpython-313-x86_64-linux-gnu.abi @@ -0,0 +1,212 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/cuda_bindings/abi/nvvm.cpython-313-x86_64-linux-gnu.abi b/cuda_bindings/abi/nvvm.cpython-313-x86_64-linux-gnu.abi new file mode 100644 index 0000000000..c4744a0f04 --- /dev/null +++ b/cuda_bindings/abi/nvvm.cpython-313-x86_64-linux-gnu.abi @@ -0,0 +1,152 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/cuda_bindings/abi/runtime.cpython-313-x86_64-linux-gnu.abi b/cuda_bindings/abi/runtime.cpython-313-x86_64-linux-gnu.abi new file mode 100644 index 0000000000..d05af38c06 --- /dev/null +++ b/cuda_bindings/abi/runtime.cpython-313-x86_64-linux-gnu.abi @@ -0,0 +1,232 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + From 802cbc82100a7780ac77e639d51a57d694eda624 Mon Sep 17 00:00:00 2001 From: Michael Droettboom Date: Wed, 1 Oct 2025 13:19:49 -0400 Subject: [PATCH 2/9] Improve filename mapping --- ci/tools/abicheck.py | 17 ++++++++++++----- ...on-313-x86_64-linux-gnu.abi => cydriver.abi} | 0 ...hon-313-x86_64-linux-gnu.abi => cynvrtc.abi} | 0 ...n-313-x86_64-linux-gnu.abi => cyruntime.abi} | 0 ...-x86_64-linux-gnu.abi => cyruntime_ptds.abi} | 0 ...thon-313-x86_64-linux-gnu.abi => cufile.abi} | 0 ...n-313-x86_64-linux-gnu.abi => nvjitlink.abi} | 0 ...python-313-x86_64-linux-gnu.abi => nvvm.abi} | 0 ...ython-313-x86_64-linux-gnu.abi => utils.abi} | 0 ...n-313-x86_64-linux-gnu.abi => cyruntime.abi} | 0 ...ython-313-x86_64-linux-gnu.abi => utils.abi} | 0 ...ython-313-x86_64-linux-gnu.abi => utils.abi} | 0 ...thon-313-x86_64-linux-gnu.abi => cufile.abi} | 0 ...on-313-x86_64-linux-gnu.abi => cycufile.abi} | 0 ...on-313-x86_64-linux-gnu.abi => cydriver.abi} | 0 ...313-x86_64-linux-gnu.abi => cynvjitlink.abi} | 0 ...hon-313-x86_64-linux-gnu.abi => cynvrtc.abi} | 0 ...thon-313-x86_64-linux-gnu.abi => cynvvm.abi} | 0 ...n-313-x86_64-linux-gnu.abi => cyruntime.abi} | 0 ...thon-313-x86_64-linux-gnu.abi => driver.abi} | 0 ...n-313-x86_64-linux-gnu.abi => nvjitlink.abi} | 0 ...ython-313-x86_64-linux-gnu.abi => nvrtc.abi} | 0 ...python-313-x86_64-linux-gnu.abi => nvvm.abi} | 0 ...hon-313-x86_64-linux-gnu.abi => runtime.abi} | 0 24 files changed, 12 insertions(+), 5 deletions(-) rename cuda_bindings/abi/_bindings/{cydriver.cpython-313-x86_64-linux-gnu.abi => cydriver.abi} (100%) rename cuda_bindings/abi/_bindings/{cynvrtc.cpython-313-x86_64-linux-gnu.abi => cynvrtc.abi} (100%) rename cuda_bindings/abi/_bindings/{cyruntime.cpython-313-x86_64-linux-gnu.abi => cyruntime.abi} (100%) rename cuda_bindings/abi/_bindings/{cyruntime_ptds.cpython-313-x86_64-linux-gnu.abi => cyruntime_ptds.abi} (100%) rename cuda_bindings/abi/_internal/{cufile.cpython-313-x86_64-linux-gnu.abi => cufile.abi} (100%) rename cuda_bindings/abi/_internal/{nvjitlink.cpython-313-x86_64-linux-gnu.abi => nvjitlink.abi} (100%) rename cuda_bindings/abi/_internal/{nvvm.cpython-313-x86_64-linux-gnu.abi => nvvm.abi} (100%) rename cuda_bindings/abi/_internal/{utils.cpython-313-x86_64-linux-gnu.abi => utils.abi} (100%) rename cuda_bindings/abi/_lib/cyruntime/{cyruntime.cpython-313-x86_64-linux-gnu.abi => cyruntime.abi} (100%) rename cuda_bindings/abi/_lib/cyruntime/{utils.cpython-313-x86_64-linux-gnu.abi => utils.abi} (100%) rename cuda_bindings/abi/_lib/{utils.cpython-313-x86_64-linux-gnu.abi => utils.abi} (100%) rename cuda_bindings/abi/{cufile.cpython-313-x86_64-linux-gnu.abi => cufile.abi} (100%) rename cuda_bindings/abi/{cycufile.cpython-313-x86_64-linux-gnu.abi => cycufile.abi} (100%) rename cuda_bindings/abi/{cydriver.cpython-313-x86_64-linux-gnu.abi => cydriver.abi} (100%) rename cuda_bindings/abi/{cynvjitlink.cpython-313-x86_64-linux-gnu.abi => cynvjitlink.abi} (100%) rename cuda_bindings/abi/{cynvrtc.cpython-313-x86_64-linux-gnu.abi => cynvrtc.abi} (100%) rename cuda_bindings/abi/{cynvvm.cpython-313-x86_64-linux-gnu.abi => cynvvm.abi} (100%) rename cuda_bindings/abi/{cyruntime.cpython-313-x86_64-linux-gnu.abi => cyruntime.abi} (100%) rename cuda_bindings/abi/{driver.cpython-313-x86_64-linux-gnu.abi => driver.abi} (100%) rename cuda_bindings/abi/{nvjitlink.cpython-313-x86_64-linux-gnu.abi => nvjitlink.abi} (100%) rename cuda_bindings/abi/{nvrtc.cpython-313-x86_64-linux-gnu.abi => nvrtc.abi} (100%) rename cuda_bindings/abi/{nvvm.cpython-313-x86_64-linux-gnu.abi => nvvm.abi} (100%) rename cuda_bindings/abi/{runtime.cpython-313-x86_64-linux-gnu.abi => runtime.abi} (100%) diff --git a/ci/tools/abicheck.py b/ci/tools/abicheck.py index 6d726da8a1..cf90882b54 100755 --- a/ci/tools/abicheck.py +++ b/ci/tools/abicheck.py @@ -21,7 +21,8 @@ def get_package_path(package_name): def regenerate(build_dir, abi_dir): for so_path in Path(build_dir).glob("**/*.so"): print(f"Generating ABI from {so_path.relative_to(build_dir)}") - abi_path = abi_dir / so_path.relative_to(build_dir).with_suffix(".abi") + abi_name = so_path.stem[: so_path.stem.find(".")] + ".abi" + abi_path = abi_dir / so_path.parent.relative_to(build_dir) / abi_name abi_path.parent.mkdir(parents=True, exist_ok=True) subprocess.run(["abidw", so_path, "--no-architecture", "--out-file", abi_path], check=True) @@ -30,8 +31,9 @@ def check(build_dir, abi_dir): found_failures = [] missing_so = [] for abi_path in Path(abi_dir).glob("**/*.abi"): - so_path = Path(build_dir) / abi_path.relative_to(abi_dir).with_suffix(".so") - if so_path.exists(): + so_candidates = list((Path(build_dir) / abi_path.parent.relative_to(abi_dir)).glob(f"{abi_path.stem}.*.so")) + if len(so_candidates) == 1: + so_path = so_candidates[0] proc = subprocess.run( [ "abidiff", @@ -44,8 +46,13 @@ def check(build_dir, abi_dir): ) if proc.returncode != 0: found_failures.append(so_path) + elif len(so_candidates) == 0: + missing_so.append(abi_path) else: - missing_so.append(so_path) + print(f"Multiple .so candidates found for {abi_path}:") + for p in so_candidates: + print(f" {p}") + missing_so.append(abi_path) if len(found_failures): print("ABI differences found in the following files:") @@ -55,7 +62,7 @@ def check(build_dir, abi_dir): if len(missing_so): print("Expected .so file(s) have been removed:") for p in missing_so: - print(f" {p.relative_to(build_dir)}") + print(f" {p.relative_to(abi_dir)}") return len(found_failures) or len(missing_so) diff --git a/cuda_bindings/abi/_bindings/cydriver.cpython-313-x86_64-linux-gnu.abi b/cuda_bindings/abi/_bindings/cydriver.abi similarity index 100% rename from cuda_bindings/abi/_bindings/cydriver.cpython-313-x86_64-linux-gnu.abi rename to cuda_bindings/abi/_bindings/cydriver.abi diff --git a/cuda_bindings/abi/_bindings/cynvrtc.cpython-313-x86_64-linux-gnu.abi b/cuda_bindings/abi/_bindings/cynvrtc.abi similarity index 100% rename from cuda_bindings/abi/_bindings/cynvrtc.cpython-313-x86_64-linux-gnu.abi rename to cuda_bindings/abi/_bindings/cynvrtc.abi diff --git a/cuda_bindings/abi/_bindings/cyruntime.cpython-313-x86_64-linux-gnu.abi b/cuda_bindings/abi/_bindings/cyruntime.abi similarity index 100% rename from cuda_bindings/abi/_bindings/cyruntime.cpython-313-x86_64-linux-gnu.abi rename to cuda_bindings/abi/_bindings/cyruntime.abi diff --git a/cuda_bindings/abi/_bindings/cyruntime_ptds.cpython-313-x86_64-linux-gnu.abi b/cuda_bindings/abi/_bindings/cyruntime_ptds.abi similarity index 100% rename from cuda_bindings/abi/_bindings/cyruntime_ptds.cpython-313-x86_64-linux-gnu.abi rename to cuda_bindings/abi/_bindings/cyruntime_ptds.abi diff --git a/cuda_bindings/abi/_internal/cufile.cpython-313-x86_64-linux-gnu.abi b/cuda_bindings/abi/_internal/cufile.abi similarity index 100% rename from cuda_bindings/abi/_internal/cufile.cpython-313-x86_64-linux-gnu.abi rename to cuda_bindings/abi/_internal/cufile.abi diff --git a/cuda_bindings/abi/_internal/nvjitlink.cpython-313-x86_64-linux-gnu.abi b/cuda_bindings/abi/_internal/nvjitlink.abi similarity index 100% rename from cuda_bindings/abi/_internal/nvjitlink.cpython-313-x86_64-linux-gnu.abi rename to cuda_bindings/abi/_internal/nvjitlink.abi diff --git a/cuda_bindings/abi/_internal/nvvm.cpython-313-x86_64-linux-gnu.abi b/cuda_bindings/abi/_internal/nvvm.abi similarity index 100% rename from cuda_bindings/abi/_internal/nvvm.cpython-313-x86_64-linux-gnu.abi rename to cuda_bindings/abi/_internal/nvvm.abi diff --git a/cuda_bindings/abi/_internal/utils.cpython-313-x86_64-linux-gnu.abi b/cuda_bindings/abi/_internal/utils.abi similarity index 100% rename from cuda_bindings/abi/_internal/utils.cpython-313-x86_64-linux-gnu.abi rename to cuda_bindings/abi/_internal/utils.abi diff --git a/cuda_bindings/abi/_lib/cyruntime/cyruntime.cpython-313-x86_64-linux-gnu.abi b/cuda_bindings/abi/_lib/cyruntime/cyruntime.abi similarity index 100% rename from cuda_bindings/abi/_lib/cyruntime/cyruntime.cpython-313-x86_64-linux-gnu.abi rename to cuda_bindings/abi/_lib/cyruntime/cyruntime.abi diff --git a/cuda_bindings/abi/_lib/cyruntime/utils.cpython-313-x86_64-linux-gnu.abi b/cuda_bindings/abi/_lib/cyruntime/utils.abi similarity index 100% rename from cuda_bindings/abi/_lib/cyruntime/utils.cpython-313-x86_64-linux-gnu.abi rename to cuda_bindings/abi/_lib/cyruntime/utils.abi diff --git a/cuda_bindings/abi/_lib/utils.cpython-313-x86_64-linux-gnu.abi b/cuda_bindings/abi/_lib/utils.abi similarity index 100% rename from cuda_bindings/abi/_lib/utils.cpython-313-x86_64-linux-gnu.abi rename to cuda_bindings/abi/_lib/utils.abi diff --git a/cuda_bindings/abi/cufile.cpython-313-x86_64-linux-gnu.abi b/cuda_bindings/abi/cufile.abi similarity index 100% rename from cuda_bindings/abi/cufile.cpython-313-x86_64-linux-gnu.abi rename to cuda_bindings/abi/cufile.abi diff --git a/cuda_bindings/abi/cycufile.cpython-313-x86_64-linux-gnu.abi b/cuda_bindings/abi/cycufile.abi similarity index 100% rename from cuda_bindings/abi/cycufile.cpython-313-x86_64-linux-gnu.abi rename to cuda_bindings/abi/cycufile.abi diff --git a/cuda_bindings/abi/cydriver.cpython-313-x86_64-linux-gnu.abi b/cuda_bindings/abi/cydriver.abi similarity index 100% rename from cuda_bindings/abi/cydriver.cpython-313-x86_64-linux-gnu.abi rename to cuda_bindings/abi/cydriver.abi diff --git a/cuda_bindings/abi/cynvjitlink.cpython-313-x86_64-linux-gnu.abi b/cuda_bindings/abi/cynvjitlink.abi similarity index 100% rename from cuda_bindings/abi/cynvjitlink.cpython-313-x86_64-linux-gnu.abi rename to cuda_bindings/abi/cynvjitlink.abi diff --git a/cuda_bindings/abi/cynvrtc.cpython-313-x86_64-linux-gnu.abi b/cuda_bindings/abi/cynvrtc.abi similarity index 100% rename from cuda_bindings/abi/cynvrtc.cpython-313-x86_64-linux-gnu.abi rename to cuda_bindings/abi/cynvrtc.abi diff --git a/cuda_bindings/abi/cynvvm.cpython-313-x86_64-linux-gnu.abi b/cuda_bindings/abi/cynvvm.abi similarity index 100% rename from cuda_bindings/abi/cynvvm.cpython-313-x86_64-linux-gnu.abi rename to cuda_bindings/abi/cynvvm.abi diff --git a/cuda_bindings/abi/cyruntime.cpython-313-x86_64-linux-gnu.abi b/cuda_bindings/abi/cyruntime.abi similarity index 100% rename from cuda_bindings/abi/cyruntime.cpython-313-x86_64-linux-gnu.abi rename to cuda_bindings/abi/cyruntime.abi diff --git a/cuda_bindings/abi/driver.cpython-313-x86_64-linux-gnu.abi b/cuda_bindings/abi/driver.abi similarity index 100% rename from cuda_bindings/abi/driver.cpython-313-x86_64-linux-gnu.abi rename to cuda_bindings/abi/driver.abi diff --git a/cuda_bindings/abi/nvjitlink.cpython-313-x86_64-linux-gnu.abi b/cuda_bindings/abi/nvjitlink.abi similarity index 100% rename from cuda_bindings/abi/nvjitlink.cpython-313-x86_64-linux-gnu.abi rename to cuda_bindings/abi/nvjitlink.abi diff --git a/cuda_bindings/abi/nvrtc.cpython-313-x86_64-linux-gnu.abi b/cuda_bindings/abi/nvrtc.abi similarity index 100% rename from cuda_bindings/abi/nvrtc.cpython-313-x86_64-linux-gnu.abi rename to cuda_bindings/abi/nvrtc.abi diff --git a/cuda_bindings/abi/nvvm.cpython-313-x86_64-linux-gnu.abi b/cuda_bindings/abi/nvvm.abi similarity index 100% rename from cuda_bindings/abi/nvvm.cpython-313-x86_64-linux-gnu.abi rename to cuda_bindings/abi/nvvm.abi diff --git a/cuda_bindings/abi/runtime.cpython-313-x86_64-linux-gnu.abi b/cuda_bindings/abi/runtime.abi similarity index 100% rename from cuda_bindings/abi/runtime.cpython-313-x86_64-linux-gnu.abi rename to cuda_bindings/abi/runtime.abi From 74f836650bf2c01a33ba2f0d5fffe1923cf1f3ae Mon Sep 17 00:00:00 2001 From: Michael Droettboom Date: Wed, 1 Oct 2025 13:45:14 -0400 Subject: [PATCH 3/9] Fix step name --- .github/workflows/test-wheel-linux.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test-wheel-linux.yml b/.github/workflows/test-wheel-linux.yml index 757abffc6b..964a54c62c 100644 --- a/.github/workflows/test-wheel-linux.yml +++ b/.github/workflows/test-wheel-linux.yml @@ -276,7 +276,7 @@ jobs: exit 1 fi - - name: upload cuda.pathfinder build artifacts + - name: Upload cuda.bindings ABI artifacts if: ${{ failure() && steps.abicheck.conclusion == 'failure' }} uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2 with: From 2d4ece84d05926610246ee6fb06244935334e3f1 Mon Sep 17 00:00:00 2001 From: Michael Droettboom Date: Wed, 1 Oct 2025 13:54:59 -0400 Subject: [PATCH 4/9] Add some debugging info --- .github/workflows/test-wheel-linux.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/test-wheel-linux.yml b/.github/workflows/test-wheel-linux.yml index 964a54c62c..ca5ea47c0f 100644 --- a/.github/workflows/test-wheel-linux.yml +++ b/.github/workflows/test-wheel-linux.yml @@ -265,6 +265,9 @@ jobs: if: ${{ env.SKIP_CUDA_BINDINGS_TEST == '0' && matrix.PY_VER == '3.13' }} id: abicheck run: | + echo `which pytest` + echo `which python` + cat `which pytest` if [[ $(abicheck.py check cuda.bindings cuda/bindings/abi/) ]]; then echo "ABI check passed" else From 682bdd88ef24da22b69e669d5796908005ff1b6e Mon Sep 17 00:00:00 2001 From: Michael Droettboom Date: Wed, 1 Oct 2025 14:23:29 -0400 Subject: [PATCH 5/9] Try to use correct Python --- .github/workflows/test-wheel-linux.yml | 2 +- ci/tools/abicheck.py | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test-wheel-linux.yml b/.github/workflows/test-wheel-linux.yml index ca5ea47c0f..c396f48547 100644 --- a/.github/workflows/test-wheel-linux.yml +++ b/.github/workflows/test-wheel-linux.yml @@ -268,7 +268,7 @@ jobs: echo `which pytest` echo `which python` cat `which pytest` - if [[ $(abicheck.py check cuda.bindings cuda/bindings/abi/) ]]; then + if [[ $(python ci/tools/abicheck.py check cuda.bindings cuda/bindings/abi/) ]]; then echo "ABI check passed" else echo "ABI check failed" diff --git a/ci/tools/abicheck.py b/ci/tools/abicheck.py index cf90882b54..94f00c1be0 100755 --- a/ci/tools/abicheck.py +++ b/ci/tools/abicheck.py @@ -68,6 +68,8 @@ def check(build_dir, abi_dir): if __name__ == "__main__": + print(f"Python executable: {sys.executable}") + parser = argparse.ArgumentParser(description="Check or regenerate ABI files for a package") parser.add_argument("action", choices=["regenerate", "check"]) parser.add_argument("package", help="Python package path containing .so files to check") From f1e510e5e247caec11e076417d6baff44601ab81 Mon Sep 17 00:00:00 2001 From: Michael Droettboom Date: Wed, 1 Oct 2025 15:46:05 -0400 Subject: [PATCH 6/9] Update ABI --- cuda_bindings/abi/_bindings/cydriver.abi | 21 +- cuda_bindings/abi/_bindings/cynvrtc.abi | 20 +- cuda_bindings/abi/_bindings/cyruntime.abi | 14 +- .../abi/_bindings/cyruntime_ptds.abi | 8 - cuda_bindings/abi/_internal/cufile.abi | 28 +- cuda_bindings/abi/_internal/nvjitlink.abi | 28 +- cuda_bindings/abi/_internal/nvvm.abi | 28 +- cuda_bindings/abi/_internal/utils.abi | 11 +- .../abi/_lib/cyruntime/cyruntime.abi | 72 ----- cuda_bindings/abi/_lib/cyruntime/utils.abi | 79 ------ cuda_bindings/abi/_lib/utils.abi | 253 ------------------ cuda_bindings/abi/cufile.abi | 21 +- cuda_bindings/abi/cycufile.abi | 9 +- cuda_bindings/abi/cydriver.abi | 9 +- cuda_bindings/abi/cynvjitlink.abi | 9 +- cuda_bindings/abi/cynvrtc.abi | 9 +- cuda_bindings/abi/cynvvm.abi | 9 +- cuda_bindings/abi/cyruntime.abi | 30 ++- cuda_bindings/abi/driver.abi | 67 +++-- cuda_bindings/abi/nvjitlink.abi | 19 +- cuda_bindings/abi/nvrtc.abi | 81 ++++-- cuda_bindings/abi/nvvm.abi | 19 +- cuda_bindings/abi/runtime.abi | 68 +++-- 23 files changed, 282 insertions(+), 630 deletions(-) delete mode 100644 cuda_bindings/abi/_lib/cyruntime/cyruntime.abi delete mode 100644 cuda_bindings/abi/_lib/cyruntime/utils.abi delete mode 100644 cuda_bindings/abi/_lib/utils.abi diff --git a/cuda_bindings/abi/_bindings/cydriver.abi b/cuda_bindings/abi/_bindings/cydriver.abi index e650b6d7b5..52625902dd 100644 --- a/cuda_bindings/abi/_bindings/cydriver.abi +++ b/cuda_bindings/abi/_bindings/cydriver.abi @@ -23,25 +23,28 @@ + + - + - + + + - @@ -81,7 +84,6 @@ - @@ -90,10 +92,11 @@ - + + @@ -102,9 +105,8 @@ - - - + + @@ -113,14 +115,13 @@ - + - diff --git a/cuda_bindings/abi/_bindings/cynvrtc.abi b/cuda_bindings/abi/_bindings/cynvrtc.abi index 641c22e995..90de942faa 100644 --- a/cuda_bindings/abi/_bindings/cynvrtc.abi +++ b/cuda_bindings/abi/_bindings/cynvrtc.abi @@ -15,24 +15,27 @@ + + - + - + + + - @@ -75,7 +78,6 @@ - @@ -84,8 +86,6 @@ - - @@ -97,9 +97,8 @@ - - - + + @@ -108,14 +107,13 @@ - + - diff --git a/cuda_bindings/abi/_bindings/cyruntime.abi b/cuda_bindings/abi/_bindings/cyruntime.abi index efeb8d9187..f0c297659b 100644 --- a/cuda_bindings/abi/_bindings/cyruntime.abi +++ b/cuda_bindings/abi/_bindings/cyruntime.abi @@ -175,8 +175,8 @@ - + @@ -190,7 +190,6 @@ - @@ -204,37 +203,32 @@ + - - + - - - - - - + diff --git a/cuda_bindings/abi/_bindings/cyruntime_ptds.abi b/cuda_bindings/abi/_bindings/cyruntime_ptds.abi index 62d1d7ea01..d099298d7a 100644 --- a/cuda_bindings/abi/_bindings/cyruntime_ptds.abi +++ b/cuda_bindings/abi/_bindings/cyruntime_ptds.abi @@ -172,7 +172,6 @@ - @@ -198,28 +197,21 @@ - - - - - - - diff --git a/cuda_bindings/abi/_internal/cufile.abi b/cuda_bindings/abi/_internal/cufile.abi index fb5ba7259b..f153381d4b 100644 --- a/cuda_bindings/abi/_internal/cufile.abi +++ b/cuda_bindings/abi/_internal/cufile.abi @@ -10,33 +10,32 @@ - - - + - - + + - + - + + + - @@ -79,7 +78,6 @@ - @@ -88,8 +86,6 @@ - - @@ -101,27 +97,23 @@ - - - + + - - - + - diff --git a/cuda_bindings/abi/_internal/nvjitlink.abi b/cuda_bindings/abi/_internal/nvjitlink.abi index 35e33a613e..ae7fe239c0 100644 --- a/cuda_bindings/abi/_internal/nvjitlink.abi +++ b/cuda_bindings/abi/_internal/nvjitlink.abi @@ -10,33 +10,32 @@ - - - + - - + + - + - + + + - @@ -79,7 +78,6 @@ - @@ -88,8 +86,6 @@ - - @@ -101,27 +97,23 @@ - - - + + - - - + - diff --git a/cuda_bindings/abi/_internal/nvvm.abi b/cuda_bindings/abi/_internal/nvvm.abi index 503c90941e..cc8d4d1c28 100644 --- a/cuda_bindings/abi/_internal/nvvm.abi +++ b/cuda_bindings/abi/_internal/nvvm.abi @@ -10,33 +10,32 @@ - - - + - - + + - + - + + + - @@ -79,7 +78,6 @@ - @@ -88,8 +86,6 @@ - - @@ -101,27 +97,23 @@ - - - + + - - - + - diff --git a/cuda_bindings/abi/_internal/utils.abi b/cuda_bindings/abi/_internal/utils.abi index 254182d43a..2ac6516884 100644 --- a/cuda_bindings/abi/_internal/utils.abi +++ b/cuda_bindings/abi/_internal/utils.abi @@ -31,13 +31,10 @@ - - - @@ -46,7 +43,6 @@ - @@ -103,7 +99,7 @@ - + @@ -119,22 +115,17 @@ - - - - - diff --git a/cuda_bindings/abi/_lib/cyruntime/cyruntime.abi b/cuda_bindings/abi/_lib/cyruntime/cyruntime.abi deleted file mode 100644 index 3b62d7f6bb..0000000000 --- a/cuda_bindings/abi/_lib/cyruntime/cyruntime.abi +++ /dev/null @@ -1,72 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/cuda_bindings/abi/_lib/cyruntime/utils.abi b/cuda_bindings/abi/_lib/cyruntime/utils.abi deleted file mode 100644 index 2213db78c5..0000000000 --- a/cuda_bindings/abi/_lib/cyruntime/utils.abi +++ /dev/null @@ -1,79 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/cuda_bindings/abi/_lib/utils.abi b/cuda_bindings/abi/_lib/utils.abi deleted file mode 100644 index f3a59df9e8..0000000000 --- a/cuda_bindings/abi/_lib/utils.abi +++ /dev/null @@ -1,253 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/cuda_bindings/abi/cufile.abi b/cuda_bindings/abi/cufile.abi index eb696dca13..9b31d33161 100644 --- a/cuda_bindings/abi/cufile.abi +++ b/cuda_bindings/abi/cufile.abi @@ -16,7 +16,9 @@ + + @@ -27,11 +29,13 @@ - + - + + + @@ -108,9 +112,9 @@ + - @@ -119,17 +123,20 @@ + + - + + @@ -140,12 +147,11 @@ + - - @@ -159,14 +165,13 @@ - + - diff --git a/cuda_bindings/abi/cycufile.abi b/cuda_bindings/abi/cycufile.abi index 167576263d..56d4269d43 100644 --- a/cuda_bindings/abi/cycufile.abi +++ b/cuda_bindings/abi/cycufile.abi @@ -12,8 +12,8 @@ - + @@ -44,28 +44,21 @@ - - - - - - - diff --git a/cuda_bindings/abi/cydriver.abi b/cuda_bindings/abi/cydriver.abi index c835232067..4178966874 100644 --- a/cuda_bindings/abi/cydriver.abi +++ b/cuda_bindings/abi/cydriver.abi @@ -12,8 +12,8 @@ - + @@ -44,28 +44,21 @@ - - - - - - - diff --git a/cuda_bindings/abi/cynvjitlink.abi b/cuda_bindings/abi/cynvjitlink.abi index 520246763a..7014dcdd56 100644 --- a/cuda_bindings/abi/cynvjitlink.abi +++ b/cuda_bindings/abi/cynvjitlink.abi @@ -12,8 +12,8 @@ - + @@ -44,28 +44,21 @@ - - - - - - - diff --git a/cuda_bindings/abi/cynvrtc.abi b/cuda_bindings/abi/cynvrtc.abi index 2cba973fa0..a0e1d39f99 100644 --- a/cuda_bindings/abi/cynvrtc.abi +++ b/cuda_bindings/abi/cynvrtc.abi @@ -12,8 +12,8 @@ - + @@ -44,28 +44,21 @@ - - - - - - - diff --git a/cuda_bindings/abi/cynvvm.abi b/cuda_bindings/abi/cynvvm.abi index 05d1d01bd0..f907e74e8a 100644 --- a/cuda_bindings/abi/cynvvm.abi +++ b/cuda_bindings/abi/cynvvm.abi @@ -12,8 +12,8 @@ - + @@ -44,28 +44,21 @@ - - - - - - - diff --git a/cuda_bindings/abi/cyruntime.abi b/cuda_bindings/abi/cyruntime.abi index 4ace1064d7..a19201ad57 100644 --- a/cuda_bindings/abi/cyruntime.abi +++ b/cuda_bindings/abi/cyruntime.abi @@ -10,19 +10,18 @@ - - + - + @@ -33,22 +32,32 @@ + + + + + + + + + + @@ -56,32 +65,35 @@ + + - + + - - + + - + + - + - diff --git a/cuda_bindings/abi/driver.abi b/cuda_bindings/abi/driver.abi index 3b74676deb..9eff39745a 100644 --- a/cuda_bindings/abi/driver.abi +++ b/cuda_bindings/abi/driver.abi @@ -6,36 +6,61 @@ + + + + + + + + + + + + + + + + + + + + + + - + + + + @@ -44,14 +69,14 @@ - - - + - + + + @@ -60,6 +85,7 @@ + @@ -67,10 +93,12 @@ + + @@ -80,19 +108,20 @@ + - + @@ -102,23 +131,24 @@ - + - + + @@ -142,8 +172,10 @@ + + + - @@ -151,15 +183,17 @@ + + - + @@ -168,11 +202,13 @@ + - + + @@ -183,12 +219,11 @@ + - - @@ -201,15 +236,15 @@ - + + - @@ -221,12 +256,14 @@ + + diff --git a/cuda_bindings/abi/nvjitlink.abi b/cuda_bindings/abi/nvjitlink.abi index 6db1dcb175..96f4bca432 100644 --- a/cuda_bindings/abi/nvjitlink.abi +++ b/cuda_bindings/abi/nvjitlink.abi @@ -22,7 +22,9 @@ + + @@ -30,10 +32,13 @@ - + + + + @@ -95,7 +100,6 @@ - @@ -103,14 +107,12 @@ - - - + @@ -118,12 +120,10 @@ + - - - @@ -134,14 +134,13 @@ - + - diff --git a/cuda_bindings/abi/nvrtc.abi b/cuda_bindings/abi/nvrtc.abi index b354b0db03..81c590513d 100644 --- a/cuda_bindings/abi/nvrtc.abi +++ b/cuda_bindings/abi/nvrtc.abi @@ -6,31 +6,60 @@ + + + + + + + + + + + + + + + + + + - + + + + + + + + + - + + + + @@ -39,31 +68,34 @@ - - - + - + + + + + + @@ -73,41 +105,47 @@ + + - + + + + - + - + + @@ -122,13 +160,16 @@ + + + + - @@ -136,14 +177,17 @@ + + + - + @@ -152,9 +196,13 @@ + - + + + + @@ -165,12 +213,11 @@ + - - @@ -178,18 +225,18 @@ + - + - @@ -201,12 +248,14 @@ + + diff --git a/cuda_bindings/abi/nvvm.abi b/cuda_bindings/abi/nvvm.abi index c4744a0f04..90b4008a11 100644 --- a/cuda_bindings/abi/nvvm.abi +++ b/cuda_bindings/abi/nvvm.abi @@ -22,7 +22,9 @@ + + @@ -31,10 +33,13 @@ - + + + + @@ -96,7 +101,6 @@ - @@ -104,14 +108,12 @@ - - - + @@ -119,12 +121,10 @@ + - - - @@ -135,14 +135,13 @@ - + - diff --git a/cuda_bindings/abi/runtime.abi b/cuda_bindings/abi/runtime.abi index d05af38c06..45ee56540e 100644 --- a/cuda_bindings/abi/runtime.abi +++ b/cuda_bindings/abi/runtime.abi @@ -6,36 +6,61 @@ + + + + + + + + + + + + + + + + + + + + + + - + + + + @@ -44,14 +69,14 @@ - - - + - + + + @@ -60,6 +85,7 @@ + @@ -67,10 +93,12 @@ + + @@ -80,19 +108,21 @@ + + - + @@ -102,23 +132,24 @@ - + - + + @@ -142,8 +173,10 @@ + + + - @@ -151,15 +184,17 @@ + + - + @@ -168,11 +203,14 @@ + - + + + @@ -183,12 +221,11 @@ + - - @@ -201,15 +238,14 @@ - + - @@ -221,12 +257,14 @@ + + From 1ed2dd1f3eb0065c0b49d6d6342d1c3e731cf20d Mon Sep 17 00:00:00 2001 From: Michael Droettboom Date: Wed, 1 Oct 2025 16:17:22 -0400 Subject: [PATCH 7/9] Fix GHA script --- .github/workflows/test-wheel-linux.yml | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/.github/workflows/test-wheel-linux.yml b/.github/workflows/test-wheel-linux.yml index c396f48547..7ed9a6ddd6 100644 --- a/.github/workflows/test-wheel-linux.yml +++ b/.github/workflows/test-wheel-linux.yml @@ -261,14 +261,18 @@ jobs: CUDA_PATHFINDER_TEST_FIND_NVIDIA_HEADERS_STRICTNESS: see_what_works run: run-tests pathfinder + - name: Run cuda.bindings tests + if: ${{ env.SKIP_CUDA_BINDINGS_TEST == '0' }} + env: + CUDA_VER: ${{ matrix.CUDA_VER }} + LOCAL_CTK: ${{ matrix.LOCAL_CTK }} + run: run-tests bindings + - name: Check cuda.bindings ABI compatibility if: ${{ env.SKIP_CUDA_BINDINGS_TEST == '0' && matrix.PY_VER == '3.13' }} id: abicheck run: | - echo `which pytest` - echo `which python` - cat `which pytest` - if [[ $(python ci/tools/abicheck.py check cuda.bindings cuda/bindings/abi/) ]]; then + if [ python ci/tools/abicheck.py check cuda.bindings cuda/bindings/abi/ ]; then echo "ABI check passed" else echo "ABI check failed" @@ -287,13 +291,6 @@ jobs: path: new-abi if-no-files-found: error - - name: Run cuda.bindings tests - if: ${{ env.SKIP_CUDA_BINDINGS_TEST == '0' }} - env: - CUDA_VER: ${{ matrix.CUDA_VER }} - LOCAL_CTK: ${{ matrix.LOCAL_CTK }} - run: run-tests bindings - - name: Run cuda.core tests env: CUDA_VER: ${{ matrix.CUDA_VER }} From 6837d841d15589cc24362577e1f3e61f75763e08 Mon Sep 17 00:00:00 2001 From: Michael Droettboom Date: Wed, 1 Oct 2025 16:40:49 -0400 Subject: [PATCH 8/9] Fix syntax --- .github/workflows/test-wheel-linux.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test-wheel-linux.yml b/.github/workflows/test-wheel-linux.yml index 7ed9a6ddd6..fb7d4eecd1 100644 --- a/.github/workflows/test-wheel-linux.yml +++ b/.github/workflows/test-wheel-linux.yml @@ -272,14 +272,14 @@ jobs: if: ${{ env.SKIP_CUDA_BINDINGS_TEST == '0' && matrix.PY_VER == '3.13' }} id: abicheck run: | - if [ python ci/tools/abicheck.py check cuda.bindings cuda/bindings/abi/ ]; then + if (python ci/tools/abicheck.py check cuda.bindings cuda/bindings/abi/); then echo "ABI check passed" else echo "ABI check failed" echo "The changed ABI data from this PR is in the cuda_bindings_abi artifact." echo "If these changes are expected, copy the files in that artifact to cuda/bindings/abi/" echo "and commit the changes." - abicheck.py regenerate cuda.bindings new-abi + python ci/tools/abicheck.py regenerate cuda.bindings new-abi/ exit 1 fi From 3fc00ddbeb6aecf673723df6d4a5534caed23a33 Mon Sep 17 00:00:00 2001 From: Michael Droettboom Date: Thu, 2 Oct 2025 09:07:22 -0400 Subject: [PATCH 9/9] Run on all Python versions --- .github/workflows/test-wheel-linux.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test-wheel-linux.yml b/.github/workflows/test-wheel-linux.yml index fb7d4eecd1..1dc34e5db5 100644 --- a/.github/workflows/test-wheel-linux.yml +++ b/.github/workflows/test-wheel-linux.yml @@ -269,7 +269,7 @@ jobs: run: run-tests bindings - name: Check cuda.bindings ABI compatibility - if: ${{ env.SKIP_CUDA_BINDINGS_TEST == '0' && matrix.PY_VER == '3.13' }} + if: ${{ env.SKIP_CUDA_BINDINGS_TEST == '0' }} id: abicheck run: | if (python ci/tools/abicheck.py check cuda.bindings cuda/bindings/abi/); then