[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>
pull/5788/head
flybird11111 2024-06-06 11:47:48 +08:00 committed by GitHub
parent b9d646fe9e
commit a1e39f4c0d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 2 additions and 1 deletions

View File

@ -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 # 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. # 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: except:
cuda_available = False cuda_available = False
return cuda_available return cuda_available

View File

@ -144,6 +144,7 @@ setup(
package_data={ package_data={
"colossalai": [ "colossalai": [
"kernel/extensions/csrc/**/*", "kernel/extensions/csrc/**/*",
"kernel/extensions/pybind/**/*",
] ]
}, },
) )