Skip to content

Commit 6d807bb

Browse files
committed
[build] Update to CUDA 12.9.2, cuDNN 9.28.0.42
1 parent ec5d6c0 commit 6d807bb

2 files changed

Lines changed: 26 additions & 58 deletions

File tree

‎.github/workflows/build_wheels_windows.yml‎

Lines changed: 26 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -47,28 +47,28 @@ jobs:
4747
# which CUDA 12.9 nvcc cannot use as host compiler; windows-2022 keeps VS2022 (v143).
4848
- cuda-version: '12'
4949
runs-on: 'windows-2022'
50-
cuda-installer: 'cuda_12.9.1_windows_network.exe'
50+
cuda-installer: 'cuda_12.9.2_windows_x86_64_network.exe'
5151
cuda-path-version: 'v12.9'
52-
cudnn-archive: 'cudnn-windows-x86_64-9.18.1.3_cuda12-archive.zip'
53-
cudnn-folder: 'cudnn-windows-x86_64-9.18.1.3_cuda12-archive'
52+
cudnn-archive: 'cudnn-windows-x86_64-9.28.0.42_cuda12-archive.zip'
53+
cudnn-folder: 'cudnn-windows-x86_64-9.28.0.42_cuda12-archive'
5454
video-codec-sdk-archive: 'Video_Codec_SDK_13.0.37.zip'
5555
video-codec-sdk-folder: 'Video_Codec_SDK_13.0.37'
5656
cuda-arch-bin: '5.0;5.2;6.0;6.1;7.0;7.5;8.0;8.6;8.9;9.0;10.0'
5757
cuda-arch-ptx: '10.0'
58-
cache-key: 'nvidia-deps-cuda-12.9.1-cudnn-9.18.1.3'
58+
cache-key: 'nvidia-deps-cuda-12.9.2-cudnn-9.28.0.42-vcsdk-13.0.37'
5959
# TODO: CUDA 13 still blocked: 13.x rearranged the Windows DLL layout (affects bundling); 13.2 needs a 4.14-era contrib fix
6060
# CUDA 13: Supports Turing (7.5) through Blackwell (12.0)
6161
# - cuda-version: '13'
6262
# runs-on: 'windows-2022'
63-
# cuda-installer: 'cuda_13.1.1_windows_network.exe'
64-
# cuda-path-version: 'v13.1'
65-
# cudnn-archive: 'cudnn-windows-x86_64-9.18.1.3_cuda13-archive.zip'
66-
# cudnn-folder: 'cudnn-windows-x86_64-9.18.1.3_cuda13-archive'
63+
# cuda-installer: 'cuda_13.5.0_windows_x86_64_network.exe'
64+
# cuda-path-version: 'v13.5'
65+
# cudnn-archive: 'cudnn-windows-x86_64-9.28.0.42_cuda13-archive.zip'
66+
# cudnn-folder: 'cudnn-windows-x86_64-9.28.0.42_cuda13-archive'
6767
# video-codec-sdk-archive: 'Video_Codec_SDK_13.0.37.zip'
6868
# video-codec-sdk-folder: 'Video_Codec_SDK_13.0.37'
6969
# cuda-arch-bin: '7.5;8.0;8.6;8.9;9.0;10.0;12.0'
7070
# cuda-arch-ptx: '12.0'
71-
# cache-key: 'nvidia-deps-cuda-13.1.1-cudnn-9.18.1.3'
71+
# cache-key: 'nvidia-deps-cuda-13.5.0-cudnn-9.28.0.42-vcsdk-13.0.37'
7272
env:
7373
ACTIONS_ALLOW_UNSECURE_COMMANDS: true
7474
SDIST: 0
@@ -134,14 +134,27 @@ jobs:
134134
path: .deps/Nvidia
135135
key: ${{ matrix.cache-key }}
136136
- name: Clone NVIDIA dependencies
137+
# Only download the LFS objects this matrix entry uses. A plain clone pulls every
138+
# archive in the deps repo (several GB) and counts against the LFS bandwidth quota.
137139
if: steps.cache-nvidia-deps.outputs.cache-hit != 'true'
138140
env:
139141
SSH_PRIVATE_KEY: ${{ secrets.DEPS_REPO_SSH_KEY }}
140142
run: |
141143
eval "$(ssh-agent -s)"
142144
ssh-add - <<< "${SSH_PRIVATE_KEY}"
143145
ssh-keyscan github.com >> ~/.ssh/known_hosts 2>/dev/null
144-
git clone git@github.com:Breakthrough/opencv-python-cuda-deps.git .deps
146+
GIT_LFS_SKIP_SMUDGE=1 git clone --depth 1 git@github.com:Breakthrough/opencv-python-cuda-deps.git .deps
147+
files="Nvidia/${{ matrix.cuda-installer }},Nvidia/${{ matrix.cudnn-archive }},Nvidia/${{ matrix.video-codec-sdk-archive }}"
148+
git -C .deps lfs pull --include="$files"
149+
# Fail fast if a file is still an LFS pointer (~130 bytes) rather than real content.
150+
for f in ${files//,/ }; do
151+
size=$(stat -c %s ".deps/$f")
152+
echo "$f: $size bytes"
153+
if [ "$size" -lt 1000000 ]; then
154+
echo "::error::$f was not downloaded from LFS"
155+
exit 1
156+
fi
157+
done
145158
shell: bash
146159
- name: Install NVIDIA CUDA Toolkit
147160
run: |
@@ -195,9 +208,9 @@ jobs:
195208
if: ${{ inputs.restore_build_cache && !inputs.rolling_build }}
196209
with:
197210
path: _skbuild
198-
key: ${{ runner.os }}-opencv5-${{ matrix.python-version }}-cuda${{ matrix.cuda-version }}-${{ hashFiles('**/CMakeLists.txt') }}
211+
key: ${{ runner.os }}-opencv5-${{ matrix.python-version }}-cuda${{ matrix.cuda-version }}-${{ matrix.cache-key }}-${{ hashFiles('**/CMakeLists.txt') }}
199212
restore-keys: |
200-
${{ runner.os }}-opencv5-${{ matrix.python-version }}-cuda${{ matrix.cuda-version }}-
213+
${{ runner.os }}-opencv5-${{ matrix.python-version }}-cuda${{ matrix.cuda-version }}-${{ matrix.cache-key }}-
201214
202215
- name: Remove unused CUDA DLLs
203216
# Only bundle CUDA DLLs that cv2.pyd actually needs (determined via PE import analysis).
@@ -248,7 +261,7 @@ jobs:
248261
if: ${{ inputs.save_build_cache && !inputs.rolling_build }}
249262
with:
250263
path: _skbuild
251-
key: ${{ runner.os }}-opencv5-${{ matrix.python-version }}-cuda${{ matrix.cuda-version }}-${{ hashFiles('**/CMakeLists.txt') }}
264+
key: ${{ runner.os }}-opencv5-${{ matrix.python-version }}-cuda${{ matrix.cuda-version }}-${{ matrix.cache-key }}-${{ hashFiles('**/CMakeLists.txt') }}
252265
- name: Saving all wheels
253266
uses: actions/upload-artifact@v7
254267
with:

‎.github/workflows/cache_nvidia_deps.yml‎

Lines changed: 0 additions & 45 deletions
This file was deleted.

0 commit comments

Comments
 (0)