From 44aca2a514a8fca1b32dc55f15a22fabcfd4656c Mon Sep 17 00:00:00 2001 From: CSY-ModelCloud Date: Fri, 20 Dec 2024 14:17:34 +0800 Subject: [PATCH 1/2] add cuda warning --- setup.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/setup.py b/setup.py index 0d4bec26e..c9464630a 100644 --- a/setup.py +++ b/setup.py @@ -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 was found! It looks your torch was installed from PyPi, which may not have CUDA support.\nTry to install it form `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: From 29731d3c12609e58aa5aff0b09fdda17d89e9cb8 Mon Sep 17 00:00:00 2001 From: Qubitium-ModelCloud Date: Fri, 20 Dec 2024 14:26:29 +0800 Subject: [PATCH 2/2] Update setup.py --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index c9464630a..c54351821 100644 --- a/setup.py +++ b/setup.py @@ -102,7 +102,7 @@ def get_version_tag(is_cuda_release: bool = True) -> str: BUILD_CUDA_EXT = False if sys.platform == "win32" and 'cu+' not in torch.__version__: - print("No CUDA was found! It looks your torch was installed from PyPi, which may not have CUDA support.\nTry to install it form `https://pytorch.org/get-started/locally/`") + 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: