Skip to content

Commit

Permalink
Avoid using cuda when it is installed but torch was compiled against …
Browse files Browse the repository at this point in the history
…ROCM/hip (#1164)
  • Loading branch information
IMbackK authored Dec 17, 2024
1 parent 1f2b5a7 commit f0a401c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -438,7 +438,7 @@ def get_extensions():
use_pt_flash = False

if (
(torch.cuda.is_available() and ((CUDA_HOME is not None)))
(torch.cuda.is_available() and (CUDA_HOME is not None) and (torch.version.cuda is not None))
or os.getenv("FORCE_CUDA", "0") == "1"
or os.getenv("TORCH_CUDA_ARCH_LIST", "") != ""
):
Expand Down

0 comments on commit f0a401c

Please sign in to comment.