From de4ae9dfb20aecf1b766fc44973f8c376199786e Mon Sep 17 00:00:00 2001 From: Andres Marafioti Date: Thu, 25 Jun 2026 11:10:00 +0200 Subject: [PATCH 1/3] Reduce CUDA wheel size --- .github/workflows/publish.yml | 4 ++-- .github/workflows/wheels.yml | 8 ++++---- AGENTS.md | 8 ++++++++ 3 files changed, 14 insertions(+), 6 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 105d019..bd5b46e 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -27,14 +27,14 @@ jobs: cuda_repo_arch: x86_64 cuda_package_suffix: "12-8" cuda_home: /usr/local/cuda-12.8 - cuda_architectures: 75-virtual;80-virtual;86-real;89-real;90-real;100-real;120-real;120-virtual + cuda_architectures: 75-virtual;86-real;90-real;120-real;120-virtual build_jobs: "2" - arch: aarch64 runner: ubuntu-24.04-arm cuda_repo_arch: sbsa cuda_package_suffix: "12-8" cuda_home: /usr/local/cuda-12.8 - cuda_architectures: 75-virtual;80-virtual;86-real;89-real;90-real;100-real;120-real;120-virtual + cuda_architectures: 75-virtual;86-real;90-real;120-real;120-virtual build_jobs: "2" env: QWENTTS_CPP_BACKEND: cuda diff --git a/.github/workflows/wheels.yml b/.github/workflows/wheels.yml index 190e80a..5b20762 100644 --- a/.github/workflows/wheels.yml +++ b/.github/workflows/wheels.yml @@ -33,7 +33,7 @@ jobs: cuda_package_suffix: "12-8" cuda_home: /usr/local/cuda-12.8 wheel_build_tag: 1cu128 - cuda_architectures: 75-virtual;80-virtual;86-real;89-real;90-real;100-real;120-real;120-virtual + cuda_architectures: 75-virtual;86-real;90-real;120-real;120-virtual build_jobs: "2" - arch: aarch64 runner: ubuntu-24.04-arm @@ -42,7 +42,7 @@ jobs: cuda_package_suffix: "12-8" cuda_home: /usr/local/cuda-12.8 wheel_build_tag: 1cu128 - cuda_architectures: 75-virtual;80-virtual;86-real;89-real;90-real;100-real;120-real;120-virtual + cuda_architectures: 75-virtual;86-real;90-real;120-real;120-virtual build_jobs: "2" - arch: x86_64 runner: ubuntu-24.04 @@ -51,7 +51,7 @@ jobs: cuda_package_suffix: "13-0" cuda_home: /usr/local/cuda-13.0 wheel_build_tag: 1cu130 - cuda_architectures: 75-virtual;80-virtual;86-real;89-real;90-real;100-real;120-real;120-virtual;121-real;121-virtual + cuda_architectures: 75-virtual;86-real;90-real;121-real;121-virtual build_jobs: "2" - arch: aarch64 runner: ubuntu-24.04-arm @@ -60,7 +60,7 @@ jobs: cuda_package_suffix: "13-0" cuda_home: /usr/local/cuda-13.0 wheel_build_tag: 1cu130 - cuda_architectures: 75-virtual;80-virtual;86-real;89-real;90-real;100-real;120-real;120-virtual;121-real;121-virtual + cuda_architectures: 75-virtual;86-real;90-real;121-real;121-virtual build_jobs: "2" env: QWENTTS_CPP_BACKEND: cuda diff --git a/AGENTS.md b/AGENTS.md index 81e5071..0b99831 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -16,6 +16,14 @@ only. CPU and CUDA 13 wheels are useful validation artifacts, but publishing multiple backend flavors under the same package name, version, and platform tag would leave pip with no reliable way to choose the intended runtime. +CUDA release wheels keep native cubins for sm_86, sm_90, and sm_120, plus PTX +fallbacks for sm_75 and the newest supported CUDA architecture. This keeps the +public CUDA 12.8 wheels under PyPI's default per-file upload limit while +preserving broad GPU compatibility. Ada sm_89 GPUs can run the sm_86 cubin +through CUDA's same-major binary compatibility. DGX Spark / GB10 sm_121 uses +PTX fallback in the public CUDA 12.8 wheels; CUDA 13 validation wheels include +an sm_121 native cubin. + To prepare a release: 1. Confirm the intended version is not already published on PyPI. From bc6601d58cf136986a04d4536d02f69a232e1494 Mon Sep 17 00:00:00 2001 From: Andres Marafioti Date: Thu, 25 Jun 2026 14:54:07 +0200 Subject: [PATCH 2/3] Limit validation wheels to CUDA 12.8 --- .github/workflows/wheels.yml | 18 ------------------ AGENTS.md | 11 ++++++----- 2 files changed, 6 insertions(+), 23 deletions(-) diff --git a/.github/workflows/wheels.yml b/.github/workflows/wheels.yml index 5b20762..690e117 100644 --- a/.github/workflows/wheels.yml +++ b/.github/workflows/wheels.yml @@ -44,24 +44,6 @@ jobs: wheel_build_tag: 1cu128 cuda_architectures: 75-virtual;86-real;90-real;120-real;120-virtual build_jobs: "2" - - arch: x86_64 - runner: ubuntu-24.04 - cuda_repo_arch: x86_64 - cuda_version: "13.0" - cuda_package_suffix: "13-0" - cuda_home: /usr/local/cuda-13.0 - wheel_build_tag: 1cu130 - cuda_architectures: 75-virtual;86-real;90-real;121-real;121-virtual - build_jobs: "2" - - arch: aarch64 - runner: ubuntu-24.04-arm - cuda_repo_arch: sbsa - cuda_version: "13.0" - cuda_package_suffix: "13-0" - cuda_home: /usr/local/cuda-13.0 - wheel_build_tag: 1cu130 - cuda_architectures: 75-virtual;86-real;90-real;121-real;121-virtual - build_jobs: "2" env: QWENTTS_CPP_BACKEND: cuda QWENTTS_CPP_BUILD_JOBS: ${{ matrix.build_jobs }} diff --git a/AGENTS.md b/AGENTS.md index 0b99831..ab6e9be 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -12,17 +12,18 @@ The workflow runs on pushed tags that match `v*`, builds the public Linux CUDA through the configured `pypi` environment. The public `qwentts-cpp-python` package currently publishes CUDA 12.8 wheels -only. CPU and CUDA 13 wheels are useful validation artifacts, but publishing -multiple backend flavors under the same package name, version, and platform tag -would leave pip with no reliable way to choose the intended runtime. +only. Publishing multiple backend flavors under the same package name, version, +and platform tag would leave pip with no reliable way to choose the intended +runtime. CUDA release wheels keep native cubins for sm_86, sm_90, and sm_120, plus PTX fallbacks for sm_75 and the newest supported CUDA architecture. This keeps the public CUDA 12.8 wheels under PyPI's default per-file upload limit while preserving broad GPU compatibility. Ada sm_89 GPUs can run the sm_86 cubin through CUDA's same-major binary compatibility. DGX Spark / GB10 sm_121 uses -PTX fallback in the public CUDA 12.8 wheels; CUDA 13 validation wheels include -an sm_121 native cubin. +PTX fallback in the public CUDA 12.8 wheels. A CUDA 13 build with native sm_121 +can avoid that fallback, but it is not the PyPI default because the deployment +server image currently targets CUDA 12.8. To prepare a release: From 404699d472b2d81f75f17ea9be6e86c4da41d2a8 Mon Sep 17 00:00:00 2001 From: Andres Marafioti Date: Thu, 25 Jun 2026 15:16:30 +0200 Subject: [PATCH 3/3] Build CUDA 13 validation wheels --- .github/workflows/wheels.yml | 18 ++++++++++++++++++ AGENTS.md | 4 ++++ 2 files changed, 22 insertions(+) diff --git a/.github/workflows/wheels.yml b/.github/workflows/wheels.yml index 690e117..6137e5c 100644 --- a/.github/workflows/wheels.yml +++ b/.github/workflows/wheels.yml @@ -44,6 +44,24 @@ jobs: wheel_build_tag: 1cu128 cuda_architectures: 75-virtual;86-real;90-real;120-real;120-virtual build_jobs: "2" + - arch: x86_64 + runner: ubuntu-24.04 + cuda_repo_arch: x86_64 + cuda_version: "13.0" + cuda_package_suffix: "13-0" + cuda_home: /usr/local/cuda-13.0 + wheel_build_tag: 1cu130 + cuda_architectures: 75-virtual;80-real;86-real;90-real;121-real + build_jobs: "2" + - arch: aarch64 + runner: ubuntu-24.04-arm + cuda_repo_arch: sbsa + cuda_version: "13.0" + cuda_package_suffix: "13-0" + cuda_home: /usr/local/cuda-13.0 + wheel_build_tag: 1cu130 + cuda_architectures: 75-virtual;80-real;86-real;90-real;121-real + build_jobs: "2" env: QWENTTS_CPP_BACKEND: cuda QWENTTS_CPP_BUILD_JOBS: ${{ matrix.build_jobs }} diff --git a/AGENTS.md b/AGENTS.md index ab6e9be..dafbd32 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -16,6 +16,10 @@ only. Publishing multiple backend flavors under the same package name, version, and platform tag would leave pip with no reliable way to choose the intended runtime. +The PR wheel workflow may still build CPU and CUDA 13 wheels as downloadable +validation artifacts. Those artifacts are not uploaded to PyPI by the publish +workflow. + CUDA release wheels keep native cubins for sm_86, sm_90, and sm_120, plus PTX fallbacks for sm_75 and the newest supported CUDA architecture. This keeps the public CUDA 12.8 wheels under PyPI's default per-file upload limit while