mirror of
https://github.com/zebrajr/pytorch.git
synced 2025-12-06 12:20:52 +01:00
Fix TORCH_CUDA_ARCH_LIST (#156667)
Before the fix, `TORCH_CUDA_ARCH_LIST` variable contains string `TORCH_CUDA_ARCH_LIST` Pull Request resolved: https://github.com/pytorch/pytorch/pull/156667 Approved by: https://github.com/ngimel
This commit is contained in:
parent
04178d347c
commit
ce1a07570d
|
|
@ -333,7 +333,11 @@ macro(torch_cuda_get_nvcc_gencode_flag store_var)
|
|||
"CUDA_ARCH_NAME is no longer used. Use TORCH_CUDA_ARCH_LIST instead. "
|
||||
"Right now, CUDA_ARCH_NAME is ${CUDA_ARCH_NAME} and "
|
||||
"TORCH_CUDA_ARCH_LIST is ${TORCH_CUDA_ARCH_LIST}.")
|
||||
set(TORCH_CUDA_ARCH_LIST TORCH_CUDA_ARCH_LIST ${CUDA_ARCH_NAME})
|
||||
if(NOT TORCH_CUDA_ARCH_LIST)
|
||||
set(TORCH_CUDA_ARCH_LIST ${CUDA_ARCH_NAME})
|
||||
else()
|
||||
list(APPEND TORCH_CUDA_ARCH_LIST ${CUDA_ARCH_NAME})
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# Invoke cuda_select_nvcc_arch_flags from proper cmake FindCUDA.
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user