Skip to content

Commit

Permalink
ONNX Runtimeをv1.18.1に
Browse files Browse the repository at this point in the history
  • Loading branch information
qryxip committed Aug 15, 2024
1 parent 66dfb37 commit e683e26
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 17 deletions.
30 changes: 18 additions & 12 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ on:
env:
ONNXRUNTIME_VERSION:
|- # releaseタグ名か、workflow_dispatchでのバージョン名が入る。無指定なら適当なバージョン
${{ github.event.release.tag_name || github.event.inputs.version || '1.17.3' }}
${{ github.event.release.tag_name || github.event.inputs.version || '1.18.1' }}
RELEASE:
|- # releaseタグ名か、workflow_dispatchでのreleaseフラグがあればリリースする
${{ github.event.release.tag_name != '' || github.event.inputs.release == 'true' }}
Expand All @@ -37,13 +37,19 @@ jobs:
build_opts: --cmake_extra_defines CMAKE_SYSTEM_NAME=Windows CMAKE_SYSTEM_PROCESSOR=x86_64 --config Release --parallel --compile_no_warning_as_error --update --build --build_shared_lib
result_dir: build/Release
release_config: Release
- artifact_name: onnxruntime-win-x64-gpu
# CUDAとDirectMLを両方有効化したビルドは作らない (v1.18.1時点でビルドが何故かできないのと、あっても多分あまり嬉しくないため)
- artifact_name: onnxruntime-win-x64-cuda
os: windows-2022
cuda_version: 12.4.1
cuda_version: 12.5.0
# Windowsの場合デフォルトのパッケージ群では不十分であるため、必要そうなパッケージを指定する。ただしいくつかは不要かもしれない
cuda_sub_packages: '["cudart", "cuobjdump", "nvcc", "nvdisasm", "thrust", "cublas_dev", "cufft_dev", "curand_dev", "cusolver_dev", "cusparse_dev", "visual_studio_integration"]'
cudnn_url: https://developer.download.nvidia.com/compute/cudnn/redist/cudnn/windows-x86_64/cudnn-windows-x86_64-8.9.7.29_cuda12-archive.zip
build_opts: --cmake_extra_defines CMAKE_SYSTEM_NAME=Windows CMAKE_SYSTEM_PROCESSOR=x86_64 --config Release --parallel --compile_no_warning_as_error --update --build --build_shared_lib --use_dml --use_cuda --cuda_version 12.4
cudnn_url: https://developer.download.nvidia.com/compute/cudnn/redist/cudnn/windows-x86_64/cudnn-windows-x86_64-9.3.0.75_cuda12-archive.zip
build_opts: --cmake_extra_defines CMAKE_SYSTEM_NAME=Windows CMAKE_SYSTEM_PROCESSOR=x86_64 --config Release --parallel --compile_no_warning_as_error --update --build --build_shared_lib --use_cuda --cuda_version 12.5
result_dir: build/Release
release_config: Release
- artifact_name: onnxruntime-win-x64-dml
os: windows-2022
build_opts: --cmake_extra_defines CMAKE_SYSTEM_NAME=Windows CMAKE_SYSTEM_PROCESSOR=x86_64 --config Release --parallel --compile_no_warning_as_error --update --build --build_shared_lib --use_dml
result_dir: build/Release
release_config: Release
- artifact_name: onnxruntime-win-x86
Expand All @@ -58,9 +64,9 @@ jobs:
release_config: Release
- artifact_name: onnxruntime-linux-x64-gpu
os: ubuntu-20.04
cuda_version: 12.4.1
cuda_version: 12.5.0
cuda_sub_packages: "[]" # デフォルト
cudnn_url: https://developer.download.nvidia.com/compute/cudnn/redist/cudnn/linux-x86_64/cudnn-linux-x86_64-8.9.7.29_cuda12-archive.tar.xz
cudnn_url: https://developer.download.nvidia.com/compute/cudnn/redist/cudnn/linux-x86_64/cudnn-linux-x86_64-9.3.0.75_cuda12-archive.tar.xz
build_opts: --cmake_extra_defines CMAKE_SYSTEM_NAME=Linux CMAKE_SYSTEM_PROCESSOR=x86_64 --config Release --parallel --compile_no_warning_as_error --update --build --build_shared_lib --use_cuda
result_dir: build
release_config: Release
Expand All @@ -84,12 +90,12 @@ jobs:
release_config: Release
- artifact_name: onnxruntime-osx-arm64
os: macos-12
build_opts: --cmake_extra_defines CMAKE_SYSTEM_NAME=Darwin CMAKE_OSX_ARCHITECTURES=arm64 --config Release --parallel --compile_no_warning_as_error --update --build --build_shared_lib
build_opts: --osx_arch arm64 --cmake_extra_defines CMAKE_SYSTEM_NAME=Darwin CMAKE_SYSTEM_PROCESSOR=aarch64 --config Release --parallel --compile_no_warning_as_error --update --build --build_shared_lib
result_dir: build
release_config: Release
- artifact_name: onnxruntime-osx-x86_64
os: macos-12
build_opts: --cmake_extra_defines CMAKE_SYSTEM_NAME=Darwin CMAKE_OSX_ARCHITECTURES=x86_64 --config Release --parallel --compile_no_warning_as_error --update --build --build_shared_lib
build_opts: --osx_arch x86_64 --cmake_extra_defines CMAKE_SYSTEM_NAME=Darwin --config Release --parallel --compile_no_warning_as_error --update --build --build_shared_lib
result_dir: build
release_config: Release
- artifact_name: onnxruntime-android-x64
Expand Down Expand Up @@ -157,7 +163,7 @@ jobs:

- name: Apply patch
run: |
git apply --ignore-whitespace --reject --whitespace=fix --verbose ./builder/1_17_3_android_arm64_build.patch
git apply --ignore-whitespace --reject --whitespace=fix --verbose ./builder/1_18_1_android_arm64_build.patch
- name: Dump matrix context
env:
Expand Down Expand Up @@ -361,9 +367,9 @@ jobs:
--android) os=Android ;;
--ios) os=iOS ;;
CMAKE_SYSTEM_PROCESSOR=x86_64 | CMAKE_OSX_ARCHITECTURES=x86_64 | x86_64) arch=x86_64 ;;
CMAKE_SYSTEM_PROCESSOR=x86_64 | x86_64) arch=x86_64 ;;
--x86) arch=x86 ;;
CMAKE_OSX_ARCHITECTURES=arm64 | --arm64 | arm64 | arm64-v8a) arch=AArch64 ;;
--arm64 | arm64 | arm64-v8a) arch=AArch64 ;;
--arm) arch=ARMv7 ;;
--use_cuda) use_cuda=1 ;;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
diff --git a/tools/ci_build/build.py b/tools/ci_build/build.py
index 85583e11f5..3db1ee8b7b 100644
index 0d2ad51482..a343988d06 100644
--- a/tools/ci_build/build.py
+++ b/tools/ci_build/build.py
@@ -987,6 +987,8 @@ def generate_build_tree(
@@ -1000,6 +1000,8 @@ def generate_build_tree(
disable_optional_type = "optional" in types_to_disable
disable_sparse_tensors = "sparsetensor" in types_to_disable

Expand All @@ -11,12 +11,12 @@ index 85583e11f5..3db1ee8b7b 100644
cmake_args += [
"-Donnxruntime_RUN_ONNX_TESTS=" + ("ON" if args.enable_onnx_tests else "OFF"),
"-Donnxruntime_GENERATE_TEST_REPORTS=ON",
@@ -1571,7 +1573,7 @@ def generate_build_tree(
@@ -1631,7 +1633,7 @@ def generate_build_tree(
"-pipe",
"-ggdb3",
]
- if is_linux() and platform.machine() == "x86_64":
+ if is_linux() and is_x86_64_build:
# The following flags needs GCC 8 and newer
cflags += ["-fstack-clash-protection", "-fcf-protection"]
cxxflags = cflags.copy()
cflags += ["-fstack-clash-protection"]
if not args.rv64:

0 comments on commit e683e26

Please sign in to comment.