mirror of
https://github.com/hpcaitech/ColossalAI.git
synced 2025-04-26 19:11:47 +00:00
[install]fix setup (#5786)
* fix * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
This commit is contained in:
parent
b9d646fe9e
commit
a1e39f4c0d
@ -30,7 +30,7 @@ class _CudaExtension(_CppExtension):
|
||||
|
||||
# torch.cuda.is_available requires a device to exist, allow building with cuda extension on build nodes without a device
|
||||
# but where cuda is actually available.
|
||||
cuda_available = torch.cuda.is_available() or bool(os.environ.get('FORCE_CUDA', 0))
|
||||
cuda_available = torch.cuda.is_available() or bool(os.environ.get("FORCE_CUDA", 0))
|
||||
except:
|
||||
cuda_available = False
|
||||
return cuda_available
|
||||
|
Loading…
Reference in New Issue
Block a user