From 57535c5a79791cb76e36fdb64975271354f10251 Mon Sep 17 00:00:00 2001 From: Dowon Date: Wed, 19 Apr 2023 12:36:28 +0900 Subject: [PATCH] fix: setup.py TORCH_CUDA_ARCH_LIST (#62) --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index a045b76..bdc9eb5 100644 --- a/setup.py +++ b/setup.py @@ -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