Skip to content

Commit

Permalink
Fix builds for ONNX Runtime on Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
saudet committed Sep 24, 2023
1 parent 288dd95 commit 29efe5f
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
3 changes: 2 additions & 1 deletion onnxruntime/cppbuild.sh
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ git reset --hard
git checkout v$ONNXRUNTIME
git submodule update --init --recursive
git submodule foreach --recursive 'git reset --hard'
git checkout v1.15.1 onnxruntime/core/platform/windows/stacktrace.cc # revert https://github.com/microsoft/onnxruntime/pull/17173

case $PLATFORM in
linux-arm64)
Expand Down Expand Up @@ -80,7 +81,7 @@ patch -p1 < ../../../onnxruntime.patch
#patch -p1 < ../../../onnxruntime-windows.patch # https://github.com/microsoft/onnxruntime/pull/7883
sedinplace '/--Werror/d' cmake/CMakeLists.txt
sedinplace "s/return 'ON'/return 'OFF'/g" tools/ci_build/build.py
sedinplace "s/default='Visual Studio 1. 201.'/default='Ninja'/g" tools/ci_build/build.py
sedinplace "s/Visual Studio 1. 20../Ninja/g" tools/ci_build/build.py
sedinplace 's/Darwin|iOS/iOS/g' cmake/onnxruntime_providers.cmake
sedinplace 's/-fvisibility=hidden//g' cmake/CMakeLists.txt cmake/adjust_global_compile_flags.cmake cmake/onnxruntime_providers.cmake
sedinplace 's:/Yucuda_pch.h /FIcuda_pch.h::g' cmake/onnxruntime_providers.cmake
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -552,7 +552,7 @@ public enum OrtSparseIndicesFormat {
*
* \param device_id HIP device id, starts from zero.
*/
public static native OrtStatus OrtSessionOptionsAppendExecutionProvider_ROCM( OrtSessionOptions options, int device_id);


/*
* This is the old way to add the MIGraphX provider to the session, please use
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,8 @@ public void map(InfoMap infoMap) {
.put(new Info("Ort::detail::Base<OrtKernelInfo>").pointerTypes("BaseKernelInfo"))
.put(new Info("Ort::detail::Base<OrtThreadingOptions>").pointerTypes("BaseThreadingOptions"))

.put(new Info("OrtSessionOptionsAppendExecutionProvider_MIGraphX", "Ort::detail::OptionalTypeInfoImpl<OrtTypeInfo>::GetOptionalElementType").skip())
.put(new Info("OrtSessionOptionsAppendExecutionProvider_MIGraphX",
"OrtSessionOptionsAppendExecutionProvider_ROCM", "Ort::detail::OptionalTypeInfoImpl<OrtTypeInfo>::GetOptionalElementType").skip())
.put(new Info("OrtSessionOptionsAppendExecutionProvider_CUDA").annotations("@Platform(extension=\"-gpu\")").javaNames("OrtSessionOptionsAppendExecutionProvider_CUDA"));
}
}

0 comments on commit 29efe5f

Please sign in to comment.