Skip to content

Commit

Permalink
add cuda warning on windows (ModelCloud#942)
Browse files Browse the repository at this point in the history
* add cuda warning

* Update setup.py

---------

Co-authored-by: Qubitium-ModelCloud <[email protected]>
  • Loading branch information
CSY-ModelCloud and Qubitium authored Dec 20, 2024
1 parent 10ab008 commit fa377d9
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,9 @@ def get_version_tag(is_cuda_release: bool = True) -> str:
if not got_cuda_v6:
BUILD_CUDA_EXT = False

if sys.platform == "win32" and 'cu+' not in torch.__version__:
print("No CUDA device detected: avoid installing torch from PyPi which may not have bundle CUDA support for Windows.\nInstall via PyTorch: `https://pytorch.org/get-started/locally/`")

# if cuda compute is < 8.0, always force build since we only compile cached wheels for >= 8.0
if BUILD_CUDA_EXT and not FORCE_BUILD:
if got_cuda_between_v6_and_v8:
Expand Down

0 comments on commit fa377d9

Please sign in to comment.