Skip to content

Commit c5fe6b2

Browse files
.github/workflows/windows-ort.yml: upgrade to ort 1.23.0 and cuda 12.9.1
1 parent d4eee50 commit c5fe6b2

1 file changed

Lines changed: 21 additions & 48 deletions

File tree

.github/workflows/windows-ort.yml

Lines changed: 21 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ on:
2020

2121
jobs:
2222
build-windows:
23-
runs-on: windows-2022
23+
runs-on: windows-2025
2424

2525
defaults:
2626
run:
@@ -39,44 +39,12 @@ jobs:
3939
- name: Setup Ninja
4040
run: pip install ninja
4141

42-
- name: Cache protobuf
43-
id: cache-protobuf
44-
uses: actions/cache@v4
45-
with:
46-
path: vsort/protobuf/install
47-
key: ${{ runner.os }}-vsort-protobuf-v4
48-
49-
- name: Checkout protobuf
50-
uses: actions/checkout@v4
51-
if: steps.cache-protobuf.outputs.cache-hit != 'true'
52-
with:
53-
repository: protocolbuffers/protobuf
54-
# follows protobuf in https://github.com/AmusementClub/onnxruntime/blob/master/cmake/external/onnxruntime_external_deps.cmake#L203
55-
# if you change this, remember to bump the version of the cache key.
56-
ref: v3.21.12
57-
fetch-depth: 1
58-
path: vsort/protobuf
59-
60-
- name: Configure protobuf
61-
if: steps.cache-protobuf.outputs.cache-hit != 'true'
62-
run: cmake -S protobuf -B protobuf\build_rel -G Ninja -LA
63-
-D CMAKE_BUILD_TYPE=Release
64-
-D protobuf_BUILD_SHARED_LIBS=OFF -D protobuf_BUILD_TESTS=OFF
65-
66-
- name: Build protobuf
67-
if: steps.cache-protobuf.outputs.cache-hit != 'true'
68-
run: cmake --build protobuf\build_rel --verbose
69-
70-
- name: Install protobuf
71-
if: steps.cache-protobuf.outputs.cache-hit != 'true'
72-
run: cmake --install protobuf\build_rel --prefix protobuf\install
73-
74-
- name: Cache onnx
42+
- name: Restore cached onnx
7543
id: cache-onnx
76-
uses: actions/cache@v4
44+
uses: actions/cache/restore@v4
7745
with:
7846
path: vsort/onnx/install
79-
key: ${{ runner.os }}-vsort-onnx-v5
47+
key: ${{ runner.os }}-vsort-onnx-v6
8048

8149
- name: Checkout onnx
8250
if: steps.cache-onnx.outputs.cache-hit != 'true'
@@ -85,20 +53,19 @@ jobs:
8553
repository: onnx/onnx
8654
# follows onnx in https://github.com/AmusementClub/onnxruntime/tree/master/cmake/external
8755
# if you change this, remember to bump the version of the cache key.
88-
ref: 990217f043af7222348ca8f0301e17fa7b841781
56+
ref: v1.19.0
8957
fetch-depth: 1
9058
path: vsort/onnx
9159

9260
- name: Configure onnx
9361
if: steps.cache-onnx.outputs.cache-hit != 'true'
9462
run: cmake -S onnx -B onnx\build -G Ninja -LA
9563
-D CMAKE_BUILD_TYPE=Release
96-
-D Protobuf_PROTOC_EXECUTABLE=protobuf\install\bin\protoc
97-
-D Protobuf_LITE_LIBRARY=protobuf\install\lib
98-
-D Protobuf_LIBRARIES=protobuf\install\lib
64+
-D CMAKE_PREFIX_PATH=%cd%\protobuf\install\lib\cmake
9965
-D ONNX_USE_LITE_PROTO=ON -D ONNX_USE_PROTOBUF_SHARED_LIBS=OFF
10066
-D ONNX_GEN_PB_TYPE_STUBS=OFF -D ONNX_ML=0
10167
-D ONNX_USE_MSVC_STATIC_RUNTIME=1
68+
-D ONNX_BUILD_CUSTOM_PROTOBUF=ON
10269

10370
- name: Build onnx
10471
if: steps.cache-onnx.outputs.cache-hit != 'true'
@@ -108,6 +75,13 @@ jobs:
10875
if: steps.cache-onnx.outputs.cache-hit != 'true'
10976
run: cmake --install onnx\build --prefix onnx\install
11077

78+
- name: Save onnx
79+
if: steps.cache-onnx.outputs.cache-hit != 'true'
80+
uses: actions/cache/save@v4
81+
with:
82+
path: vsort/onnx/install
83+
key: ${{ steps.cache-onnx.outputs.cache-primary-key }}
84+
11185
- name: Download VapourSynth headers
11286
run: |
11387
curl -s -o vs.zip -L https://github.com/vapoursynth/vapoursynth/archive/refs/tags/R54.zip
@@ -116,33 +90,32 @@ jobs:
11690
11791
- name: Download ONNX Runtime Precompilation
11892
run: |
119-
curl -s -o ortgpu.zip -LJO https://github.com/AmusementClub/onnxruntime/releases/download/orttraining_rc2-8036-geb41d57f21-240425-0428/onnxruntime-gpu-win64.zip
93+
curl -s -o ortgpu.zip -LJO https://github.com/AmusementClub/onnxruntime/releases/download/orttraining_rc2-10488-g4754a1d64e-250830-1356/onnxruntime-gpu-win64.zip
12094
unzip -q ortgpu.zip
12195
12296
- name: Cache CUDA
12397
id: cache-cuda
12498
uses: actions/cache@v4
12599
with:
126100
path: C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA
127-
key: ${{ runner.os }}-cuda-12.4.1
101+
key: ${{ runner.os }}-cuda-12.9.1
128102

129103
- name: Setup CUDA
130104
if: steps.cache-cuda.outputs.cache-hit != 'true'
131105
run: |
132-
curl -s -o cuda_installer.exe -L https://developer.download.nvidia.com/compute/cuda/12.4.1/network_installers/cuda_12.4.1_windows_network.exe
133-
cuda_installer.exe -s nvcc_12.4 cudart_12.4
106+
curl -s -o cuda_installer.exe -L https://developer.download.nvidia.com/compute/cuda/12.9.1/network_installers/cuda_12.9.1_windows_network.exe
107+
cuda_installer.exe -s nvcc_12.9 cudart_12.9
134108
135109
- name: Configure
136110
run: cmake -S . -B build -G Ninja -LA
137111
-D CMAKE_BUILD_TYPE=Release
112+
-D CMAKE_PREFIX_PATH=onnx\install
138113
-D CMAKE_MSVC_RUNTIME_LIBRARY=MultiThreaded
139114
-D VAPOURSYNTH_INCLUDE_DIRECTORY=vapoursynth\include
140-
-D protobuf_DIR=protobuf\install\cmake
141-
-D ONNX_DIR=onnx\install\lib\cmake\ONNX
142115
-D ONNX_RUNTIME_API_DIRECTORY=onnxruntime-gpu\include\onnxruntime
143116
-D ONNX_RUNTIME_LIB_DIRECTORY=onnxruntime-gpu\lib
144117
-D ENABLE_CUDA=1
145-
-D CUDAToolkit_ROOT="C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.4"
118+
-D CUDAToolkit_ROOT="C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.9"
146119
-D ENABLE_DML=1
147120
-D CMAKE_CXX_STANDARD=20
148121

@@ -161,7 +134,7 @@ jobs:
161134
- name: Download DirectML Library
162135
# follows DirectML in https://github.com/AmusementClub/onnxruntime/blob/master/cmake/external/dml.cmake#L44
163136
run: |
164-
curl -s -o directml.nupkg -LJO https://www.nuget.org/api/v2/package/Microsoft.AI.DirectML/1.14.1
137+
curl -s -o directml.nupkg -LJO https://www.nuget.org/api/v2/package/Microsoft.AI.DirectML/1.15.4
165138
unzip -q directml.nupkg -d dml
166139
copy dml\bin\x64-win\DirectML.dll artifact\vsort\
167140

0 commit comments

Comments
 (0)