Skip to content

Commit

Permalink
re-add workaround for -DCUDA_TOOLKIT...
Browse files Browse the repository at this point in the history
  • Loading branch information
h-vetinari committed Dec 15, 2020
1 parent ad7b695 commit d7d1e47
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
9 changes: 8 additions & 1 deletion recipe/build-lib.bat
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,14 @@ if "%cuda_compiler_version%"=="None" (
set "CMAKE_CUDA_ARCHS=52-virtual;60-virtual;61-virtual;70-virtual;75-virtual;80-virtual;80-real"
)

set "CUDA_CONFIG_ARGS=-DCMAKE_CUDA_ARCHITECTURES=!CMAKE_CUDA_ARCHS!"
REM workaround for https://github.com/conda-forge/nvcc-feedstock/issues/53
set "CUDA_PATH=C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v%cuda_compiler_version%"
echo "Setting workaround CUDA_PATH=!CUDA_PATH!"
set "CUDA_HOME=!CUDA_PATH!"
REM With %MY_VAR:\=/% we replace backslashes with forward slashes
REM set "CUDA_TOOLKIT_ROOT_DIR=!CUDA_PATH:\=/!"

set "CUDA_CONFIG_ARGS=-DCMAKE_CUDA_ARCHITECTURES=!CMAKE_CUDA_ARCHS! -DCUDA_TOOLKIT_ROOT_DIR=!CUDA_PATH!"

REM cmake does not generate output for the call below; echo some info
echo "Set up extra cmake-args: CUDA_CONFIG_ARGS=!CUDA_CONFIG_ARGS!"
Expand Down
4 changes: 2 additions & 2 deletions recipe/build-pkg.bat
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ if "%cuda_compiler_version%"=="None" (
echo "Setting workaround CUDA_PATH=!CUDA_PATH!"
set "CUDA_HOME=!CUDA_PATH!"
REM With %MY_VAR:\=/% we replace backslashes with forward slashes
set "CUDA_TOOLKIT_ROOT_DIR=!CUDA_PATH:\=/!"
REM set "CUDA_TOOLKIT_ROOT_DIR=!CUDA_PATH:\=/!"

set "CUDA_CONFIG_ARGS=-DCUDA_TOOLKIT_ROOT_DIR=!CUDA_TOOLKIT_ROOT_DIR!"
set "CUDA_CONFIG_ARGS=-DCUDA_TOOLKIT_ROOT_DIR=!CUDA_PATH!"

REM cmake does not generate output for the call below; echo some info
echo "Set up extra cmake-args: CUDA_CONFIG_ARGS=!CUDA_CONFIG_ARGS!"
Expand Down

0 comments on commit d7d1e47

Please sign in to comment.