Repository navigation
CI: allow specifying custom driver versions in test matrix #2176
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 1 commit
Commits
Show all changes
18 commits
Select commit
Hold shift + click to select a range
b1b6070
CI: allow specifying custom driver versions in test matrix
leofang 3e016b5
CI: fix Linux driver nsenter re-exec, swap Windows version, enable ci…
leofang c0ca869
CI: move 'Ensure GPU is working' after 'Install GPU driver' on Linux
leofang 4a23b23
CI: flip two PR-matrix Linux rows to DRIVER=610.43.02
leofang d33a928
CI: restart nvidia-persistenced on Linux; poll nvidia-smi on Windows
leofang 00896dc
CI: re-enable persistence mode after Linux driver swap
leofang 0d5f0e9
CI: preserve SUID bit when refreshing container nvidia binaries
leofang 3dfaa84
CI: exec nvidia-persistenced directly after Linux driver swap
leofang 701cf2f
CI: pass --user root to nvidia-persistenced after Linux driver swap
leofang a3f1573
CI: add fast-feedback probe-driver-swap job (workflow_dispatch only)
leofang c5fef92
CI: drop workflow_dispatch gate on probe-driver-swap so it runs on ev…
leofang f17dd7f
CI: stop refresh_container_libs from clobbering /run/nvidia-persistenced
leofang 6412f4f
CI: take down nvidia-persistenced via pkill, not systemctl
leofang 2b34f1f
CI: re-bind /run/nvidia-persistenced into container after driver swap
leofang 8d8a9ef
CI: drop install_gpu_driver.sh experiments that turned out non-load-b…
leofang d2c25eb
Revert: remove the probe-driver-swap fast-feedback job
leofang fa7940a
CI: address Mike's review comments on PR 2176
leofang 8dfd06e
Merge branch 'main' into leof/ci-custom-driver-versions
leofang File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next
Next commit
CI: allow specifying custom driver versions in test matrix
Extends the DRIVER field in ci/test-matrix.yml beyond 'latest'/'earliest' to accept an explicit version string (e.g. '580.65.06'). For Linux, ci/tools/install_gpu_driver.sh (adapted from nv-gha-runners/vm-images PR #256) swaps the driver in-job via nsenter when the row uses a custom version; for Windows, ci/tools/install_gpu_driver.ps1 is split into install + configure_driver_mode, with the install step gated on the DRIVER value and the mode step always running. The matrix row is routed to a 'latest' runner image when the DRIVER is a custom version (the install scripts perform the swap themselves). Container privileges on Linux (--privileged --pid=host) are added only on rows with a custom DRIVER. Custom DRIVER + FLAVOR=wsl is rejected eagerly in the compute-matrix step. Two existing nightly-numba-cuda rows exercise the new path: - Linux amd64 / 13.3.0 / l4 -> 580.65.06 - Windows amd64 / 13.3.0 / l4 -> 610.47 Closes #293 Closes #1265
- Loading branch information
commit b1b6070a823898a01e87c49cb1682f6d65a96eb9
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -13,7 +13,16 @@ | |
| # Windows entries also include DRIVER_MODE. | ||
| # | ||
| # Notes: | ||
| # - DRIVER accepts: | ||
| # * 'latest' - use the runner's pre-installed latest driver (no install step) | ||
| # * 'earliest' - use the runner's pre-installed earliest driver (no install step) | ||
| # * a version string (e.g. '580.65.06') | ||
| # - install that version via ci/tools/install_gpu_driver.sh (Linux) | ||
| # or ci/tools/install_gpu_driver.ps1 (Windows) at the start of the | ||
| # job. The matrix row is routed to the 'latest' runner image (the | ||
| # install scripts swap the driver themselves). | ||
| # - DRIVER: 'earliest' does not work with CUDA 12.9.1 | ||
| # - DRIVER: a custom version is not supported with FLAVOR=wsl on Linux. | ||
|
|
||
| linux: | ||
| pull-request: | ||
|
|
@@ -74,7 +83,7 @@ linux: | |
| - { MODE: 'nightly-pytorch', ARCH: 'arm64', PY_VER: '3.12', CUDA_VER: '13.0.2', LOCAL_CTK: '0', GPU: 'l4', GPU_COUNT: '1', DRIVER: 'latest', TORCH_VER: '2.9.1', TORCH_CUDA: 'cu130' } | ||
| # nightly-numba-cuda | ||
| - { MODE: 'nightly-numba-cuda', ARCH: 'amd64', PY_VER: '3.12', CUDA_VER: '12.9.1', LOCAL_CTK: '0', GPU: 'l4', GPU_COUNT: '1', DRIVER: 'latest' } | ||
| - { MODE: 'nightly-numba-cuda', ARCH: 'amd64', PY_VER: '3.12', CUDA_VER: '13.3.0', LOCAL_CTK: '0', GPU: 'l4', GPU_COUNT: '1', DRIVER: 'latest' } | ||
| - { MODE: 'nightly-numba-cuda', ARCH: 'amd64', PY_VER: '3.12', CUDA_VER: '13.3.0', LOCAL_CTK: '0', GPU: 'l4', GPU_COUNT: '1', DRIVER: '580.65.06' } | ||
|
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
| - { MODE: 'nightly-numba-cuda', ARCH: 'arm64', PY_VER: '3.12', CUDA_VER: '12.9.1', LOCAL_CTK: '0', GPU: 'l4', GPU_COUNT: '1', DRIVER: 'latest' } | ||
| - { MODE: 'nightly-numba-cuda', ARCH: 'arm64', PY_VER: '3.12', CUDA_VER: '13.3.0', LOCAL_CTK: '0', GPU: 'l4', GPU_COUNT: '1', DRIVER: 'latest' } | ||
| # nightly-standard (arm64 l4×2 — nightly-only per runner team request) | ||
|
|
@@ -113,4 +122,4 @@ windows: | |
| - { MODE: 'nightly-pytorch', ARCH: 'amd64', PY_VER: '3.12', CUDA_VER: '13.0.2', LOCAL_CTK: '0', GPU: 'l4', GPU_COUNT: '1', DRIVER: 'latest', DRIVER_MODE: 'TCC', TORCH_VER: '2.9.1', TORCH_CUDA: 'cu130' } | ||
| # nightly-numba-cuda | ||
| - { MODE: 'nightly-numba-cuda', ARCH: 'amd64', PY_VER: '3.12', CUDA_VER: '12.9.1', LOCAL_CTK: '0', GPU: 'l4', GPU_COUNT: '1', DRIVER: 'latest', DRIVER_MODE: 'TCC' } | ||
| - { MODE: 'nightly-numba-cuda', ARCH: 'amd64', PY_VER: '3.12', CUDA_VER: '13.3.0', LOCAL_CTK: '0', GPU: 'l4', GPU_COUNT: '1', DRIVER: 'latest', DRIVER_MODE: 'TCC' } | ||
| - { MODE: 'nightly-numba-cuda', ARCH: 'amd64', PY_VER: '3.12', CUDA_VER: '13.3.0', LOCAL_CTK: '0', GPU: 'l4', GPU_COUNT: '1', DRIVER: '610.47', DRIVER_MODE: 'TCC' } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,45 @@ | ||
| # SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. | ||
| # | ||
| # SPDX-License-Identifier: Apache-2.0 | ||
| # | ||
| # configure_driver_mode.ps1 -- set the NVIDIA driver mode on a Windows CI | ||
| # runner and cycle the display devices so the new mode takes effect | ||
| # without rebooting. Always runs (whether or not install_gpu_driver.ps1 | ||
| # just ran). When install_gpu_driver.ps1 has run, this single device | ||
| # cycle also activates the freshly-installed driver. | ||
| # | ||
| # Inputs (env): | ||
| # DRIVER_MODE One of WDDM, TCC, MCDM. | ||
|
|
||
| function Set-DriverMode { | ||
|
|
||
| # Map matrix DRIVER_MODE to nvidia-smi -fdm code. | ||
| # This assumes we have the prior knowledge on which GPU can use which mode. | ||
| $driver_mode = $env:DRIVER_MODE | ||
| if ($driver_mode -eq "WDDM") { | ||
| Write-Output "Setting driver mode to WDDM..." | ||
| nvidia-smi -fdm 0 | ||
| } elseif ($driver_mode -eq "TCC") { | ||
| Write-Output "Setting driver mode to TCC..." | ||
| nvidia-smi -fdm 1 | ||
| } elseif ($driver_mode -eq "MCDM") { | ||
| Write-Output "Setting driver mode to MCDM..." | ||
| nvidia-smi -fdm 2 | ||
| } else { | ||
| Write-Output "Unknown driver mode: $driver_mode" | ||
| exit 1 | ||
| } | ||
|
|
||
| # Only restart NVIDIA display adapters, not other display devices (e.g. QEMU VGA) | ||
| $nvidia_devices = Get-PnpDevice -Class Display -FriendlyName "NVIDIA*" | ||
| foreach ($device in $nvidia_devices) { | ||
| Write-Output "Restarting device: $($device.FriendlyName) ($($device.InstanceId))" | ||
| pnputil /disable-device "$($device.InstanceId)" | ||
| pnputil /enable-device "$($device.InstanceId)" | ||
| } | ||
|
leofang marked this conversation as resolved.
Resolved
|
||
| # Give it a minute to settle: | ||
| Start-Sleep -Seconds 5 | ||
| } | ||
|
|
||
| # Run the functions | ||
| Set-DriverMode | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.