Skip to content

address PR comments and add proper docstrings and type hints in the c… #141

address PR comments and add proper docstrings and type hints in the c…

address PR comments and add proper docstrings and type hints in the c… #141

Workflow file for this run

# CI wheel build — validates that extensions compile.
# Wheels saved as artifacts only (no upload).
# For publishing, use publish.yml (manual workflow_dispatch).
#
# Matrix: PyTorch 2.8, 2.9, 2.10
# x86_64: ABI=TRUE + ABI=FALSE
# ARM64: ABI=TRUE only (pip doesn't publish ARM CUDA wheels)
#
# Each NGC container pins a CUDA toolkit (nvcc) version used for compilation.
# For ABI=FALSE, pip torch is reinstalled on top of the NGC container
# to get old-ABI libtorch while keeping nvcc for compilation.
name: Build wheels (CI)
on:
push:
branches: [main, "kdidi/**"]
paths:
- "CMakeLists.txt"
- "pyproject.toml"
- "tmol/**"
- ".github/workflows/**"
- "MANIFEST.in"
workflow_dispatch:
jobs:
build_wheels:
name: Build Wheel (${{ matrix.torch-version }}, abi=${{ matrix.cxx11_abi }}, ${{ matrix.arch }})
strategy:
fail-fast: false
matrix:
include:
# ═══════════════════════════════════════════════════════════════
# x86_64 — ABI=TRUE (NGC PyTorch, native)
# ═══════════════════════════════════════════════════════════════
- container-image: nvcr.io/nvidia/pytorch:25.06-py3
torch-version: "2.8"
cxx11_abi: "TRUE"
runs-on: ubuntu-22.04
arch: x86_64
- container-image: nvcr.io/nvidia/pytorch:25.10-py3
torch-version: "2.9"
cxx11_abi: "TRUE"
runs-on: ubuntu-22.04
arch: x86_64
- container-image: nvcr.io/nvidia/pytorch:26.01-py3
torch-version: "2.10"
cxx11_abi: "TRUE"
runs-on: ubuntu-22.04
arch: x86_64
# ═══════════════════════════════════════════════════════════════
# x86_64 — ABI=FALSE (pip torch, old ABI)
# ═══════════════════════════════════════════════════════════════
- container-image: nvcr.io/nvidia/pytorch:25.06-py3
torch-version: "2.8"
cxx11_abi: "FALSE"
pip-torch-cuda-url: "https://download.pytorch.org/whl/cu126"
runs-on: ubuntu-22.04
arch: x86_64
- container-image: nvcr.io/nvidia/pytorch:25.06-py3
torch-version: "2.9"
cxx11_abi: "FALSE"
pip-torch-cuda-url: "https://download.pytorch.org/whl/cu126"
runs-on: ubuntu-22.04
arch: x86_64
- container-image: nvcr.io/nvidia/pytorch:25.06-py3
torch-version: "2.10"
cxx11_abi: "FALSE"
pip-torch-cuda-url: "https://download.pytorch.org/whl/cu126"
runs-on: ubuntu-22.04
arch: x86_64
# ═══════════════════════════════════════════════════════════════
# ARM64 — ABI=TRUE only (pip doesn't publish ARM CUDA wheels)
# Docker auto-pulls the ARM variant of multi-arch NGC images.
# ═══════════════════════════════════════════════════════════════
- container-image: nvcr.io/nvidia/pytorch:25.06-py3
torch-version: "2.8"
cxx11_abi: "TRUE"
runs-on: ubuntu-24.04-arm
arch: aarch64
- container-image: nvcr.io/nvidia/pytorch:25.10-py3
torch-version: "2.9"
cxx11_abi: "TRUE"
runs-on: ubuntu-24.04-arm
arch: aarch64
- container-image: nvcr.io/nvidia/pytorch:26.01-py3
torch-version: "2.10"
cxx11_abi: "TRUE"
runs-on: ubuntu-24.04-arm
arch: aarch64
# ═══════════════════════════════════════════════════════════════
# Python 3.10 (cp310) — NGC 24.10 container (Python 3.10, CUDA 12.6)
# ═══════════════════════════════════════════════════════════════
# ── x86_64 ABI=TRUE (cp310) ──
- container-image: nvcr.io/nvidia/pytorch:24.10-py3
torch-version: "2.8"
cxx11_abi: "TRUE"
pip-torch-cuda-url: "https://download.pytorch.org/whl/cu126"
runs-on: ubuntu-22.04
arch: x86_64
python-version: "310"
- container-image: nvcr.io/nvidia/pytorch:24.10-py3
torch-version: "2.9"
cxx11_abi: "TRUE"
pip-torch-cuda-url: "https://download.pytorch.org/whl/cu126"
runs-on: ubuntu-22.04
arch: x86_64
python-version: "310"
- container-image: nvcr.io/nvidia/pytorch:24.10-py3
torch-version: "2.10"
cxx11_abi: "TRUE"
pip-torch-cuda-url: "https://download.pytorch.org/whl/cu126"
runs-on: ubuntu-22.04
arch: x86_64
python-version: "310"
# ── x86_64 ABI=FALSE (cp310) ──
- container-image: nvcr.io/nvidia/pytorch:24.10-py3
torch-version: "2.8"
cxx11_abi: "FALSE"
pip-torch-cuda-url: "https://download.pytorch.org/whl/cu126"
runs-on: ubuntu-22.04
arch: x86_64
python-version: "310"
- container-image: nvcr.io/nvidia/pytorch:24.10-py3
torch-version: "2.9"
cxx11_abi: "FALSE"
pip-torch-cuda-url: "https://download.pytorch.org/whl/cu126"
runs-on: ubuntu-22.04
arch: x86_64
python-version: "310"
- container-image: nvcr.io/nvidia/pytorch:24.10-py3
torch-version: "2.10"
cxx11_abi: "FALSE"
pip-torch-cuda-url: "https://download.pytorch.org/whl/cu126"
runs-on: ubuntu-22.04
arch: x86_64
python-version: "310"
# ARM64 cp310: removed — pip doesn't publish ARM CUDA wheels,
# so we can't pip-install torch into the 24.10 container for ARM.
# ARM cp312 builds use NGC containers directly (no pip reinstall).
# ═══════════════════════════════════════════════════════════════
# Python 3.11 (cp311) — NGC 24.10 container + pip torch/cu126
# Python 3.11 is provisioned inside the container at build time.
# ═══════════════════════════════════════════════════════════════
# ── x86_64 ABI=TRUE (cp311) ──
- container-image: nvcr.io/nvidia/pytorch:24.10-py3
torch-version: "2.8"
cxx11_abi: "TRUE"
pip-torch-cuda-url: "https://download.pytorch.org/whl/cu126"
runs-on: ubuntu-22.04
arch: x86_64
python-version: "311"
- container-image: nvcr.io/nvidia/pytorch:24.10-py3
torch-version: "2.9"
cxx11_abi: "TRUE"
pip-torch-cuda-url: "https://download.pytorch.org/whl/cu126"
runs-on: ubuntu-22.04
arch: x86_64
python-version: "311"
- container-image: nvcr.io/nvidia/pytorch:24.10-py3
torch-version: "2.10"
cxx11_abi: "TRUE"
pip-torch-cuda-url: "https://download.pytorch.org/whl/cu126"
runs-on: ubuntu-22.04
arch: x86_64
python-version: "311"
# ── x86_64 ABI=FALSE (cp311) ──
- container-image: nvcr.io/nvidia/pytorch:24.10-py3
torch-version: "2.8"
cxx11_abi: "FALSE"
pip-torch-cuda-url: "https://download.pytorch.org/whl/cu126"
runs-on: ubuntu-22.04
arch: x86_64
python-version: "311"
- container-image: nvcr.io/nvidia/pytorch:24.10-py3
torch-version: "2.9"
cxx11_abi: "FALSE"
pip-torch-cuda-url: "https://download.pytorch.org/whl/cu126"
runs-on: ubuntu-22.04
arch: x86_64
python-version: "311"
- container-image: nvcr.io/nvidia/pytorch:24.10-py3
torch-version: "2.10"
cxx11_abi: "FALSE"
pip-torch-cuda-url: "https://download.pytorch.org/whl/cu126"
runs-on: ubuntu-22.04
arch: x86_64
python-version: "311"
uses: ./.github/workflows/_build_wheel.yml
with:
runs-on: ${{ matrix.runs-on }}
container-image: ${{ matrix.container-image }}
torch-version: ${{ matrix.torch-version }}
cxx11_abi: ${{ matrix.cxx11_abi }}
python-version: ${{ matrix.python-version || '312' }}
pip-torch-cuda-url: ${{ matrix.pip-torch-cuda-url || '' }}