Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 33 additions & 0 deletions .github/actions/setup-cuda/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: 'Setup CUDA Toolkit'
description: 'Install CUDA toolkit and configure Conda environment variables for pixi'

inputs:
cuda-version:
description: 'CUDA version to install (e.g., 12.9.0)'
required: true

runs:
using: 'composite'
steps:
- name: Install CUDA Toolkit (Windows only)
# Skip Ubuntu due to CUDA 12.9.0 installer bug: boost::filesystem::copy_file error
# For wheel builds, we only need CONDA_OVERRIDE_CUDA (PyTorch includes CUDA runtime)
if: runner.os == 'Windows'
uses: Jimver/[email protected]
with:
cuda: ${{ inputs.cuda-version }}

- name: Check CUDA Version (Windows only)
if: runner.os == 'Windows'
shell: bash
run: |
nvcc --version

- name: Set Conda environment variables
shell: bash
run: |
CUDA_MAJOR=$(echo ${{ inputs.cuda-version }} | cut -d'.' -f1)
echo "CONDA_OVERRIDE_CUDA=$CUDA_MAJOR" >> $GITHUB_ENV
if [[ "$RUNNER_OS" == "Linux" ]]; then
echo "Skipping CUDA installation on Ubuntu (using mock CUDA $CUDA_MAJOR for pixi)"
fi
4 changes: 4 additions & 0 deletions .github/workflows/ci_macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@ on:
- "**/website/**"
workflow_dispatch:

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
momentum:
# Enabled for minimal macOS platform coverage
Expand Down
26 changes: 9 additions & 17 deletions .github/workflows/ci_ubuntu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@ on:
- "**/website/**"
workflow_dispatch:

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
momentum:
name: cpp${{ matrix.simd == 'ON' && '-simd' || '' }}-${{ matrix.mode == '' && 'opt' || 'dev' }}-ubuntu
Expand Down Expand Up @@ -62,8 +66,8 @@ jobs:
fail-fast: false
matrix:
include:
- pixi_env: "cpu"
- pixi_env: "gpu"
- pixi_env: "py312"
- pixi_env: "py312-cuda129"
cuda_version: "12.9.0"
env:
FULL_CUDA_VERSION: ${{ matrix.cuda_version }}
Expand All @@ -82,23 +86,11 @@ jobs:
- name: Checkout
uses: actions/checkout@v5

- name: Install CUDA Toolkit
- name: Setup CUDA
if: ${{ contains(matrix.pixi_env, 'cuda') || contains(matrix.pixi_env, 'gpu') }}
uses: Jimver/[email protected]
id: cuda-toolkit
uses: ./.github/actions/setup-cuda
with:
# Available versions: https://github.com/Jimver/cuda-toolkit/blob/v0.2.24/src/links/linux-links.ts
cuda: ${{ matrix.cuda_version }}

- name: Check CUDA Version
if: ${{ contains(matrix.pixi_env, 'cuda') || contains(matrix.pixi_env, 'gpu') }}
run: |
nvcc --version

- name: Set Conda environment variables
if: ${{ contains(matrix.pixi_env, 'cuda') || contains(matrix.pixi_env, 'gpu') }}
run: |
echo "CONDA_OVERRIDE_CUDA=$(echo $FULL_CUDA_VERSION | cut -d'.' -f1)" >> $GITHUB_ENV
cuda-version: ${{ matrix.cuda_version }}

- name: Set up pixi
uses: prefix-dev/[email protected]
Expand Down
28 changes: 9 additions & 19 deletions .github/workflows/ci_windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@ on:
- "**/website/**"
workflow_dispatch:

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
momentum:
if: false # Temporarily disabled to reduce CI cost
Expand Down Expand Up @@ -54,35 +58,21 @@ jobs:
fail-fast: false
matrix:
include:
- pixi_env: "cpu"
- pixi_env: "py312"
# GPU disabled to reduce CI cost
# - pixi_env: "gpu"
# - pixi_env: "py312-cuda129"
# cuda_version: "12.9.0"
env:
FULL_CUDA_VERSION: ${{ matrix.cuda_version }}
steps:
- name: Checkout
uses: actions/checkout@v5

- name: Install CUDA Toolkit
- name: Setup CUDA
if: ${{ contains(matrix.pixi_env, 'cuda') || contains(matrix.pixi_env, 'gpu') }}
uses: Jimver/[email protected]
id: cuda-toolkit
uses: ./.github/actions/setup-cuda
with:
# Available versions: https://github.com/Jimver/cuda-toolkit/blob/v0.2.24/src/links/linux-links.ts
cuda: ${{ matrix.cuda_version }}

- name: Check CUDA Version
if: ${{ contains(matrix.pixi_env, 'cuda') || contains(matrix.pixi_env, 'gpu') }}
run: |
nvcc --version

- name: Set Conda environment variables
if: ${{ contains(matrix.pixi_env, 'cuda') || contains(matrix.pixi_env, 'gpu') }}
shell: pwsh
run: |
$majorVersion = $Env:FULL_CUDA_VERSION.Split('.')[0]
"CONDA_OVERRIDE_CUDA=$majorVersion" | Out-File -FilePath $Env:GITHUB_ENV -Encoding utf8 -Append
cuda-version: ${{ matrix.cuda_version }}

- name: Set up pixi
uses: prefix-dev/[email protected]
Expand Down
Loading
Loading