Closed
Description
On win10 I have cuda 11.8 and pytorch using cuda 11.8. nvcc and python torch show the same version:
C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools>nvcc --version
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2022 NVIDIA Corporation
Built on Wed_Sep_21_10:41:10_Pacific_Daylight_Time_2022
Cuda compilation tools, release 11.8, V11.8.89
Build cuda_11.8.r11.8/compiler.31833905_0
C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools>python
Python 3.11.3 (tags/v3.11.3:f3909b8, Apr 4 2023, 23:49:59) [MSC v.1934 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import torch
>>> print(torch.__version__)
2.0.1+cu118
>>> print(torch.cuda.is_available())
True
>>> torch.version.cuda
'11.8'
using pip install vllm, and pip install . on the cloned source gets the same result:
_check_cuda_version(compiler_name, compiler_version)
File "C:\Users\A\AppData\Local\Temp\pip-build-env-5lg7tzgg\overlay\Lib\site-packages\torch\utils\cpp_extension.py", line 383, in _check_cuda_version
torch_cuda_version = packaging.version.parse(torch.version.cuda)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\A\AppData\Local\Temp\pip-build-env-5lg7tzgg\overlay\Lib\site-packages\pkg_resources\_vendor\packaging\version.py", line 52, in parse
return Version(version)
^^^^^^^^^^^^^^^^
File "C:\Users\A\AppData\Local\Temp\pip-build-env-5lg7tzgg\overlay\Lib\site-packages\pkg_resources\_vendor\packaging\version.py", line 196, in __init__
match = self._regex.search(version)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: expected string or bytes-like object, got 'NoneType'
[end of output]
I don't understand the error, because when I do torch.version.cuda in my own python prompt it returns a string for me.
Metadata
Metadata
Assignees
Labels
No labels