Skip to content

Commit

Permalink
Allow CUDA override only during package build
Browse files Browse the repository at this point in the history
  • Loading branch information
jeongseok-meta committed Dec 6, 2024
1 parent 43fc636 commit 4013c11
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions recipe/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

set -ex

export IN_PYTORCH_BUILD

# https://github.com/conda-forge/pytorch-cpu-feedstock/issues/243
# https://github.com/pytorch/pytorch/blob/v2.3.1/setup.py#L341
export PACKAGE_TYPE=conda
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ index ec9ae530..76d1fb9a 100644
# We compute the rest based on those here to avoid re-searching and to avoid finding a possibly
# different installation.
-if(CMAKE_CUDA_COMPILER_TOOLKIT_ROOT)
+if(FALSE)
+if(CMAKE_CUDA_COMPILER_TOOLKIT_ROOT AND NOT $ENV{IN_PYTORCH_BUILD})
set(CUDAToolkit_ROOT_DIR "${CMAKE_CUDA_COMPILER_TOOLKIT_ROOT}")
set(CUDAToolkit_LIBRARY_ROOT "${CMAKE_CUDA_COMPILER_LIBRARY_ROOT}")
set(CUDAToolkit_VERSION "${CMAKE_CUDA_COMPILER_TOOLKIT_VERSION}")
Expand Down

0 comments on commit 4013c11

Please sign in to comment.