Skip to content

Commit

Permalink
CUDAをv12.2に (#38)
Browse files Browse the repository at this point in the history
* CUDAをv12.2に

* Windowsでは`use-github-cache`と`use-local-cache`を`false`にする

See: VOICEVOX/voicevox_additional_libraries#3 (comment)

* cuda-toolkitをv0.2.14に

* 以前のcuDNNに対するワークアラウンドを削除

* `--cuda_version`も更新
  • Loading branch information
qryxip authored Apr 15, 2024
1 parent 8c7ef38 commit fe6756e
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand Down

0 comments on commit fe6756e

Please sign in to comment.