From 66519154300243c82737f26e04d6559f7e609d3f Mon Sep 17 00:00:00 2001 From: Ryo Yamashita Date: Sat, 14 Oct 2023 16:11:55 +0900 Subject: [PATCH 01/18] =?UTF-8?q?=E6=AE=8B=E3=82=8A=E3=81=AE=E3=82=BF?= =?UTF-8?q?=E3=83=BC=E3=82=B2=E3=83=83=E3=83=88=E3=82=92=E3=83=93=E3=83=AB?= =?UTF-8?q?=E3=83=89=E3=81=99=E3=82=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/build.yml | 200 ++++++++++++++++++++++++++++++++---- 1 file changed, 180 insertions(+), 20 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 9b7e795..36d4e16 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -19,7 +19,7 @@ on: env: ONNXRUNTIME_VERSION: |- # releaseタグ名か、workflow_dispatchでのバージョン名が入る。無指定なら適当なバージョン - ${{ github.event.release.tag_name || github.event.inputs.version || '1.15.1' }} + ${{ github.event.release.tag_name || github.event.inputs.version || '1.16.2' }} RELEASE: |- # releaseタグ名か、workflow_dispatchでのreleaseフラグがあればリリースする ${{ github.event.release.tag_name != '' || github.event.inputs.release == 'true' }} @@ -34,39 +34,95 @@ jobs: fail-fast: false matrix: include: + - artifact_name: onnxruntime-win-x64 + 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 + result_dir: build/Windows/Release + release_config: Release + - artifact_name: onnxruntime-win-x64-gpu-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/Windows/Release + release_config: Release + - artifact_name: onnxruntime-win-x64-gpu-cuda + os: windows-2022 + cuda_version: 11.8.0 + cuda_sub_packages: '["cudart", "cublas", "cufft", "curand", "cusolver", "cusparse", "nvcc", "visual_studio_integration"]' + cudnn_url: https://developer.download.nvidia.com/compute/redist/cudnn/v8.5.0/local_installers/11.7/cudnn-windows-x86_64-8.5.0.96_cuda11-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 11.8 + result_dir: build/Windows/Release + release_config: Release + - artifact_name: onnxruntime-win-x86 + os: windows-2022 + build_opts: --x86 --cmake_extra_defines CMAKE_SYSTEM_NAME=Windows CMAKE_SYSTEM_PROCESSOR=x86 --config Release --parallel --compile_no_warning_as_error --update --build --build_shared_lib + result_dir: build/Windows/Release + release_config: Release + - artifact_name: onnxruntime-linux-x64 + os: ubuntu-20.04 + 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 + result_dir: build/Linux + release_config: Release + - artifact_name: onnxruntime-linux-x64-gpu + os: ubuntu-20.04 + cuda_version: 11.8.0 + cuda_sub_packages: "[]" + cudnn_url: https://developer.download.nvidia.com/compute/redist/cudnn/v8.2.4/cudnn-11.4-linux-x64-v8.2.4.15.tgz + 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/Linux + release_config: Release - artifact_name: onnxruntime-linux-armhf os: ubuntu-20.04 - cc_version: "8" - cxx_version: "8" + cc_version: "9" + cxx_version: "9" arch: arm-linux-gnueabihf symlink_workaround: true - build_opts: --arm --cmake_extra_defines CMAKE_SYSTEM_NAME=Linux CMAKE_SYSTEM_PROCESSOR=armv7l --config Release --parallel --update --build --build_shared_lib + build_opts: --arm --cmake_extra_defines CMAKE_SYSTEM_NAME=Linux CMAKE_SYSTEM_PROCESSOR=armv7l --config Release --parallel --compile_no_warning_as_error --update --build --build_shared_lib result_dir: build/Linux release_config: Release - artifact_name: onnxruntime-linux-arm64 os: ubuntu-20.04 - cc_version: "8" - cxx_version: "8" + cc_version: "9" + cxx_version: "9" arch: aarch64-linux-gnu symlink_workaround: true - build_opts: --arm64 --cmake_extra_defines CMAKE_SYSTEM_NAME=Linux CMAKE_SYSTEM_PROCESSOR=aarch64 --config Release --parallel --update --build --build_shared_lib + build_opts: --arm64 --cmake_extra_defines CMAKE_SYSTEM_NAME=Linux CMAKE_SYSTEM_PROCESSOR=aarch64 --config Release --parallel --compile_no_warning_as_error --update --build --build_shared_lib result_dir: build/Linux release_config: Release + - artifact_name: onnxruntime-osx-arm64 + os: macos-12 + build_opts: --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/MacOS + release_config: Release + - artifact_name: onnxruntime-osx-x86_64 + os: macos-12 + build_opts: --cmake_extra_defines CMAKE_SYSTEM_NAME=Darwin CMAKE_SYSTEM_PROCESSOR=x86_64 --config Release --parallel --compile_no_warning_as_error --update --build --build_shared_lib + result_dir: build/MacOS + release_config: Release + - artifact_name: onnxruntime-android-x64 + os: ubuntu-20.04 + build_opts: --android_abi x86_64 --cmake_extra_defines CMAKE_SYSTEM_NAME=Android CMAKE_SYSTEM_PROCESSOR=x86_64 --config Release --parallel --compile_no_warning_as_error --update --build --build_shared_lib --android + result_dir: build/Android + release_config: Release + - artifact_name: onnxruntime-android-arm64 + os: ubuntu-20.04 + build_opts: --android_abi arm64-v8a --cmake_extra_defines CMAKE_SYSTEM_NAME=Android CMAKE_SYSTEM_PROCESSOR=aarch64 --config Release --parallel --compile_no_warning_as_error --update --build --build_shared_lib --android + result_dir: build/Android + release_config: Release - artifact_name: onnxruntime-ios-arm64 os: macos-12 - build_opts: --config Release --parallel --update --build --build_shared_lib --skip_tests --use_xcode --ios --ios_sysroot iphoneos --osx_arch arm64 --apple_deploy_target 16.0 + build_opts: --config Release --parallel --compile_no_warning_as_error --update --build --build_shared_lib --skip_tests --use_xcode --ios --ios_sysroot iphoneos --osx_arch arm64 --apple_deploy_target 16.0 build_opts_workaround_protoc: --path_to_protoc_exe /usr/local/opt/protobuf@21/bin/protoc result_dir: build/iOS/Release release_config: Release-iphoneos - artifact_name: onnxruntime-ios-sim-arm64 os: macos-12 - build_opts: --config Release --parallel --update --build --build_shared_lib --skip_tests --use_xcode --ios --ios_sysroot iphonesimulator --osx_arch arm64 --apple_deploy_target 16.0 + build_opts: --config Release --parallel --compile_no_warning_as_error --update --build --build_shared_lib --skip_tests --use_xcode --ios --ios_sysroot iphonesimulator --osx_arch arm64 --apple_deploy_target 16.0 build_opts_workaround_protoc: --path_to_protoc_exe /usr/local/opt/protobuf@21/bin/protoc result_dir: build/iOS/Release release_config: Release-iphonesimulator - artifact_name: onnxruntime-ios-sim-x86_64 os: macos-12 - build_opts: --config Release --parallel --update --build --build_shared_lib --skip_tests --use_xcode --ios --ios_sysroot iphonesimulator --osx_arch x86_64 --apple_deploy_target 16.0 + build_opts: --config Release --parallel --compile_no_warning_as_error --update --build --build_shared_lib --skip_tests --use_xcode --ios --ios_sysroot iphonesimulator --osx_arch x86_64 --apple_deploy_target 16.0 build_opts_workaround_protoc: --path_to_protoc_exe /usr/local/opt/protobuf@21/bin/protoc result_dir: build/iOS/Release release_config: Release-iphonesimulator @@ -109,8 +165,18 @@ jobs: path: build/ key: ${{ matrix.artifact_name }}-v${{ env.ONNXRUNTIME_VERSION }}-cache-v1-${{ hashFiles('matrix.json') }} + - name: Install tree + if: steps.cache-build-result.outputs.cache-hit != 'true' && runner.os == 'Windows' + uses: msys2/setup-msys2@v2 + with: + install: tree + + - name: Install tree + if: steps.cache-build-result.outputs.cache-hit != 'true' && runner.os == 'macOS' + run: brew install tree + - name: Install build dependencies on ubuntu - if: steps.cache-build-result.outputs.cache-hit != 'true' && startsWith(matrix.os, 'ubuntu') + if: steps.cache-build-result.outputs.cache-hit != 'true' && startsWith(matrix.os, 'ubuntu') && matrix.arch run: | sudo apt-get update sudo apt-get install -y \ @@ -119,8 +185,7 @@ jobs: wget \ qemu-user-binfmt \ gcc-${{ matrix.cc_version }}${{ env.ARCH_SUFFIX }} \ - g++-${{ matrix.cxx_version }}${{ env.ARCH_SUFFIX }} \ - python3 + g++-${{ matrix.cxx_version }}${{ env.ARCH_SUFFIX }} - name: Install build dependencies on macos if: steps.cache-build-result.outputs.cache-hit != 'true' && startsWith(matrix.os, 'macos') @@ -128,17 +193,81 @@ jobs: # Workaround for protoc https://github.com/microsoft/onnxruntime/issues/16238#issuecomment-1590398821 brew install protobuf@21 - # ONNX Runtime v1.15.1 requires CMake 3.26 or higher. + - name: Install Python 3.8 + if: steps.cache-build-result.outputs.cache-hit != 'true' + uses: actions/setup-python@v4 + with: + python-version: '3.8' + + #- name: Install Python packages + # if: steps.cache-build-result.outputs.cache-hit != 'true' && matrix.cuda_version && matrix.cudnn_url + # run: python -m pip install -r tools/ci_build/github/linux/docker/inference/x64/python/cpu/scripts/requirements.txt + + # ONNX Runtime v1.16.1 requires CMake 3.27 or higher. - name: Install CMake if: steps.cache-build-result.outputs.cache-hit != 'true' && startsWith(matrix.os, 'ubuntu') env: - CMAKE_VERSION: 3.26.4 + CMAKE_VERSION: 3.27.7 run: | wget -O cmake.sh "https://github.com/Kitware/CMake/releases/download/v${{ env.CMAKE_VERSION }}/cmake-${{ env.CMAKE_VERSION }}-linux-x86_64.sh" sudo bash cmake.sh --skip-license --prefix=/usr/local + - name: Set up CUDA + if: steps.cache-build-result.outputs.cache-hit != 'true' && matrix.cuda_version && matrix.cudnn_url + uses: Jimver/cuda-toolkit@v0.2.11 + with: + cuda: ${{ matrix.cuda_version }} + sub-packages: ${{ matrix.cuda_sub_packages }} + method: network + + - name: Set `$CUDA_HOME` + if: steps.cache-build-result.outputs.cache-hit != 'true' && matrix.cuda_version && matrix.cudnn_url + shell: bash + run: echo "CUDA_HOME=$CUDA_PATH" >> "$GITHUB_ENV" + + - if: steps.cache-build-result.outputs.cache-hit != 'true' && matrix.cuda_version && matrix.cudnn_url && runner.os == 'Windows' + run: | + msys2.cmd -c "tree 'C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA'" + + #- name: Rename files in VS + # if: steps.cache-build-result.outputs.cache-hit != 'true' && matrix.cuda_version && matrix.cudnn_url && runner.os == 'Windows' + # run: | + # cp 'C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Microsoft\VC\v170\BuildCustomizations\CUDA '{11.8,11.8.0}.props + # cp 'C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Microsoft\VC\v170\BuildCustomizations\CUDA '{11.8,11.8.0}.targets + # cp 'C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Microsoft\VC\v170\BuildCustomizations\CUDA '{11.8,11.8.0}.xml + + - if: steps.cache-build-result.outputs.cache-hit != 'true' && matrix.cuda_version && matrix.cudnn_url && runner.os == 'Windows' + shell: bash + run: msys2.cmd -c "tree 'C:\Program Files\Microsoft Visual Studio'" + + - name: Set up cuDNN + if: steps.cache-build-result.outputs.cache-hit != 'true' && matrix.cuda_version && matrix.cudnn_url + shell: bash + run: | + mkdir download + + if [ ${{ runner.os }} = Windows ]; then + curl -L "${{ matrix.cudnn_url }}" > download/cudnn.zip + unzip download/cudnn.zip -d download + rm download/cudnn.zip + else + curl -L "${{ matrix.cudnn_url }}" > download/cudnn.tar.gz + tar xvf download/cudnn.tar.gz -C download/ + rm download/cudnn.tar.gz + fi + + cudnn_path=$(find download -maxdepth 1 -name 'cudnn-*') + : "${cudnn_path:=./download/cuda}" # https://developer.download.nvidia.com/compute/redist/cudnn/v8.2.4/cudnn-11.4-linux-x64-v8.2.4.15.tgz + if [ ${{ runner.os }} = Windows ]; then + cudnn_path=$(cygpath -wa "$cudnn_path") + else + cudnn_path=$(realpath "$cudnn_path") + fi + + echo "CUDNN_HOME=$cudnn_path" >> "$GITHUB_ENV" + - name: Configure build environment - if: steps.cache-build-result.outputs.cache-hit != 'true' && startsWith(matrix.os, 'ubuntu') + if: steps.cache-build-result.outputs.cache-hit != 'true' && startsWith(matrix.os, 'ubuntu') && matrix.arch run: | # Required for arm build # https://github.com/microsoft/onnxruntime/issues/4189#issuecomment-642528278 @@ -155,8 +284,24 @@ jobs: echo "CC=${{ env.ARCH_PREFIX }}gcc-${{ matrix.cc_version }}" >> "$GITHUB_ENV" echo "CXX=${{ env.ARCH_PREFIX }}g++-${{ matrix.cxx_version }}" >> "$GITHUB_ENV" - - name: Build ONNX Runtime - if: steps.cache-build-result.outputs.cache-hit != 'true' + ## https://gitlab.com/libeigen/eigen/-/issues/2744 + ## + ## ただし11/6現在、SHA1はこのようになっている。ee201b07085203ea7bd8eb97cbcb31b07cfa3efbはどこに...? + ## eigen-3.4.zip : 123c29af62216a70611d8b826c0e57c361c9a49f + ## eigen-3.4.0.zip : ef24286b7ece8737c99fa831b02941843546c081 + ## eigen-3.4-rc1.zip : 1c9b91f7520a85426d4df9b5f59fd3f625dc2dd1 + #- name: Patch + # if: steps.cache-build-result.outputs.cache-hit != 'true' + # shell: bash + # run: sed -i 's|3\.4/eigen-3\.4\.zip;ee201b07085203ea7bd8eb97cbcb31b07cfa3efb|3.4.0/eigen-3.4.0.zip;ef24286b7ece8737c99fa831b02941843546c081|' ./cmake/deps.txt + + - name: Build ONNX Runtime (Windows) + if: steps.cache-build-result.outputs.cache-hit != 'true' && runner.os == 'Windows' + shell: cmd + run: .\build.bat ${{ matrix.build_opts }} + + - name: Build ONNX Runtime (non-Windows) + if: steps.cache-build-result.outputs.cache-hit != 'true' && runner.os != 'Windows' run: | # add --arm for gcc-8: https://github.com/microsoft/onnxruntime/issues/4189 # skip test: https://github.com/microsoft/onnxruntime/issues/2436 @@ -164,15 +309,30 @@ jobs: # Both CMAKE_SYSTEM_NAME and CMAKE_SYSTEM_PROCESSOR are required. bash ./build.sh ${{ matrix.build_opts }} ${{ matrix.build_opts_workaround_protoc }} + - name: tree build + if: steps.cache-build-result.outputs.cache-hit != 'true' + shell: bash + run: | + if [ ${{ runner.os }} = Windows ]; then + tree() { + msys2.cmd -c "tree $1" + } + fi + tree build + - name: Organize artifact run: | # コピー先artifactを予め削除しておく rm -rf ${{ matrix.result_dir }}/${{ matrix.artifact_name }} rm -rf ./artifact # Set library name - if [[ ${{ matrix.artifact_name }} == onnxruntime-linux-* ]]; then + if [[ ${{ matrix.artifact_name }} == onnxruntime-win-* ]]; then + ONNXRUNTIME_NAME=onnxruntime.dll + elif [[ ${{ matrix.artifact_name }} == onnxruntime-linux-* ]]; then ONNXRUNTIME_NAME=libonnxruntime.so.${{ env.ONNXRUNTIME_VERSION }} - elif [[ ${{ matrix.artifact_name }} == onnxruntime-ios-* ]]; then + elif [[ ${{ matrix.artifact_name }} == onnxruntime-android-* ]]; then + ONNXRUNTIME_NAME=libonnxruntime.so + elif [[ ${{ matrix.artifact_name }} == onnxruntime-osx-* ]] || [[ ${{ matrix.artifact_name }} == onnxruntime-ios-* ]]; then ONNXRUNTIME_NAME=libonnxruntime.${{ env.ONNXRUNTIME_VERSION }}.dylib else echo "Unknown target found : ${{ matrix.artifact_name }}" From 1bed6858273c6e3f6f812d9081ec570c57a5d545 Mon Sep 17 00:00:00 2001 From: Ryo Yamashita Date: Fri, 5 Jan 2024 11:33:56 +0900 Subject: [PATCH 02/18] =?UTF-8?q?=E3=83=91=E3=83=83=E3=82=B1=E3=83=BC?= =?UTF-8?q?=E3=82=B8=E5=90=8D=E3=81=AB`=5Fdev`=E3=82=92=E4=BB=98=E3=81=91?= =?UTF-8?q?=E3=82=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 36d4e16..958edbe 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -47,7 +47,7 @@ jobs: - artifact_name: onnxruntime-win-x64-gpu-cuda os: windows-2022 cuda_version: 11.8.0 - cuda_sub_packages: '["cudart", "cublas", "cufft", "curand", "cusolver", "cusparse", "nvcc", "visual_studio_integration"]' + cuda_sub_packages: '["cudart", "cublas_dev", "cufft_dev", "curand_dev", "cusolver_dev", "cusparse_dev", "nvcc", "visual_studio_integration"]' cudnn_url: https://developer.download.nvidia.com/compute/redist/cudnn/v8.5.0/local_installers/11.7/cudnn-windows-x86_64-8.5.0.96_cuda11-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 11.8 result_dir: build/Windows/Release From b3308079dc2763dda9d82aa75547cd72aa942659 Mon Sep 17 00:00:00 2001 From: Ryo Yamashita Date: Fri, 5 Jan 2024 13:16:15 +0900 Subject: [PATCH 03/18] =?UTF-8?q?`cuobjdump`=E3=81=A8`nvdisasm`=E3=82=92?= =?UTF-8?q?=E8=BF=BD=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 958edbe..d77a3a5 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -47,7 +47,7 @@ jobs: - artifact_name: onnxruntime-win-x64-gpu-cuda os: windows-2022 cuda_version: 11.8.0 - cuda_sub_packages: '["cudart", "cublas_dev", "cufft_dev", "curand_dev", "cusolver_dev", "cusparse_dev", "nvcc", "visual_studio_integration"]' + cuda_sub_packages: '["cudart", "cuobjdump", "cublas_dev", "cufft_dev", "curand_dev", "cusolver_dev", "cusparse_dev", "nvcc", "nvdisasm", "visual_studio_integration"]' cudnn_url: https://developer.download.nvidia.com/compute/redist/cudnn/v8.5.0/local_installers/11.7/cudnn-windows-x86_64-8.5.0.96_cuda11-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 11.8 result_dir: build/Windows/Release From 184678075d608e5821c28b9202c325e49f83619d Mon Sep 17 00:00:00 2001 From: Ryo Yamashita Date: Fri, 5 Jan 2024 17:18:24 +0900 Subject: [PATCH 04/18] =?UTF-8?q?`thrust`=E8=BF=BD=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index d77a3a5..60daefa 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -47,7 +47,7 @@ jobs: - artifact_name: onnxruntime-win-x64-gpu-cuda os: windows-2022 cuda_version: 11.8.0 - cuda_sub_packages: '["cudart", "cuobjdump", "cublas_dev", "cufft_dev", "curand_dev", "cusolver_dev", "cusparse_dev", "nvcc", "nvdisasm", "visual_studio_integration"]' + cuda_sub_packages: '["cudart", "cuobjdump", "thrust", "cublas_dev", "cufft_dev", "curand_dev", "cusolver_dev", "cusparse_dev", "nvcc", "nvdisasm", "visual_studio_integration"]' cudnn_url: https://developer.download.nvidia.com/compute/redist/cudnn/v8.5.0/local_installers/11.7/cudnn-windows-x86_64-8.5.0.96_cuda11-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 11.8 result_dir: build/Windows/Release From 8f98e1d06023fb36389b60754f99722a79daaa2a Mon Sep 17 00:00:00 2001 From: Ryo Yamashita Date: Sat, 6 Jan 2024 02:34:45 +0900 Subject: [PATCH 05/18] =?UTF-8?q?`cuda=5Fsub=5Fpackages`=E3=82=92=E4=B8=A6?= =?UTF-8?q?=E3=81=B9=E6=9B=BF=E3=81=88=E3=82=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 60daefa..8b5f2a9 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -47,7 +47,7 @@ jobs: - artifact_name: onnxruntime-win-x64-gpu-cuda os: windows-2022 cuda_version: 11.8.0 - cuda_sub_packages: '["cudart", "cuobjdump", "thrust", "cublas_dev", "cufft_dev", "curand_dev", "cusolver_dev", "cusparse_dev", "nvcc", "nvdisasm", "visual_studio_integration"]' + 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/redist/cudnn/v8.5.0/local_installers/11.7/cudnn-windows-x86_64-8.5.0.96_cuda11-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 11.8 result_dir: build/Windows/Release From 7ca90fe157d02e464a677ee484f528dccaee426c Mon Sep 17 00:00:00 2001 From: Ryo Yamashita Date: Sat, 6 Jan 2024 02:38:09 +0900 Subject: [PATCH 06/18] =?UTF-8?q?=E4=B8=8D=E8=A6=81=E3=81=AA`tree`?= =?UTF-8?q?=E3=81=A8=E3=82=B3=E3=83=A1=E3=83=B3=E3=83=88=E3=82=92=E5=89=8A?= =?UTF-8?q?=E9=99=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/build.yml | 22 ---------------------- 1 file changed, 22 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 8b5f2a9..55bbac2 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -225,17 +225,6 @@ jobs: shell: bash run: echo "CUDA_HOME=$CUDA_PATH" >> "$GITHUB_ENV" - - if: steps.cache-build-result.outputs.cache-hit != 'true' && matrix.cuda_version && matrix.cudnn_url && runner.os == 'Windows' - run: | - msys2.cmd -c "tree 'C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA'" - - #- name: Rename files in VS - # if: steps.cache-build-result.outputs.cache-hit != 'true' && matrix.cuda_version && matrix.cudnn_url && runner.os == 'Windows' - # run: | - # cp 'C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Microsoft\VC\v170\BuildCustomizations\CUDA '{11.8,11.8.0}.props - # cp 'C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Microsoft\VC\v170\BuildCustomizations\CUDA '{11.8,11.8.0}.targets - # cp 'C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Microsoft\VC\v170\BuildCustomizations\CUDA '{11.8,11.8.0}.xml - - if: steps.cache-build-result.outputs.cache-hit != 'true' && matrix.cuda_version && matrix.cudnn_url && runner.os == 'Windows' shell: bash run: msys2.cmd -c "tree 'C:\Program Files\Microsoft Visual Studio'" @@ -284,17 +273,6 @@ jobs: echo "CC=${{ env.ARCH_PREFIX }}gcc-${{ matrix.cc_version }}" >> "$GITHUB_ENV" echo "CXX=${{ env.ARCH_PREFIX }}g++-${{ matrix.cxx_version }}" >> "$GITHUB_ENV" - ## https://gitlab.com/libeigen/eigen/-/issues/2744 - ## - ## ただし11/6現在、SHA1はこのようになっている。ee201b07085203ea7bd8eb97cbcb31b07cfa3efbはどこに...? - ## eigen-3.4.zip : 123c29af62216a70611d8b826c0e57c361c9a49f - ## eigen-3.4.0.zip : ef24286b7ece8737c99fa831b02941843546c081 - ## eigen-3.4-rc1.zip : 1c9b91f7520a85426d4df9b5f59fd3f625dc2dd1 - #- name: Patch - # if: steps.cache-build-result.outputs.cache-hit != 'true' - # shell: bash - # run: sed -i 's|3\.4/eigen-3\.4\.zip;ee201b07085203ea7bd8eb97cbcb31b07cfa3efb|3.4.0/eigen-3.4.0.zip;ef24286b7ece8737c99fa831b02941843546c081|' ./cmake/deps.txt - - name: Build ONNX Runtime (Windows) if: steps.cache-build-result.outputs.cache-hit != 'true' && runner.os == 'Windows' shell: cmd From 33b5fadcc3ce5566e724bd4ed96cacfa741a0162 Mon Sep 17 00:00:00 2001 From: Ryo Yamashita Date: Sat, 6 Jan 2024 02:40:14 +0900 Subject: [PATCH 07/18] =?UTF-8?q?DML=E7=89=88=E3=81=A8CUDA=E7=89=88?= =?UTF-8?q?=E3=82=92=E7=B5=B1=E5=90=88=E3=81=99=E3=82=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/build.yml | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 55bbac2..fb73144 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -39,17 +39,12 @@ 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/Windows/Release release_config: Release - - artifact_name: onnxruntime-win-x64-gpu-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/Windows/Release - release_config: Release - artifact_name: onnxruntime-win-x64-gpu-cuda os: windows-2022 cuda_version: 11.8.0 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/redist/cudnn/v8.5.0/local_installers/11.7/cudnn-windows-x86_64-8.5.0.96_cuda11-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 11.8 + 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 11.8 result_dir: build/Windows/Release release_config: Release - artifact_name: onnxruntime-win-x86 From a04af35a7aaa786f1902fe44bcf3564a20bfa3ab Mon Sep 17 00:00:00 2001 From: Ryo Yamashita Date: Sat, 6 Jan 2024 11:46:08 +0900 Subject: [PATCH 08/18] =?UTF-8?q?=E4=B8=8D=E8=A6=81=E3=81=AA`tree`?= =?UTF-8?q?=E3=82=92=E5=89=8A=E9=99=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/build.yml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index fb73144..090e99e 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -220,10 +220,6 @@ jobs: shell: bash run: echo "CUDA_HOME=$CUDA_PATH" >> "$GITHUB_ENV" - - if: steps.cache-build-result.outputs.cache-hit != 'true' && matrix.cuda_version && matrix.cudnn_url && runner.os == 'Windows' - shell: bash - run: msys2.cmd -c "tree 'C:\Program Files\Microsoft Visual Studio'" - - name: Set up cuDNN if: steps.cache-build-result.outputs.cache-hit != 'true' && matrix.cuda_version && matrix.cudnn_url shell: bash From 76a8294e6f2d0775669fe44c2399cbad13b5d93a Mon Sep 17 00:00:00 2001 From: Ryo Yamashita Date: Sat, 6 Jan 2024 11:56:46 +0900 Subject: [PATCH 09/18] =?UTF-8?q?Python=203.8=E3=81=AE=E3=82=A4=E3=83=B3?= =?UTF-8?q?=E3=82=B9=E3=83=88=E3=83=BC=E3=83=AB=E3=82=92=E5=89=8A=E9=99=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/build.yml | 6 ------ 1 file changed, 6 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 4601712..b3d427b 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -192,12 +192,6 @@ jobs: # Workaround for protoc https://github.com/microsoft/onnxruntime/issues/16238#issuecomment-1590398821 brew install protobuf@21 - - name: Install Python 3.8 - if: steps.cache-build-result.outputs.cache-hit != 'true' - uses: actions/setup-python@v4 - with: - python-version: '3.8' - #- name: Install Python packages # if: steps.cache-build-result.outputs.cache-hit != 'true' && matrix.cuda_version && matrix.cudnn_url # run: python -m pip install -r tools/ci_build/github/linux/docker/inference/x64/python/cpu/scripts/requirements.txt From c1462d3c3f9c312cd2dd4c678cfa20f65b8f08f1 Mon Sep 17 00:00:00 2001 From: Ryo Yamashita Date: Sat, 6 Jan 2024 11:57:30 +0900 Subject: [PATCH 10/18] =?UTF-8?q?`artifact=5Fname`=E3=81=AE=E4=BF=AE?= =?UTF-8?q?=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index b3d427b..40d288c 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -39,7 +39,7 @@ 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/Windows/Release release_config: Release - - artifact_name: onnxruntime-win-x64-gpu-cuda + - artifact_name: onnxruntime-win-x64-gpu os: windows-2022 cuda_version: 11.8.0 cuda_sub_packages: '["cudart", "cuobjdump", "nvcc", "nvdisasm", "thrust", "cublas_dev", "cufft_dev", "curand_dev", "cusolver_dev", "cusparse_dev", "visual_studio_integration"]' # いくつかは不要かもしれない From c6ef5c66c94fb84d5b72483d5dd9574f7f62a60b Mon Sep 17 00:00:00 2001 From: Ryo Yamashita Date: Sat, 6 Jan 2024 12:32:23 +0900 Subject: [PATCH 11/18] Minor refactor --- .github/workflows/build.yml | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 40d288c..5b8f8ff 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -192,10 +192,6 @@ jobs: # Workaround for protoc https://github.com/microsoft/onnxruntime/issues/16238#issuecomment-1590398821 brew install protobuf@21 - #- name: Install Python packages - # if: steps.cache-build-result.outputs.cache-hit != 'true' && matrix.cuda_version && matrix.cudnn_url - # run: python -m pip install -r tools/ci_build/github/linux/docker/inference/x64/python/cpu/scripts/requirements.txt - # ONNX Runtime v1.16.1 requires CMake 3.27 or higher. - name: Install CMake if: steps.cache-build-result.outputs.cache-hit != 'true' && startsWith(matrix.os, 'ubuntu') @@ -215,12 +211,10 @@ jobs: - name: Set `$CUDA_HOME` if: steps.cache-build-result.outputs.cache-hit != 'true' && matrix.cuda_version && matrix.cudnn_url - shell: bash run: echo "CUDA_HOME=$CUDA_PATH" >> "$GITHUB_ENV" - name: Set up cuDNN if: steps.cache-build-result.outputs.cache-hit != 'true' && matrix.cuda_version && matrix.cudnn_url - shell: bash run: | mkdir download @@ -276,9 +270,8 @@ jobs: # Both CMAKE_SYSTEM_NAME and CMAKE_SYSTEM_PROCESSOR are required. bash ./build.sh ${{ matrix.build_opts }} ${{ matrix.build_opts_workaround_protoc }} - - name: tree build + - name: Inspect the build directory if: steps.cache-build-result.outputs.cache-hit != 'true' - shell: bash run: | if [ ${{ runner.os }} = Windows ]; then tree() { From ab22eb13a0899cb8f4b85d1cb00017d751779718 Mon Sep 17 00:00:00 2001 From: Ryo Yamashita Date: Sat, 6 Jan 2024 12:49:03 +0900 Subject: [PATCH 12/18] =?UTF-8?q?tools/ci=5Fbuild/build.py=E3=82=92?= =?UTF-8?q?=E7=9B=B4=E6=8E=A5=E5=AE=9F=E8=A1=8C=E3=81=99=E3=82=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/build.yml | 39 ++++++++++++++++--------------------- 1 file changed, 17 insertions(+), 22 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 5b8f8ff..11dc76d 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -37,7 +37,7 @@ jobs: - artifact_name: onnxruntime-win-x64 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 - result_dir: build/Windows/Release + result_dir: build/Release release_config: Release - artifact_name: onnxruntime-win-x64-gpu os: windows-2022 @@ -45,17 +45,17 @@ jobs: 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/redist/cudnn/v8.5.0/local_installers/11.7/cudnn-windows-x86_64-8.5.0.96_cuda11-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 11.8 - result_dir: build/Windows/Release + result_dir: build/Release release_config: Release - artifact_name: onnxruntime-win-x86 os: windows-2022 build_opts: --x86 --cmake_extra_defines CMAKE_SYSTEM_NAME=Windows CMAKE_SYSTEM_PROCESSOR=x86 --config Release --parallel --compile_no_warning_as_error --update --build --build_shared_lib - result_dir: build/Windows/Release + result_dir: build/Release release_config: Release - artifact_name: onnxruntime-linux-x64 os: ubuntu-20.04 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 - result_dir: build/Linux + result_dir: build release_config: Release - artifact_name: onnxruntime-linux-x64-gpu os: ubuntu-20.04 @@ -63,7 +63,7 @@ jobs: cuda_sub_packages: "[]" cudnn_url: https://developer.download.nvidia.com/compute/redist/cudnn/v8.2.4/cudnn-11.4-linux-x64-v8.2.4.15.tgz 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/Linux + result_dir: build release_config: Release - artifact_name: onnxruntime-linux-armhf os: ubuntu-20.04 @@ -72,7 +72,7 @@ jobs: arch: arm-linux-gnueabihf symlink_workaround: true build_opts: --arm --cmake_extra_defines CMAKE_SYSTEM_NAME=Linux CMAKE_SYSTEM_PROCESSOR=armv7l --config Release --parallel --compile_no_warning_as_error --update --build --build_shared_lib - result_dir: build/Linux + result_dir: build release_config: Release - artifact_name: onnxruntime-linux-arm64 os: ubuntu-20.04 @@ -81,45 +81,45 @@ jobs: arch: aarch64-linux-gnu symlink_workaround: true build_opts: --arm64 --cmake_extra_defines CMAKE_SYSTEM_NAME=Linux CMAKE_SYSTEM_PROCESSOR=aarch64 --config Release --parallel --compile_no_warning_as_error --update --build --build_shared_lib - result_dir: build/Linux + result_dir: build release_config: Release - artifact_name: onnxruntime-osx-arm64 os: macos-12 build_opts: --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/MacOS + 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_SYSTEM_PROCESSOR=x86_64 --config Release --parallel --compile_no_warning_as_error --update --build --build_shared_lib - result_dir: build/MacOS + result_dir: build release_config: Release - artifact_name: onnxruntime-android-x64 os: ubuntu-20.04 build_opts: --android_abi x86_64 --cmake_extra_defines CMAKE_SYSTEM_NAME=Android CMAKE_SYSTEM_PROCESSOR=x86_64 --config Release --parallel --compile_no_warning_as_error --update --build --build_shared_lib --android - result_dir: build/Android + result_dir: build release_config: Release - artifact_name: onnxruntime-android-arm64 os: ubuntu-20.04 build_opts: --android_abi arm64-v8a --cmake_extra_defines CMAKE_SYSTEM_NAME=Android CMAKE_SYSTEM_PROCESSOR=aarch64 --config Release --parallel --compile_no_warning_as_error --update --build --build_shared_lib --android - result_dir: build/Android + result_dir: build release_config: Release - artifact_name: onnxruntime-ios-arm64 os: macos-12 build_opts: --config Release --parallel --compile_no_warning_as_error --update --build --build_shared_lib --skip_tests --use_xcode --ios --ios_sysroot iphoneos --osx_arch arm64 --apple_deploy_target 16.0 build_opts_workaround_protoc: --path_to_protoc_exe /usr/local/opt/protobuf@21/bin/protoc - result_dir: build/iOS/Release + result_dir: build/Release release_config: Release-iphoneos - artifact_name: onnxruntime-ios-sim-arm64 os: macos-12 build_opts: --config Release --parallel --compile_no_warning_as_error --update --build --build_shared_lib --skip_tests --use_xcode --ios --ios_sysroot iphonesimulator --osx_arch arm64 --apple_deploy_target 16.0 build_opts_workaround_protoc: --path_to_protoc_exe /usr/local/opt/protobuf@21/bin/protoc - result_dir: build/iOS/Release + result_dir: build/Release release_config: Release-iphonesimulator - artifact_name: onnxruntime-ios-sim-x86_64 os: macos-12 build_opts: --config Release --parallel --compile_no_warning_as_error --update --build --build_shared_lib --skip_tests --use_xcode --ios --ios_sysroot iphonesimulator --osx_arch x86_64 --apple_deploy_target 16.0 build_opts_workaround_protoc: --path_to_protoc_exe /usr/local/opt/protobuf@21/bin/protoc - result_dir: build/iOS/Release + result_dir: build/Release release_config: Release-iphonesimulator env: @@ -256,19 +256,14 @@ jobs: echo "CC=${{ env.ARCH_PREFIX }}gcc-${{ matrix.cc_version }}" >> "$GITHUB_ENV" echo "CXX=${{ env.ARCH_PREFIX }}g++-${{ matrix.cxx_version }}" >> "$GITHUB_ENV" - - name: Build ONNX Runtime (Windows) - if: steps.cache-build-result.outputs.cache-hit != 'true' && runner.os == 'Windows' - shell: cmd - run: .\build.bat ${{ matrix.build_opts }} - - - name: Build ONNX Runtime (non-Windows) - if: steps.cache-build-result.outputs.cache-hit != 'true' && runner.os != 'Windows' + - name: Build ONNX Runtime + if: steps.cache-build-result.outputs.cache-hit != 'true' run: | # add --arm for gcc-8: https://github.com/microsoft/onnxruntime/issues/4189 # skip test: https://github.com/microsoft/onnxruntime/issues/2436 # ONNX Runtime v1.9.0 requires CMAKE_SYSTEM_PROCESSOR, https://github.com/microsoft/onnxruntime/releases/tag/v1.9.0 # Both CMAKE_SYSTEM_NAME and CMAKE_SYSTEM_PROCESSOR are required. - bash ./build.sh ${{ matrix.build_opts }} ${{ matrix.build_opts_workaround_protoc }} + python ./tools/ci_build/build.py --build_dir ./build ${{ matrix.build_opts }} ${{ matrix.build_opts_workaround_protoc }} - name: Inspect the build directory if: steps.cache-build-result.outputs.cache-hit != 'true' From a2aa7e213ff0ef341aaceb6ba5106d0681c2dafa Mon Sep 17 00:00:00 2001 From: Ryo Yamashita Date: Sat, 6 Jan 2024 14:31:54 +0900 Subject: [PATCH 13/18] =?UTF-8?q?v1.16.3=E3=81=AB=E4=B8=8A=E3=81=92?= =?UTF-8?q?=E3=82=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 11dc76d..6b92d47 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -19,7 +19,7 @@ on: env: ONNXRUNTIME_VERSION: |- # releaseタグ名か、workflow_dispatchでのバージョン名が入る。無指定なら適当なバージョン - ${{ github.event.release.tag_name || github.event.inputs.version || '1.16.2' }} + ${{ github.event.release.tag_name || github.event.inputs.version || '1.16.3' }} RELEASE: |- # releaseタグ名か、workflow_dispatchでのreleaseフラグがあればリリースする ${{ github.event.release.tag_name != '' || github.event.inputs.release == 'true' }} From 8cf3d8018cf5fb2cf0117d8de7a2159b0350a920 Mon Sep 17 00:00:00 2001 From: Ryo Yamashita Date: Tue, 9 Jan 2024 23:54:49 +0900 Subject: [PATCH 14/18] =?UTF-8?q?[skip=20ci]=20"for=20debug"=E3=81=A8?= =?UTF-8?q?=E6=98=8E=E8=A8=98=E3=81=99=E3=82=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Hiroshiba --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 6b92d47..049f946 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -170,7 +170,7 @@ jobs: with: install: tree - - name: Install tree + - name: Install tree for debug if: steps.cache-build-result.outputs.cache-hit != 'true' && runner.os == 'macOS' run: brew install tree From e734b0320fb1fde0b0ab51d5dcb007aaf1b0fdcc Mon Sep 17 00:00:00 2001 From: Ryo Yamashita Date: Tue, 9 Jan 2024 23:56:01 +0900 Subject: [PATCH 15/18] [skip ci] "for debug" Co-authored-by: Hiroshiba --- .github/workflows/build.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 049f946..b8a2901 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -265,7 +265,8 @@ jobs: # Both CMAKE_SYSTEM_NAME and CMAKE_SYSTEM_PROCESSOR are required. python ./tools/ci_build/build.py --build_dir ./build ${{ matrix.build_opts }} ${{ matrix.build_opts_workaround_protoc }} - - name: Inspect the build directory + - name: Inspect the build directory for debug + if: steps.cache-build-result.outputs.cache-hit != 'true' run: | if [ ${{ runner.os }} = Windows ]; then From 3de493b3e089e6947b0f0c81aa007ecfe6771146 Mon Sep 17 00:00:00 2001 From: Ryo Yamashita Date: Tue, 9 Jan 2024 23:59:37 +0900 Subject: [PATCH 16/18] =?UTF-8?q?[skip=20ci]=20"for=20non-x86=5F64=20Linux?= =?UTF-8?q?"=E3=81=A8=E6=98=8E=E8=A8=98=E3=81=99=E3=82=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit https://github.com/VOICEVOX/onnxruntime-builder/pull/26#discussion_r1444974200 --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index b8a2901..e1495ed 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -238,7 +238,7 @@ jobs: echo "CUDNN_HOME=$cudnn_path" >> "$GITHUB_ENV" - - name: Configure build environment + - name: Configure build environment for non-x86_64 Linux if: steps.cache-build-result.outputs.cache-hit != 'true' && startsWith(matrix.os, 'ubuntu') && matrix.arch run: | # Required for arm build From 756a313c1287d60d69da4768d7b76187ac18f218 Mon Sep 17 00:00:00 2001 From: Ryo Yamashita Date: Wed, 10 Jan 2024 02:01:53 +0900 Subject: [PATCH 17/18] =?UTF-8?q?`arch`=20=E2=86=92=20`linux-cross-arch`?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/build.yml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index e1495ed..3f237c5 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -69,7 +69,7 @@ jobs: os: ubuntu-20.04 cc_version: "9" cxx_version: "9" - arch: arm-linux-gnueabihf + linux_cross_arch: arm-linux-gnueabihf symlink_workaround: true build_opts: --arm --cmake_extra_defines CMAKE_SYSTEM_NAME=Linux CMAKE_SYSTEM_PROCESSOR=armv7l --config Release --parallel --compile_no_warning_as_error --update --build --build_shared_lib result_dir: build @@ -78,7 +78,7 @@ jobs: os: ubuntu-20.04 cc_version: "9" cxx_version: "9" - arch: aarch64-linux-gnu + linux_cross_arch: aarch64-linux-gnu symlink_workaround: true build_opts: --arm64 --cmake_extra_defines CMAKE_SYSTEM_NAME=Linux CMAKE_SYSTEM_PROCESSOR=aarch64 --config Release --parallel --compile_no_warning_as_error --update --build --build_shared_lib result_dir: build @@ -125,8 +125,8 @@ jobs: env: # prefix usage: "", "arm-linux-gnueabihf-" => "gcc-8", "arm-linux-gnueabihf-gcc-8" (command name) # suffix usage: "", "-arm-linux-gnueabihf" => "gcc-8", "gcc-8-arm-linux-gnueabihf" (package name) - ARCH_PREFIX: "${{ (matrix.arch != '' && matrix.arch) || '' }}${{ (matrix.arch != '' && '-') || '' }}" - ARCH_SUFFIX: "${{ (matrix.arch != '' && '-') || '' }}${{ (matrix.arch != '' && matrix.arch) || '' }}" + ARCH_PREFIX: "${{ (matrix.linux_cross_arch != '' && matrix.linux_cross_arch) || '' }}${{ (matrix.linux_cross_arch != '' && '-') || '' }}" + ARCH_SUFFIX: "${{ (matrix.linux_cross_arch != '' && '-') || '' }}${{ (matrix.linux_cross_arch != '' && matrix.linux_cross_arch) || '' }}" runs-on: ${{ matrix.os }} @@ -175,7 +175,7 @@ jobs: run: brew install tree - name: Install build dependencies on ubuntu - if: steps.cache-build-result.outputs.cache-hit != 'true' && startsWith(matrix.os, 'ubuntu') && matrix.arch + if: steps.cache-build-result.outputs.cache-hit != 'true' && startsWith(matrix.os, 'ubuntu') && matrix.linux_cross_arch run: | sudo apt-get update sudo apt-get install -y \ @@ -239,7 +239,7 @@ jobs: echo "CUDNN_HOME=$cudnn_path" >> "$GITHUB_ENV" - name: Configure build environment for non-x86_64 Linux - if: steps.cache-build-result.outputs.cache-hit != 'true' && startsWith(matrix.os, 'ubuntu') && matrix.arch + if: steps.cache-build-result.outputs.cache-hit != 'true' && startsWith(matrix.os, 'ubuntu') && matrix.linux_cross_arch run: | # Required for arm build # https://github.com/microsoft/onnxruntime/issues/4189#issuecomment-642528278 @@ -248,8 +248,8 @@ jobs: # Prevent Exec Format Error during cross-compiling if ${{ matrix.symlink_workaround }}; then - find /usr/${{ matrix.arch }}/lib -name '*.so*' -exec sudo ln -s {} /usr/lib/${{ matrix.arch }}/ ';' - sudo ln -s /usr/${{ matrix.arch }}/lib/ld-linux-*.so* /usr/lib/ + find /usr/${{ matrix.linux_cross_arch }}/lib -name '*.so*' -exec sudo ln -s {} /usr/lib/${{ matrix.linux_cross_arch }}/ ';' + sudo ln -s /usr/${{ matrix.linux_cross_arch }}/lib/ld-linux-*.so* /usr/lib/ fi # Set environment variable CC / CXX From 2ac685f5b065276ea225c4fcc48bee2ed350a4b8 Mon Sep 17 00:00:00 2001 From: Ryo Yamashita Date: Wed, 10 Jan 2024 02:09:17 +0900 Subject: [PATCH 18/18] =?UTF-8?q?`cuda=5Fsub=5Fpackage`=E3=81=AB=E3=81=A4?= =?UTF-8?q?=E3=81=84=E3=81=A6=E3=82=B3=E3=83=A1=E3=83=B3=E3=83=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/build.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 3f237c5..3fee2b3 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -42,7 +42,8 @@ jobs: - artifact_name: onnxruntime-win-x64-gpu os: windows-2022 cuda_version: 11.8.0 - cuda_sub_packages: '["cudart", "cuobjdump", "nvcc", "nvdisasm", "thrust", "cublas_dev", "cufft_dev", "curand_dev", "cusolver_dev", "cusparse_dev", "visual_studio_integration"]' # いくつかは不要かもしれない + # 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/redist/cudnn/v8.5.0/local_installers/11.7/cudnn-windows-x86_64-8.5.0.96_cuda11-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 11.8 result_dir: build/Release @@ -60,7 +61,7 @@ jobs: - artifact_name: onnxruntime-linux-x64-gpu os: ubuntu-20.04 cuda_version: 11.8.0 - cuda_sub_packages: "[]" + cuda_sub_packages: "[]" # デフォルト cudnn_url: https://developer.download.nvidia.com/compute/redist/cudnn/v8.2.4/cudnn-11.4-linux-x64-v8.2.4.15.tgz 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