Skip to content

Commit

Permalink
Remove if else from batch files
Browse files Browse the repository at this point in the history
  • Loading branch information
jchen351 committed Nov 1, 2023
1 parent 3ccbbc5 commit 540de12
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 25 deletions.
11 changes: 1 addition & 10 deletions tools/ci_build/github/windows/setup_env_cuda.bat
Original file line number Diff line number Diff line change
@@ -1,17 +1,8 @@
REM Copyright (c) Microsoft Corporation. All rights reserved.
REM Licensed under the MIT License.

if exist %AGENT_TEMPDIRECTORY%\v11.8\ (
set PATH=%AGENT_TEMPDIRECTORY%\v11.8\bin;%AGENT_TEMPDIRECTORY%\v11.8\extras\CUPTI\lib64;%PATH%
) 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 %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 PATH=%PATH%;%AGENT_TEMPDIRECTORY%\v12.2\bin;%AGENT_TEMPDIRECTORY%\v12.2\extras\CUPTI\lib64

set GRADLE_OPTS=-Dorg.gradle.daemon=false
13 changes: 3 additions & 10 deletions tools/ci_build/github/windows/setup_env_gpu.bat
Original file line number Diff line number Diff line change
@@ -1,20 +1,13 @@
REM Copyright (c) Microsoft Corporation. All rights reserved.
REM Licensed under the MIT License.

if exist %AGENT_TEMPDIRECTORY%\v11.8\ (
set PATH=%AGENT_TEMPDIRECTORY%\v11.8\bin;%AGENT_TEMPDIRECTORY%\v11.8\extras\CUPTI\lib64;%PATH%
) 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%
)
set PATH=%AGENT_TEMPDIRECTORY%\v11.8\bin;%AGENT_TEMPDIRECTORY%\v11.8\extras\CUPTI\lib64;%PATH%
set PATH=C:\local\TensorRT-8.6.1.6.Windows10.x86_64.cuda-11.8\lib;%PATH%

@REM The default version is still cuda v11.8, because set cuda v12.2 after it
set PATH=%PATH%;C:\local\TensorRT-8.6.1.6.Windows10.x86_64.cuda-12.0\lib
if exist %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\\bin;C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\\extras\CUPTI\lib64
)
set PATH=%PATH%;%AGENT_TEMPDIRECTORY%\v12.2\bin;%AGENT_TEMPDIRECTORY%\v12.2\extras\CUPTI\lib64



set GRADLE_OPTS=-Dorg.gradle.daemon=false
Expand Down
6 changes: 1 addition & 5 deletions tools/ci_build/github/windows/setup_env_trt.bat
Original file line number Diff line number Diff line change
@@ -1,11 +1,7 @@
REM Copyright (c) Microsoft Corporation. All rights reserved.
REM Licensed under the MIT License.

if exist %AGENT_TEMPDIRECTORY%\v11.8\ (
set PATH=%AGENT_TEMPDIRECTORY%\v11.8\bin;%AGENT_TEMPDIRECTORY%\v11.8\extras\CUPTI\lib64;%PATH%
) 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%
)
set PATH=%AGENT_TEMPDIRECTORY%\v11.8\bin;%AGENT_TEMPDIRECTORY%\v11.8\extras\CUPTI\lib64;%PATH%
set PATH=C:\local\TensorRT-8.6.1.6.Windows10.x86_64.cuda-11.8\lib;%PATH%
set GRADLE_OPTS=-Dorg.gradle.daemon=false
set CUDA_MODULE_LOADING=LAZY

0 comments on commit 540de12

Please sign in to comment.