Skip to content

Commit 3b99fa9

Browse files
committed
fix(workflow): set CUDA_PATH for windows-cuda in build environment
1 parent 3b4aebd commit 3b99fa9

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

.github/workflows/main.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -524,7 +524,14 @@ jobs:
524524
if: matrix.name == 'windows-cuda' || matrix.name == 'windows-hip' || matrix.name == 'windows-sycl'
525525
shell: cmd
526526
run: |
527+
setlocal enabledelayedexpansion
527528
call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" x64
529+
if "${{ matrix.name }}" == "windows-cuda" (
530+
if not defined CUDA_PATH (
531+
set "CUDA_PATH=C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v${{ env.CUDA_VERSION }}"
532+
)
533+
set "PATH=!CUDA_PATH!\bin;%PATH%"
534+
)
528535
if "${{ matrix.name }}" == "windows-sycl" (
529536
if exist "%ONEAPI_ROOT%\setvars.bat" (
530537
call "%ONEAPI_ROOT%\setvars.bat"

0 commit comments

Comments
 (0)