Skip to content

Commit

Permalink
Revert "Install CUDA 12.2 on Windows (#18044)"
Browse files Browse the repository at this point in the history
This reverts commit e63ccd3.
  • Loading branch information
snnn committed Oct 25, 2023
1 parent 76e275b commit 80ff642
Show file tree
Hide file tree
Showing 6 changed files with 22 additions and 36 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ stages:
DoCompliance: ${{ parameters.DoCompliance }}
DoEsrp: ${{ parameters.DoEsrp }}
stage_name_suffix: gpu
EnvSetupScript: setup_env_cuda.bat
EnvSetupScript: setup_env_cuda_11.bat
buildArch: x64
msbuildPlatform: x64
packageName: x64-cuda
Expand Down
2 changes: 1 addition & 1 deletion tools/ci_build/github/azure-pipelines/post-merge-jobs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ stages:
- template: templates/jobs/win-ci-vs-2022-job.yml
parameters:
BuildConfig: 'RelWithDebInfo'
EnvSetupScript: setup_env_cuda.bat
EnvSetupScript: setup_env_cuda_11.bat
buildArch: x64
additionalBuildFlags: --enable_pybind --build_java --build_nodejs --use_cuda --cuda_home="$(Agent.TempDirectory)\v11.8" --enable_cuda_profiling --cmake_extra_defines CMAKE_CUDA_ARCHITECTURES=86
msbuildPlatform: x64
Expand Down
40 changes: 16 additions & 24 deletions tools/ci_build/github/azure-pipelines/templates/jobs/set-winenv.yml
Original file line number Diff line number Diff line change
@@ -1,27 +1,19 @@
parameters:
- name: EnvSetupScript
type: string
- name: DownloadCUDA
type: boolean
default: false
- name: PrimaryCUDAVersion
type: string
default: '11.8'
- name: SecondaryCUDAVersion
type: string
default: '12.2'
- name: EnvSetupScript
type: string

- name: DownloadCUDA
type: boolean
default: false

steps:
- ${{ if eq(parameters.DownloadCUDA, 'true') }}:
- powershell: |
azcopy.exe cp --recursive "https://lotusscus.blob.core.windows.net/models/cuda_sdk/v${{ parameters.PrimaryCUDAVersion }}" $(Agent.TempDirectory)
displayName: 'Download Primary CUDA SDK v${{ parameters.PrimaryCUDAVersion }}'
- powershell: |
azcopy.exe cp --recursive "https://lotusscus.blob.core.windows.net/models/cuda_sdk/v${{ parameters.SecondaryCUDAVersion }}" $(Agent.TempDirectory)
displayName: 'Download Secondary CUDA SDK v${{ parameters.SecondaryCUDAVersion }}'
- task: BatchScript@1
displayName: 'setup env'
inputs:
filename: '$(Build.SourcesDirectory)\tools\ci_build\github\windows\${{ parameters.EnvSetupScript }}'
modifyEnvironment: true
workingFolder: '$(Build.BinariesDirectory)'
- ${{ if eq(parameters.DownloadCUDA, 'true') }}:
- powershell: |
azcopy.exe cp --recursive "https://lotusscus.blob.core.windows.net/models/cuda_sdk/v11.8" $(Agent.TempDirectory)
- task: BatchScript@1
displayName: 'setup env'
inputs:
filename: '$(Build.SourcesDirectory)\tools\ci_build\github\windows\${{ parameters.EnvSetupScript }}'
modifyEnvironment: true
workingFolder: '$(Build.BinariesDirectory)'
6 changes: 3 additions & 3 deletions tools/ci_build/github/azure-pipelines/win-gpu-ci-pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ stages:
- template: templates/jobs/win-ci-vs-2022-job.yml
parameters:
BuildConfig: 'RelWithDebInfo'
EnvSetupScript: setup_env_cuda.bat
EnvSetupScript: setup_env_cuda_11.bat
buildArch: x64
additionalBuildFlags: --enable_pybind --build_java --build_nodejs --use_cuda --cuda_home="$(Agent.TempDirectory)\v11.8" --enable_cuda_profiling --cmake_extra_defines CMAKE_CUDA_ARCHITECTURES=86
msbuildPlatform: x64
Expand All @@ -57,7 +57,7 @@ stages:
- template: templates/jobs/win-ci-vs-2022-job.yml
parameters:
BuildConfig: 'RelWithDebInfo'
EnvSetupScript: setup_env_cuda.bat
EnvSetupScript: setup_env_cuda_11.bat
buildArch: x64
additionalBuildFlags: --enable_pybind --enable_training --use_cuda --cuda_home="$(Agent.TempDirectory)\v11.8" --skip_onnx_tests --cmake_extra_defines CMAKE_CUDA_ARCHITECTURES=75
msbuildPlatform: x64
Expand All @@ -76,7 +76,7 @@ stages:
- template: templates/jobs/win-ci-vs-2022-job.yml
parameters:
BuildConfig: 'RelWithDebInfo'
EnvSetupScript: setup_env_cuda.bat
EnvSetupScript: setup_env_cuda_11.bat
buildArch: x64
# note: need to specify `--gen_doc` when creating the build config so it has to be in additionalBuildFlags
additionalBuildFlags: --gen_doc validate --skip_tests --enable_pybind --use_dml --use_cuda --cuda_home="$(Agent.TempDirectory)\v11.8" --cmake_extra_defines CMAKE_CUDA_ARCHITECTURES=86 --cmake_extra_defines onnxruntime_BUILD_UNIT_TESTS=OFF
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
BuildConfig: 'MinSizeRel'
variables:
MsbuildArguments: '-detailedsummary -maxcpucount -consoleloggerparameters:PerformanceSummary'
EnvSetupScript: setup_env_cuda.bat
EnvSetupScript: setup_env_cuda_11.bat
buildArch: x64
TODAY: $[format('{0:dd}{0:MM}{0:yyyy}', pipeline.startTime)]
timeoutInMinutes: 120
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,4 @@ if exist PATH=%AGENT_TEMPDIRECTORY%\v11.8\ {
} else {
set PATH=C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.8\bin;C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.8\extras\CUPTI\lib64;%PATH%
}
@REM The default version is still cuda v11.8, because set cuda v12.2 after it
if exist PATH=%AGENT_TEMPDIRECTORY%\v12.2\ {
set PATH=%PATH%;%AGENT_TEMPDIRECTORY%\v12.2\bin;%AGENT_TEMPDIRECTORY%\v12.2\extras\CUPTI\lib64
} else {
set PATH=%PATH%;C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.2\bin;C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.2\extras\CUPTI\lib64
}
set GRADLE_OPTS=-Dorg.gradle.daemon=false

0 comments on commit 80ff642

Please sign in to comment.