From fe6756e5d70b5857700b7f81ed8f057a4021532a Mon Sep 17 00:00:00 2001 From: Ryo Yamashita Date: Mon, 15 Apr 2024 12:18:54 +0900 Subject: [PATCH] =?UTF-8?q?CUDA=E3=82=92v12.2=E3=81=AB=20(#38)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * CUDAをv12.2に * Windowsでは`use-github-cache`と`use-local-cache`を`false`にする See: https://github.com/VOICEVOX/voicevox_additional_libraries/pull/3#issuecomment-2050357481 * cuda-toolkitをv0.2.14に * 以前のcuDNNに対するワークアラウンドを削除 * `--cuda_version`も更新 --- .github/workflows/build.yml | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 4074ff2..1459c06 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -41,11 +41,11 @@ jobs: release_config: Release - artifact_name: onnxruntime-win-x64-gpu os: windows-2022 - cuda_version: 11.8.0 + cuda_version: 12.2.2 # 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 + cudnn_url: https://developer.download.nvidia.com/compute/cudnn/redist/cudnn/windows-x86_64/cudnn-windows-x86_64-8.9.2.26_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.2 result_dir: build/Release release_config: Release - artifact_name: onnxruntime-win-x86 @@ -60,9 +60,9 @@ jobs: release_config: Release - artifact_name: onnxruntime-linux-x64-gpu os: ubuntu-20.04 - cuda_version: 11.8.0 + cuda_version: 12.2.2 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 + cudnn_url: https://developer.download.nvidia.com/compute/cudnn/redist/cudnn/linux-x86_64/cudnn-linux-x86_64-8.9.2.26_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 @@ -213,11 +213,14 @@ jobs: - 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 + uses: Jimver/cuda-toolkit@v0.2.14 with: cuda: ${{ matrix.cuda_version }} sub-packages: ${{ matrix.cuda_sub_packages }} method: network + # https://github.com/Jimver/cuda-toolkit/issues/315#issuecomment-2016310157 + use-github-cache: ${{ runner.os != 'Windows' }} + use-local-cache: ${{ runner.os != 'Windows' }} - name: Set `$CUDA_HOME` if: steps.cache-build-result.outputs.cache-hit != 'true' && matrix.cuda_version && matrix.cudnn_url @@ -239,7 +242,6 @@ jobs: 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