Skip to content

Commit d336eaf

Browse files
committed
Fix CUDA builds for ONNX Runtime on Windows
1 parent 039e27a commit d336eaf

File tree

2 files changed

+1373
-1
lines changed

2 files changed

+1373
-1
lines changed

onnxruntime/cppbuild.sh

+2-1
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,7 @@ sedinplace 's/MLAS_CPUIDINFO::GetCPUIDInfo().HasArmNeon_I8MM()/false/g' onnxrunt
8484

8585
# work around toolchain issues on Mac and Windows
8686
patch -p1 < ../../../onnxruntime.patch
87+
patch -p1 < ../../../onnxruntime-cuda.patch # https://github.com/microsoft/onnxruntime/pull/22316
8788
#patch -p1 < ../../../onnxruntime-windows.patch # https://github.com/microsoft/onnxruntime/pull/7883
8889
sedinplace '/--Werror/d' cmake/CMakeLists.txt
8990
sedinplace '/-DCMAKE_CUDA_COMPILER=/d' tools/ci_build/build.py
@@ -167,7 +168,7 @@ sedinplace 's/UTFChars(javaNameStrings/UTFChars((jstring)javaNameStrings/g' java
167168
sedinplace 's/initializers = allocarray/initializers = (const OrtValue**)allocarray/g' java/src/main/native/ai_onnxruntime_OrtSession_SessionOptions.cpp
168169

169170
which ctest3 &> /dev/null && CTEST="ctest3" || CTEST="ctest"
170-
"$PYTHON_BIN_PATH" tools/ci_build/build.py --build_dir ../build --config Release --cmake_path "$CMAKE" --ctest_path "$CTEST" --build_shared_lib $ARCH_FLAGS $DNNL_FLAGS $OPENMP_FLAGS $GPU_FLAGS
171+
"$PYTHON_BIN_PATH" tools/ci_build/build.py --build_dir ../build --config Release --parallel $MAKEJ --cmake_path "$CMAKE" --ctest_path "$CTEST" --build_shared_lib $ARCH_FLAGS $DNNL_FLAGS $OPENMP_FLAGS $GPU_FLAGS
171172

172173
# install headers and libraries in standard directories
173174
cp -r include/* ../include

0 commit comments

Comments
 (0)