fix: setup.py TORCH_CUDA_ARCH_LIST (#62)

pull/122/head
Dowon 2023-04-19 12:36:28 +09:00 committed by GitHub
parent c43cdb3a95
commit 57535c5a79
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -70,7 +70,7 @@ def get_extensions():
extra_compile_args = {"cxx": []}
define_macros = []
if torch.cuda.is_available() and CUDA_HOME is not None:
if CUDA_HOME is not None and (torch.cuda.is_available() or "TORCH_CUDA_ARCH_LIST" in os.environ):
print("Compiling with CUDA")
extension = CUDAExtension
sources += source_cuda