Skip to content
Merged
Show file tree
Hide file tree
Changes from 5 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
2 changes: 2 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ jobs:
build-type: pull-request
host-platform: ${{ matrix.host-platform }}
build-ctk-ver: ${{ needs.ci-vars.outputs.CUDA_BUILD_VER }}
matrix_filter: "select(([.CUDA_VER // empty | split(\".\")[] | tonumber] as $v | ($v[0] < 13)))"

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nitpick: can we programmatically derive 13 here and so we can have this unified across main and 12.9.x and allow it to nicely carry over to the future where we have main and 13.x.y?

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You want to derive the CUDA major version from the branch name? I see the motivation, just thinking through what we want to key from programatically.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Or from the version json file since it would always be aligned to the major version we want to use? It's not a big deal though where if we want to punt to a future PR that's totally fine.

@cryos cryos Sep 10, 2025

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Third time was the charm 🎉 I can look at it for a follow up, it shouldn't be much, but it would be good to get this merged now. Lots of meetings today sadly...


test-windows:
strategy:
Expand All @@ -90,6 +91,7 @@ jobs:
build-type: pull-request
host-platform: ${{ matrix.host-platform }}
build-ctk-ver: ${{ needs.ci-vars.outputs.CUDA_BUILD_VER }}
matrix_filter: "select(([.CUDA_VER // empty | split(\".\")[] | tonumber] as $v | ($v[0] < 13)))"

# doc:
# name: Docs
Expand Down
73 changes: 21 additions & 52 deletions .github/workflows/test-wheel-linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,74 +34,43 @@ jobs:
outputs:
MATRIX: ${{ steps.compute-matrix.outputs.MATRIX }}
steps:
- name: Checkout ${{ github.event.repository.name }}
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
with:
fetch-depth: 1

- name: Validate Test Type
run: |
if [[ "$BUILD_TYPE" != "pull-request" ]] && [[ "$BUILD_TYPE" != "nightly" ]] && [[ "$BUILD_TYPE" != "branch" ]]; then
echo "Invalid build type! Must be one of 'nightly', 'pull-request', or 'branch'."
exit 1
fi

- name: Compute Python Test Matrix
id: compute-matrix
run: |
# Set a default GPU based upon architecture.
gpu="l4"
if [[ "${ARCH}" == "arm64" ]]; then
gpu="a100"
fi
# Add a special entry for the H100 runner on amd64.
special_runner=""
if [[ "${ARCH}" == "amd64" ]]; then
special_runner="- { ARCH: ${ARCH}, PY_VER: '3.13', CUDA_VER: '12.9.0', LOCAL_CTK: '1', GPU: 'H100', DRIVER: 'latest' }"
fi

# Please keep the matrices sorted in ascending order by the following:
#
# [PY_VER, CUDA_VER, LOCAL_CTK, GPU, DRIVER]
#
# Note that DRIVER: `earliest` does not work with CUDA 12.9.0 and LOCAL_CTK: 0 does not work with CUDA 12.0.1.
#
export MATRICES="
pull-request:
- { ARCH: ${ARCH}, PY_VER: '3.9', CUDA_VER: '12.0.1', LOCAL_CTK: '1', GPU: ${gpu}, DRIVER: 'latest' }
- { ARCH: ${ARCH}, PY_VER: '3.9', CUDA_VER: '12.9.0', LOCAL_CTK: '0', GPU: ${gpu}, DRIVER: 'latest' }
- { ARCH: ${ARCH}, PY_VER: '3.10', CUDA_VER: '12.9.0', LOCAL_CTK: '1', GPU: ${gpu}, DRIVER: 'latest' }
- { ARCH: ${ARCH}, PY_VER: '3.11', CUDA_VER: '12.9.0', LOCAL_CTK: '0', GPU: ${gpu}, DRIVER: 'latest' }
- { ARCH: ${ARCH}, PY_VER: '3.12', CUDA_VER: '12.0.1', LOCAL_CTK: '1', GPU: ${gpu}, DRIVER: 'earliest' }
- { ARCH: ${ARCH}, PY_VER: '3.12', CUDA_VER: '12.9.0', LOCAL_CTK: '1', GPU: ${gpu}, DRIVER: 'latest' }
- { ARCH: ${ARCH}, PY_VER: '3.13', CUDA_VER: '12.0.1', LOCAL_CTK: '1', GPU: ${gpu}, DRIVER: 'latest' }
- { ARCH: ${ARCH}, PY_VER: '3.13', CUDA_VER: '12.9.0', LOCAL_CTK: '0', GPU: ${gpu}, DRIVER: 'latest' }
${special_runner}
nightly:
- { ARCH: ${ARCH}, PY_VER: '3.9', CUDA_VER: '12.0.1', LOCAL_CTK: '1', GPU: ${gpu}, DRIVER: 'latest' }
- { ARCH: ${ARCH}, PY_VER: '3.9', CUDA_VER: '12.9.0', LOCAL_CTK: '0', GPU: ${gpu}, DRIVER: 'latest' }
- { ARCH: ${ARCH}, PY_VER: '3.9', CUDA_VER: '12.9.0', LOCAL_CTK: '1', GPU: ${gpu}, DRIVER: 'latest' }
- { ARCH: ${ARCH}, PY_VER: '3.10', CUDA_VER: '12.0.1', LOCAL_CTK: '1', GPU: ${gpu}, DRIVER: 'latest' }
- { ARCH: ${ARCH}, PY_VER: '3.10', CUDA_VER: '12.9.0', LOCAL_CTK: '0', GPU: ${gpu}, DRIVER: 'latest' }
- { ARCH: ${ARCH}, PY_VER: '3.10', CUDA_VER: '12.9.0', LOCAL_CTK: '1', GPU: ${gpu}, DRIVER: 'latest' }
- { ARCH: ${ARCH}, PY_VER: '3.11', CUDA_VER: '12.0.1', LOCAL_CTK: '1', GPU: ${gpu}, DRIVER: 'latest' }
- { ARCH: ${ARCH}, PY_VER: '3.11', CUDA_VER: '12.9.0', LOCAL_CTK: '0', GPU: ${gpu}, DRIVER: 'latest' }
- { ARCH: ${ARCH}, PY_VER: '3.11', CUDA_VER: '12.9.0', LOCAL_CTK: '1', GPU: ${gpu}, DRIVER: 'latest' }
- { ARCH: ${ARCH}, PY_VER: '3.12', CUDA_VER: '12.0.1', LOCAL_CTK: '1', GPU: ${gpu}, DRIVER: 'latest' }
- { ARCH: ${ARCH}, PY_VER: '3.12', CUDA_VER: '12.9.0', LOCAL_CTK: '0', GPU: ${gpu}, DRIVER: 'latest' }
- { ARCH: ${ARCH}, PY_VER: '3.12', CUDA_VER: '12.9.0', LOCAL_CTK: '1', GPU: ${gpu}, DRIVER: 'latest' }
- { ARCH: ${ARCH}, PY_VER: '3.13', CUDA_VER: '12.0.1', LOCAL_CTK: '1', GPU: ${gpu}, DRIVER: 'latest' }
- { ARCH: ${ARCH}, PY_VER: '3.13', CUDA_VER: '12.9.0', LOCAL_CTK: '0', GPU: ${gpu}, DRIVER: 'latest' }
- { ARCH: ${ARCH}, PY_VER: '3.13', CUDA_VER: '12.9.0', LOCAL_CTK: '1', GPU: ${gpu}, DRIVER: 'latest' }
${special_runner}
"

# Use the nightly matrix for branch tests
MATRIX_TYPE="${BUILD_TYPE}"
if [[ "${MATRIX_TYPE}" == "branch" ]]; then
MATRIX_TYPE="nightly"
fi
export MATRIX_TYPE
TEST_MATRIX=$(yq -n 'env(MATRICES) | .[strenv(MATRIX_TYPE)]')
export TEST_MATRIX

# Read base matrix from JSON file for the specific architecture
TEST_MATRIX=$(jq --arg arch "$ARCH" --arg matrix_type "$MATRIX_TYPE" '
.linux[$matrix_type] |
map(select(.ARCH == $arch))
' ci/test-matrix.json)

# Add special runner for amd64 if applicable
if [[ "${ARCH}" == "amd64" ]]; then
SPECIAL_RUNNERS=$(jq '
.linux.special_runners.amd64
' ci/test-matrix.json)
TEST_MATRIX=$(jq --argjson special "$SPECIAL_RUNNERS" '. + $special' <<< "$TEST_MATRIX")
fi

MATRIX="$(
yq -n -o json 'env(TEST_MATRIX)' | \
jq -c '${{ inputs.matrix_filter }} | if (. | length) > 0 then {include: .} else "Error: Empty matrix\n" | halt_error(1) end'
jq -c '${{ inputs.matrix_filter }} | if (. | length) > 0 then {include: .} else "Error: Empty matrix\n" | halt_error(1) end' <<< "$TEST_MATRIX"
)"

echo "MATRIX=${MATRIX}" | tee --append "${GITHUB_OUTPUT}"
Expand Down
41 changes: 23 additions & 18 deletions .github/workflows/test-wheel-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,11 @@ jobs:
outputs:
MATRIX: ${{ steps.compute-matrix.outputs.MATRIX }}
steps:
- name: Checkout ${{ github.event.repository.name }}
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
with:
fetch-depth: 1

- name: Validate Test Type
run: |
if [[ "$BUILD_TYPE" != "pull-request" ]] && [[ "$BUILD_TYPE" != "nightly" ]] && [[ "$BUILD_TYPE" != "branch" ]]; then
Expand All @@ -41,57 +46,56 @@ jobs:
- name: Compute Python Test Matrix
id: compute-matrix
run: |
# Please keep the matrices sorted in ascending order by the following:
#
# [PY_VER, CUDA_VER, LOCAL_CTK]
#
export MATRICES="
pull-request:
- { ARCH: ${ARCH}, PY_VER: '3.12', CUDA_VER: '12.9.0', LOCAL_CTK: '0' }
- { ARCH: ${ARCH}, PY_VER: '3.12', CUDA_VER: '12.9.0', LOCAL_CTK: '1' }
nightly:
- { ARCH: ${ARCH}, PY_VER: '3.12', CUDA_VER: '12.9.0', LOCAL_CTK: '0' }
- { ARCH: ${ARCH}, PY_VER: '3.12', CUDA_VER: '12.9.0', LOCAL_CTK: '1' }
"

# Use the nightly matrix for branch tests
MATRIX_TYPE="${BUILD_TYPE}"
if [[ "${MATRIX_TYPE}" == "branch" ]]; then
MATRIX_TYPE="nightly"
fi
export MATRIX_TYPE
TEST_MATRIX=$(yq -n 'env(MATRICES) | .[strenv(MATRIX_TYPE)]')
export TEST_MATRIX

# Read base matrix from JSON file for the specific architecture
TEST_MATRIX=$(jq --arg arch "$ARCH" --arg matrix_type "$MATRIX_TYPE" '
.windows[$matrix_type] |
map(select(.ARCH == $arch))
' ci/test-matrix.json)

MATRIX="$(
yq -n -o json 'env(TEST_MATRIX)' | \
jq -c '${{ inputs.matrix_filter }} | if (. | length) > 0 then {include: .} else "Error: Empty matrix\n" | halt_error(1) end'
jq -c '${{ inputs.matrix_filter }} | if (. | length) > 0 then {include: .} else "Error: Empty matrix\n" | halt_error(1) end' <<< "$TEST_MATRIX"
)"

echo "MATRIX=${MATRIX}" | tee --append "${GITHUB_OUTPUT}"

test:
# TODO: switch to this once the self-hosted runners are ready
# name: py${{ matrix.PY_VER }}, ${{ matrix.CUDA_VER }}, ${{ (matrix.LOCAL_CTK == '1' && 'local') || 'wheels' }}, GPU ${{ matrix.GPU }}
Comment thread
kkraus14 marked this conversation as resolved.
Outdated
name: py${{ matrix.PY_VER }}, ${{ matrix.CUDA_VER }}, ${{ (matrix.LOCAL_CTK == '1' && 'local') || 'wheels' }}
# The build stage could fail but we want the CI to keep moving.
needs: compute-matrix
strategy:
fail-fast: false
matrix: ${{ fromJSON(needs.compute-matrix.outputs.MATRIX) }}
if: ${{ github.repository_owner == 'nvidia' && !cancelled() }}
# TODO: switch to self-hosted runners once they are ready
# runs-on: "windows-${{ matrix.ARCH }}-gpu-${{ matrix.GPU }}-${{ matrix.DRIVER }}-1"
Comment thread
kkraus14 marked this conversation as resolved.
Outdated
runs-on: 'cuda-python-windows-gpu-github'
steps:
- name: Checkout ${{ github.event.repository.name }}
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
fetch-depth: 0

# TODO: use setup-proxy-cache once we have self-hosted Windows runners
# - name: Setup proxy cache
# uses: nv-gha-runners/setup-proxy-cache@main
# continue-on-error: true
Comment thread
kkraus14 marked this conversation as resolved.
Outdated

- name: Update driver
run: |
.github/workflows/install_gpu_driver.ps1

- name: Ensure GPU is working
run: nvidia-smi

# TODO: remove this block once self-hosted runners are ready
Comment thread
kkraus14 marked this conversation as resolved.
Outdated
- name: Install Git for Windows
# the GPU runner image does not have Git Bash pre-installed...
env:
Expand Down Expand Up @@ -131,6 +135,7 @@ jobs:
name: ${{ env.CUDA_BINDINGS_ARTIFACT_NAME }}
path: ${{ env.CUDA_BINDINGS_ARTIFACTS_DIR }}

# TODO: remove this block once self-hosted runners are ready
Comment thread
kkraus14 marked this conversation as resolved.
Outdated
- name: Install gh cli
# the GPU runner image does not have gh pre-installed...
env:
Expand Down
Loading
Loading