Pytorch and CUDA

Danm: <p>hi,i’m using RTX 3050,Win 11 ,pip for install. I’m trying to install cuda 11.8 but it doesn’t seem to work<br>
torch.cuda.is_available() always result False<br>
here is my collect_env:<br>
Collecting environment information…<br>
PyTorch version: 2.0.0+cpu<br>
Is debug build: False<br>
CUDA used to build PyTorch: Could not collect<br>
ROCM used to build PyTorch: N/A</p>
<p>OS: Microsoft Windows 11 Home Single Language<br>
GCC version: Could not collect<br>
Clang version: Could not collect<br>
CMake version: Could not collect<br>
Libc version: N/A</p>
<p>Python version: 3.10.10 (tags/v3.10.10:aad5f6a, Feb  7 2023, 17:20:36) [MSC v.1929 64 bit (AMD64)] (64-bit runtime)<br>
Python platform: Windows-10-10.0.22621-SP0<br>
Is CUDA available: False<br>
CUDA runtime version: 11.8.89<br>
CUDA_MODULE_LOADING set to: N/A<br>
GPU models and configuration: GPU 0: NVIDIA GeForce RTX 3050 Laptop GPU<br>
Nvidia driver version: 528.33<br>
cuDNN version: C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.8\bin\cudnn_ops_train64_8.dll<br>
HIP runtime version: N/A<br>
MIOpen runtime version: N/A<br>
Is XNNPACK available: True</p>
<p>CPU:<br>
Architecture=9<br>
CurrentClockSpeed=2688<br>
DeviceID=CPU0<br>
Family=205<br>
L2CacheSize=7680<br>
L2CacheSpeed=<br>
Manufacturer=GenuineIntel<br>
MaxClockSpeed=2688<br>
Name=11th Gen Intel(R) Core™ i5-11400H @ 2.70GHz<br>
ProcessorType=3<br>
Revision=</p>
<p>Versions of relevant libraries:<br>
[pip3] numpy==1.24.1<br>
[pip3] torch==2.0.0<br>
[pip3] torchaudio==2.0.1+cu118<br>
[pip3] torchvision==0.15.1+cu118<br>
[conda] Could not collect</p>

ptrblck: <aside class="quote no-group" data-username="Danm" data-post="1" data-topic="175276">
<div class="title">
<div class="quote-controls"></div>
<img loading="lazy" alt="" width="24" height="24" src="https://discuss.pytorch.org/letter_avatar_proxy/v4/letter/d/8491ac/48.png" class="avatar"> Danm:</div>
<blockquote>
<p>PyTorch version: 2.0.0+cpu</p>
</blockquote>
</aside>
<p>You’ve installed the CPU-only binary and would need to install a pip wheel or conda binary with a CUDA runtime as given in <a href="https://pytorch.org/get-started/locally/">these install instructions</a>.</p>

Danm: <p>i’ve install but it semm the same</p>
<p>pip3 install torch torchvision torchaudio --index-url <a href="https://download.pytorch.org/whl/cu118" rel="noopener nofollow ugc">https://download.pytorch.org/whl/cu118</a></p>
<p>python -m torch.utils.collect_env<br>
Collecting environment information…<br>
PyTorch version: 2.0.0+cpu</p>

Danm: <p>here is more information<br>
Looking in indexes: <a href="https://download.pytorch.org/whl/cu118" rel="noopener nofollow ugc">https://download.pytorch.org/whl/cu118</a><br>
Requirement already satisfied: torch in e:\xla\xla\lib\site-packages (2.0.0)<br>
Requirement already satisfied: torchvision in e:\xla\xla\lib\site-packages (0.15.1+cu118)<br>
Requirement already satisfied: torchaudio in e:\xla\xla\lib\site-packages (2.0.1+cu118)<br>
Requirement already satisfied: filelock in e:\xla\xla\lib\site-packages (from torch) (3.10.0)<br>
Requirement already satisfied: jinja2 in e:\xla\xla\lib\site-packages (from torch) (3.1.2)<br>
Requirement already satisfied: sympy in e:\xla\xla\lib\site-packages (from torch) (1.11.1)<br>
Requirement already satisfied: typing-extensions in e:\xla\xla\lib\site-packages (from torch) (4.5.0)<br>
Requirement already satisfied: networkx in e:\xla\xla\lib\site-packages (from torch) (3.0)<br>
Requirement already satisfied: pillow!=8.3.*,&gt;=5.3.0 in e:\xla\xla\lib\site-packages (from torchvision) (9.3.0)<br>
Requirement already satisfied: numpy in e:\xla\xla\lib\site-packages (from torchvision) (1.24.1)<br>
Requirement already satisfied: requests in e:\xla\xla\lib\site-packages (from torchvision) (2.28.1)<br>
Requirement already satisfied: MarkupSafe&gt;=2.0 in e:\xla\xla\lib\site-packages (from jinja2-&gt;torch) (2.1.2)<br>
Requirement already satisfied: charset-normalizer&lt;3,&gt;=2 in e:\xla\xla\lib\site-packages (from requests-&gt;torchvision) (2.1.1)<br>
Requirement already satisfied: urllib3&lt;1.27,&gt;=1.21.1 in e:\xla\xla\lib\site-packages (from requests-&gt;torchvision) (1.26.13)<br>
Requirement already satisfied: certifi&gt;=2017.4.17 in e:\xla\xla\lib\site-packages (from requests-&gt;torchvision) (2022.12.7)<br>
Requirement already satisfied: idna&lt;4,&gt;=2.5 in e:\xla\xla\lib\site-packages (from requests-&gt;torchvision) (3.4)<br>
Requirement already satisfied: mpmath&gt;=0.19 in e:\xla\xla\lib\site-packages (from sympy-&gt;torch) (1.3.0)<br>
(XLA) PS E:\XLA&gt; python -m torch.utils.collect_env<br>
Collecting environment information…<br>
PyTorch version: 2.0.0+cpu</p>

Danm: <p><a class="mention" href="/u/ptrblck">@ptrblck</a> pip list show<br>
torch              2.0.0<br>
torchaudio         2.0.1+cu118<br>
torchvision        0.15.1+cu118</p>
<p>but when i tried torch.<strong>version</strong> the version is still 2.0.0+cpu</p>

ptrblck: <p>Uninstall this package, since rerunning the command is not re-installing any new libs as seen in your previous output:</p>
<pre><code class="lang-auto">Requirement already satisfied: torch in e:\xla\xla\lib\site-packages (2.0.0)
...
</code></pre>
<p>or alternatively create a new and empty virtual environment and install the right PyTorch wheels there.</p>

Danm: <p>so i need to create a new venv download torch and torch for cu118 again ?</p>

Danm: <p><a class="mention" href="/u/ptrblck">@ptrblck</a><br>
so i have create a new venv download the package<br>
Successfully installed torchaudio-2.0.1+cu118 torchvision-0.15.1+cu118<br>
and when i run torch.version the result is still<br>
2.0.0+cpu</p>