- Add cu128/cu130 build matrix to release workflow - Parametrize Dockerfile and docker-compose with CUDA_TAG build arg - Allow csrc/ and setup.py in docker context via .dockerignore - Add nvcc/torch CUDA version mismatch preflight warning in setup.py - Add cuda_toolkit_version() helper in csrc/build.py - Use at::IntArrayRef explicitly to fix ATen overload ambiguity - Guard kernels with CUDART_VERSION >= 11020 check - Remove invalid [tool.pip] section from pyproject.toml
101 lines
2.6 KiB
YAML
101 lines
2.6 KiB
YAML
name: Release
|
|
|
|
on:
|
|
push:
|
|
tags:
|
|
- "v*"
|
|
|
|
jobs:
|
|
build-pure:
|
|
name: Build pure-Python wheel
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: actions/setup-python@v5
|
|
with:
|
|
python-version: "3.12"
|
|
|
|
- name: Build wheel (no CUDA)
|
|
run: |
|
|
pip wheel . --no-deps -w dist/
|
|
|
|
- uses: actions/upload-artifact@v4
|
|
with:
|
|
name: pure-wheel
|
|
path: dist/*.whl
|
|
if-no-files-found: error
|
|
|
|
build-cuda-linux:
|
|
name: Build CUDA wheel (Linux, ${{ matrix.cuda_tag }})
|
|
runs-on: ubuntu-latest
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
include:
|
|
- cuda_tag: "cu128"
|
|
cuda_ver: "12.8.0"
|
|
- cuda_tag: "cu130"
|
|
cuda_ver: "13.0.0"
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: actions/setup-python@v5
|
|
with:
|
|
python-version: "3.12"
|
|
|
|
- name: Install torch (${{ matrix.cuda_tag }})
|
|
run: |
|
|
pip install torch --index-url https://download.pytorch.org/whl/${{ matrix.cuda_tag }}
|
|
|
|
- name: Setup CUDA (${{ matrix.cuda_ver }})
|
|
uses: Jimver/cuda-toolkit@v0.2.35
|
|
with:
|
|
cuda: "${{ matrix.cuda_ver }}"
|
|
|
|
- name: Build wheel (with CUDA kernels)
|
|
run: |
|
|
CSRC_KERNELS=true pip wheel . --no-deps --no-build-isolation -w dist/
|
|
|
|
- uses: actions/upload-artifact@v4
|
|
with:
|
|
name: cuda-wheel-linux-${{ matrix.cuda_tag }}
|
|
path: dist/*.whl
|
|
if-no-files-found: error
|
|
|
|
release:
|
|
name: Attach wheels to release
|
|
needs: [build-pure, build-cuda-linux]
|
|
runs-on: ubuntu-latest
|
|
permissions:
|
|
contents: write
|
|
steps:
|
|
- name: Download pure-Python wheel
|
|
uses: actions/download-artifact@v4
|
|
with:
|
|
name: pure-wheel
|
|
path: release-assets/pure
|
|
|
|
- name: Download CUDA wheels (all variants)
|
|
uses: actions/download-artifact@v4
|
|
with:
|
|
pattern: cuda-wheel-linux-*
|
|
merge-multiple: true
|
|
path: release-assets/cuda
|
|
|
|
- name: Verify release assets
|
|
shell: bash
|
|
run: |
|
|
set -euo pipefail
|
|
pure_wheels=(release-assets/pure/*.whl)
|
|
cuda_wheels=(release-assets/cuda/*.whl)
|
|
test "${#pure_wheels[@]}" -eq 1
|
|
test "${#cuda_wheels[@]}" -ge 1
|
|
|
|
- name: Create release & upload assets
|
|
uses: softprops/action-gh-release@v2
|
|
with:
|
|
files: |
|
|
release-assets/pure/*.whl
|
|
release-assets/cuda/*.whl
|
|
tag_name: ${{ github.ref_name }}
|
|
generate_release_notes: true
|