Help with Install Torch with Cuda

Torch.Cuda: <p>Hello!</p>
<p>I am facing issues while installing and using PyTorch with CUDA support on my computer. Here are some details about my system and the steps I have taken:</p>
<h3><a name="p-457811-system-information-1" class="anchor" href="#p-457811-system-information-1"></a>System Information:</h3>
<ul>
<li><strong>Graphics Card:</strong> NVIDIA GeForce GTX 1050 Ti</li>
<li><strong>NVIDIA Driver Version:</strong> 566.03</li>
<li><strong>CUDA Version (from nvidia-smi):</strong> 12.7</li>
<li><strong>CUDA Version (from nvcc):</strong> 11.7</li>
</ul>
<h3><a name="p-457811-steps-taken-2" class="anchor" href="#p-457811-steps-taken-2"></a>Steps Taken:</h3>
<ol>
<li>I installed Anaconda and created an environment named <code>pytorch_env</code>.</li>
<li>I installed PyTorch, torchvision, and torchaudio using the command:<pre data-code-wrap="bash"><code class="lang-bash">conda install pytorch torchvision torchaudio pytorch-cuda=11.7 -c pytorch -c nvidia
</code></pre>
</li>
<li>I checked the installation by running Python and executing the following commands:<pre data-code-wrap="python"><code class="lang-python">import torch
print(torch.__version__)           # PyTorch Version: 2.4.1
print(torch.cuda.is_available())   # CUDA Availability: False
</code></pre>
</li>
</ol>
<h3><a name="p-457811-problem-3" class="anchor" href="#p-457811-problem-3"></a>Problem:</h3>
<p>Even though PyTorch is installed, CUDA availability returns <code>False</code>. I have checked the NVIDIA drivers and the installation of the CUDA Toolkit, but the issue persists.</p>
<h3><a name="p-457811-questions-4" class="anchor" href="#p-457811-questions-4"></a>Questions:</h3>
<ol>
<li>How can I properly configure PyTorch to work with CUDA?</li>
<li>Do I need to install a different version of PyTorch or NVIDIA drivers to resolve this issue?</li>
<li>Are there any additional steps I could take to troubleshoot this problem?</li>
</ol>
<p>I would appreciate any help or advice!</p>

ptrblck: <aside class="quote no-group" data-username="Torch.Cuda" data-post="1" data-topic="211985">
<div class="title">
<div class="quote-controls"></div>
<img loading="lazy" alt="" width="24" height="24" src="https://discuss.pytorch.org/user_avatar/discuss.pytorch.org/torch.cuda/48/73513_2.png" class="avatar"> Torch.Cuda:</div>
<blockquote>
<p>I have checked the NVIDIA drivers and the installation of the CUDA Toolkit, but the issue persists.</p>
</blockquote>
</aside>
<p>What exactly did you check to make sure the driver works?<br>
Your locally installed CUDA toolkit won’t be used as PyTorch binaries ship with their own CUDA runtime dependencies.</p>
<p>Your install command looks also wrong as it does not correspond to any command from our install matrix.</p>

Torch.Cuda: <p>We checked several key aspects to ensure that the driver works correctly with PyTorch:</p>
<ol>
<li><strong>Driver Verification</strong>: We used the <code>nvidia-smi</code> command to confirm that the NVIDIA driver is installed and functioning. This command shows the driver version and the CUDA version it supports, ensuring compatibility with PyTorch.</li>
<li><strong>CUDA Toolkit</strong>: We noted that the locally installed CUDA toolkit is not utilized by PyTorch binaries, as they come with their own CUDA runtime dependencies. This means we don’t need to worry about having a separate CUDA installation unless we are building from source.</li>
<li><strong>Installation Command</strong>: We carefully reviewed the installation command used for PyTorch. It should match the official installation matrix provided on the PyTorch website. For example, we used:</li>
</ol>
<p>bash</p>
<pre><code class="lang-auto">pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu118
</code></pre>
<p>This command ensures that we are installing the correct version of PyTorch with CUDA support.<br>
4. <strong>CUDA Availability Check</strong>: After installation, we ran a simple check in Python:</p>
<p>python</p>
<pre><code class="lang-auto">import torch
print(torch.cuda.is_available())
</code></pre>
<p>This confirmed whether PyTorch could access the GPU.<br>
5. <strong>Environment Setup</strong>: We created a clean virtual environment to avoid conflicts with other packages, ensuring that all dependencies were correctly installed without any remnants from previous installations.</p>
<p>By following these steps, we ensured that everything was set up properly for using PyTorch with GPU support.</p>

Torch.Cuda: <p>In your question, there is an implication that you believe you know how to solve the problem. If you have specific recommendations or advice regarding this, please share! It could help us better understand the situation and find an optimal solution.</p>

Torch.Cuda: <p>I’m sharing the process of installing PyTorch with CUDA support on my computer. Below are the steps and verification results that I performed.</p>
<h2><a name="p-457823-checking-cuda-version-1" class="anchor" href="#p-457823-checking-cuda-version-1"></a>Checking CUDA Version</h2>
<p>bash</p>
<pre><code class="lang-auto">nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2022 NVIDIA Corporation
Built on Tue_May__3_19:00:59_Pacific_Daylight_Time_2022
Cuda compilation tools, release 11.7, V11.7.64
Build cuda_11.7.r11.7/compiler.31294372_0
</code></pre>
<h2><a name="p-457823-checking-python-version-2" class="anchor" href="#p-457823-checking-python-version-2"></a>Checking Python Version</h2>
<p>bash</p>
<pre><code class="lang-auto">Python 3.12.4
</code></pre>
<h2><a name="p-457823-checking-pip-version-3" class="anchor" href="#p-457823-checking-pip-version-3"></a>Checking pip Version</h2>
<p>bash</p>
<pre><code class="lang-auto">pip 24.2 from E:\tyflow\Tools\python\lib\site-packages\pip (python 3.10)
</code></pre>
<h2><a name="p-457823-checking-installed-pytorch-version-4" class="anchor" href="#p-457823-checking-installed-pytorch-version-4"></a>Checking Installed PyTorch Version</h2>
<p>bash</p>
<pre><code class="lang-auto">PyTorch Version: 2.3.1
</code></pre>
<h2><a name="p-457823-checking-available-cuda-devices-5" class="anchor" href="#p-457823-checking-available-cuda-devices-5"></a>Checking Available CUDA Devices</h2>
<p>bash</p>
<pre><code class="lang-auto">Number of available CUDA devices: CUDA is not available.
</code></pre>
<p>Since CUDA is not available, I decided to reinstall PyTorch.</p>
<h2><a name="p-457823-uninstalling-current-versions-of-pytorch-6" class="anchor" href="#p-457823-uninstalling-current-versions-of-pytorch-6"></a>Uninstalling Current Versions of PyTorch</h2>
<p>bash</p>
<pre><code class="lang-auto">Found existing installation: torch 2.5.0
Uninstalling torch-2.5.0:
  Successfully uninstalled torch-2.5.0
Found existing installation: torchvision 0.20.0
Uninstalling torchvision-0.20.0:
  Successfully uninstalled torchvision-0.20.0
Found existing installation: torchaudio 2.5.0
Uninstalling torchaudio-2.5.0:
  Successfully uninstalled torchaudio-2.5.0
</code></pre>
<h2><a name="p-457823-installing-pytorch-with-cuda-support-7" class="anchor" href="#p-457823-installing-pytorch-with-cuda-support-7"></a>Installing PyTorch with CUDA Support</h2>
<p>bash</p>
<pre><code class="lang-auto">Looking in indexes: https://pypi.org/simple, https://download.pytorch.org/whl/cu117
Collecting torch
Using cached torch-2.5.0-cp310-cp310-win_amd64.whl.metadata (28 kB)
Collecting torchvision
Using cached torchvision-0.20.0-cp310-cp310-win_amd64.whl.metadata (6.2 kB)
Collecting torchaudio
Using cached torchaudio-2.5.0-cp310-cp310-win_amd64.whl.metadata (6.5 kB)
Requirement already satisfied: filelock in e:\tyflow\tools\python\lib\site-packages (from torch) (3.16.1)
...
Successfully installed torch-2.5.0 torchaudio-2.5.0 torchvision-0.20.0
</code></pre>
<h2><a name="p-457823-checking-installation-of-pytorch-with-cuda-8" class="anchor" href="#p-457823-checking-installation-of-pytorch-with-cuda-8"></a>Checking Installation of PyTorch with CUDA</h2>
<p>bash</p>
<pre><code class="lang-auto">CUDA available: False
</code></pre>
<h2><a name="p-457823-rechecking-pytorch-version-after-reinstallation-9" class="anchor" href="#p-457823-rechecking-pytorch-version-after-reinstallation-9"></a>Rechecking PyTorch Version After Reinstallation</h2>
<p>bash</p>
<pre><code class="lang-auto">PyTorch Version: 2.3.1
</code></pre>
<h2><a name="p-457823-rechecking-available-cuda-devices-after-reinstallation-10" class="anchor" href="#p-457823-rechecking-available-cuda-devices-after-reinstallation-10"></a>Rechecking Available CUDA Devices After Reinstallation</h2>
<p>bash</p>
<pre><code class="lang-auto">Number of available CUDA devices: 0.
</code></pre>

Torch.Cuda: <p><div class="lightbox-wrapper"><a class="lightbox" href="https://discuss.pytorch.org/uploads/default/original/3X/f/4/f43ace93ad39825c5bced298caf44e1074b5cd81.jpeg" data-download-href="https://discuss.pytorch.org/uploads/default/f43ace93ad39825c5bced298caf44e1074b5cd81" title="23-10-2024 201520"><img src="https://discuss.pytorch.org/uploads/default/original/3X/f/4/f43ace93ad39825c5bced298caf44e1074b5cd81.jpeg" alt="23-10-2024 201520" data-base62-sha1="yQyuKVArt85jbZAcHviPsKceOjf" width="468" height="500" data-dominant-color="2B3B31"><div class="meta"><svg class="fa d-icon d-icon-far-image svg-icon" aria-hidden="true"><use href="#far-image"></use></svg><span class="filename">23-10-2024 201520</span><span class="informations">743×793 54.8 KB</span><svg class="fa d-icon d-icon-discourse-expand svg-icon" aria-hidden="true"><use href="#discourse-expand"></use></svg></div></a></div></p>

ptrblck: <aside class="quote no-group" data-username="Torch.Cuda" data-post="3" data-topic="211985">
<div class="title">
<div class="quote-controls"></div>
<img loading="lazy" alt="" width="24" height="24" src="https://discuss.pytorch.org/user_avatar/discuss.pytorch.org/torch.cuda/48/73513_2.png" class="avatar"> Torch.Cuda:</div>
<blockquote>
<p><strong>Driver Verification</strong>: We used the <code>nvidia-smi</code> command to confirm that the NVIDIA driver is installed and functioning. This command shows the driver version and the CUDA version it supports, ensuring compatibility with PyTorch.</p>
</blockquote>
</aside>
<p>This is unfortunately not a valid driver test and you should instead verify if any CUDA application is able to run on your GPU.</p>
<aside class="quote no-group" data-username="Torch.Cuda" data-post="3" data-topic="211985">
<div class="title">
<div class="quote-controls"></div>
<img loading="lazy" alt="" width="24" height="24" src="https://discuss.pytorch.org/user_avatar/discuss.pytorch.org/torch.cuda/48/73513_2.png" class="avatar"> Torch.Cuda:</div>
<blockquote>
<p><code>pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu118</code></p>
</blockquote>
</aside>
<p>This command looks correct, but does not match any of your other outputs.</p>
<p>E.g. here you are claiming to have <code>torch==2.3.1</code> installed</p>
<aside class="quote no-group" data-username="Torch.Cuda" data-post="5" data-topic="211985">
<div class="title">
<div class="quote-controls"></div>
<img loading="lazy" alt="" width="24" height="24" src="https://discuss.pytorch.org/user_avatar/discuss.pytorch.org/torch.cuda/48/73513_2.png" class="avatar"> Torch.Cuda:</div>
<blockquote>
<h2>Checking Installed PyTorch Version</h2>
<p>bash</p>
<p><code>PyTorch Version: 2.3.1</code></p>
</blockquote>
</aside>
<p>while you are uninstalling <code>torch==2.5.0</code>:</p>
<aside class="quote no-group" data-username="Torch.Cuda" data-post="5" data-topic="211985">
<div class="title">
<div class="quote-controls"></div>
<img loading="lazy" alt="" width="24" height="24" src="https://discuss.pytorch.org/user_avatar/discuss.pytorch.org/torch.cuda/48/73513_2.png" class="avatar"> Torch.Cuda:</div>
<blockquote>
<h2>Uninstalling Current Versions of PyTorch</h2>
<p>bash</p>
<pre><code class="lang-auto">Found existing installation: torch 2.5.0
Uninstalling torch-2.5.0:
  Successfully uninstalled torch-2.5.0
Found existing installation: torchvision 0.20.0
Uninstalling torchvision-0.20.0:
  Successfully uninstalled torchvision-0.20.0
Found existing installation: torchaudio 2.5.0
Uninstalling torchaudio-2.5.0:
  Successfully uninstalled torchaudio-2.5.0
</code></pre>
</blockquote>
</aside>
<p>Later you are reinstalling <code>torch==2.5.0</code>:</p>
<aside class="quote no-group" data-username="Torch.Cuda" data-post="5" data-topic="211985">
<div class="title">
<div class="quote-controls"></div>
<img loading="lazy" alt="" width="24" height="24" src="https://discuss.pytorch.org/user_avatar/discuss.pytorch.org/torch.cuda/48/73513_2.png" class="avatar"> Torch.Cuda:</div>
<blockquote>
<h2>Installing PyTorch with CUDA Support</h2>
<p>bash</p>
<pre><code class="lang-auto">Looking in indexes: https://pypi.org/simple, https://download.pytorch.org/whl/cu117
Collecting torch
Using cached torch-2.5.0-cp310-cp310-win_amd64.whl.metadata (28 kB)
Collecting torchvision
Using cached torchvision-0.20.0-cp310-cp310-win_amd64.whl.metadata (6.2 kB)
Collecting torchaudio
Using cached torchaudio-2.5.0-cp310-cp310-win_amd64.whl.metadata (6.5 kB)
Requirement already satisfied: filelock in e:\tyflow\tools\python\lib\site-packages (from torch) (3.16.1)
...
Successfully installed torch-2.5.0 torchaudio-2.5.0 torchvision-0.20.0
</code></pre>
</blockquote>
</aside>
<p>while the check again shows <code>torch==2.3.1</code>:</p>
<aside class="quote no-group" data-username="Torch.Cuda" data-post="5" data-topic="211985">
<div class="title">
<div class="quote-controls"></div>
<img loading="lazy" alt="" width="24" height="24" src="https://discuss.pytorch.org/user_avatar/discuss.pytorch.org/torch.cuda/48/73513_2.png" class="avatar"> Torch.Cuda:</div>
<blockquote>
<h2>Rechecking PyTorch Version After Reinstallation</h2>
<p>bash</p>
<p><code>PyTorch Version: 2.3.1</code></p>
</blockquote>
</aside>
<p>I would recommend starting with a clean and new environment, copy/pasting the install command from our website, and install a single version of PyTorch.<br>
The installation log should also show if a CUDA-enabled binary is being installed and you can double check it via <code>torch.cuda.version</code>.</p>

Torch.Cuda: <aside class="quote no-group" data-username="ptrblck" data-post="7" data-topic="211985">
<div class="title">
<div class="quote-controls"></div>
<img loading="lazy" alt="" width="24" height="24" src="https://discuss.pytorch.org/user_avatar/discuss.pytorch.org/ptrblck/48/1823_2.png" class="avatar"> ptrblck:</div>
<blockquote>
<p>I would recommend starting with a clean and new environment</p>
</blockquote>
</aside>
<p>Thank you for taking the time to respond; I really appreciate it. I want to clarify about the new environment: should I uninstall Python and reinstall it? Or is it enough to create a virtual environment? As for the environment, I set it up twice—once with pip and once with Anaconda. I installed it using the command from the website, but during testing, I received a message saying that there is no graphics card.<br>
<em>Or do I need to uninstall Python?</em></p>
<p>To understand the problem, I will show the test results I obtained using CUDA.</p>
<p>C:\Users\ASROCK&gt;nvcc --version<br>
nvcc: NVIDIA (R) Cuda compiler driver<br>
Copyright (c) 2005-2022 NVIDIA Corporation<br>
Built on Tue_May__3_19:00:59_Pacific_Daylight_Time_2022<br>
Cuda compilation tools, release 11.7, V11.7.64<br>
Build cuda_11.7.r11.7/compiler.31294372_0</p>
<p>C:\Users\ASROCK&gt;where nvcc<br>
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.7\bin\nvcc.exe</p>
<p>CUDA Device Query (Runtime API) version (CUDART static linking)</p>
<p>Detected 1 CUDA Capable device(s)</p>
<p>Device 0: “NVIDIA GeForce GTX 1050 Ti”<br>
CUDA Driver Version / Runtime Version 12.7 / 11.7<br>
CUDA Capability Major/Minor version number: 6.1<br>
Total amount of global memory: 4096 MBytes (4294705152 bytes)<br>
( 6) Multiprocessors, (128) CUDA Cores/MP: 768 CUDA Cores<br>
GPU Max Clock rate: 1392 MHz (1.39 GHz)<br>
Memory Clock rate: 3504 Mhz<br>
Memory Bus Width: 128-bit<br>
L2 Cache Size: 1048576 bytes<br>
Maximum Texture Dimension Size (x,y,z) 1D=(131072), 2D=(131072, 65536), 3D=(16384, 16384, 16384)<br>
Maximum Layered 1D Texture Size, (num) layers 1D=(32768), 2048 layers<br>
Maximum Layered 2D Texture Size, (num) layers 2D=(32768, 32768), 2048 layers<br>
Total amount of constant memory: zu bytes<br>
Total amount of shared memory per block: zu bytes<br>
Total number of registers available per block: 65536<br>
Warp size: 32<br>
Maximum number of threads per multiprocessor: 2048<br>
Maximum number of threads per block: 1024<br>
Max dimension size of a thread block (x,y,z): (1024, 1024, 64)<br>
Max dimension size of a grid size (x,y,z): (2147483647, 65535, 65535)<br>
Maximum memory pitch: zu bytes<br>
Texture alignment: zu bytes<br>
Concurrent copy and kernel execution: Yes with 5 copy engine(s)<br>
Run time limit on kernels: Yes<br>
Integrated GPU sharing Host Memory: No<br>
Support host page-locked memory mapping: Yes<br>
Alignment requirement for Surfaces: Yes<br>
Device has ECC support: Disabled<br>
CUDA Device Driver Mode (TCC or WDDM): WDDM (Windows Display Driver Model)<br>
Device supports Unified Addressing (UVA): Yes<br>
Device supports Compute Preemption: Yes<br>
Supports Cooperative Kernel Launch: Yes<br>
Supports MultiDevice Co-op Kernel Launch: No<br>
Device PCI Domain ID / Bus ID / location ID: 0 / 1 / 0<br>
Compute Mode:<br>
&lt; Default (multiple host threads can use ::cudaSetDevice() with device simultaneously) &gt;</p>
<p>deviceQuery, CUDA Driver = CUDART, CUDA Driver Version = 12.7, CUDA Runtime Version = 11.7, NumDevs = 1, Device0 = NVIDIA GeForce GTX 1050 Ti<br>
Result = PASS</p>
<p>C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.7\extras\demo_suite&gt;bandwidthTest.exe &gt; c:\1\222.txt</p>
<p>[CUDA Bandwidth Test] - Starting…<br>
Running on…</p>
<p>Device 0: NVIDIA GeForce GTX 1050 Ti<br>
Quick Mode</p>
<p>Host to Device Bandwidth, 1 Device(s)<br>
PINNED Memory Transfers<br>
Transfer Size (Bytes)	Bandwidth(MB/s)<br>
33554432			12643.2</p>
<p>Device to Host Bandwidth, 1 Device(s)<br>
PINNED Memory Transfers<br>
Transfer Size (Bytes)	Bandwidth(MB/s)<br>
33554432			12514.7</p>
<p>Device to Device Bandwidth, 1 Device(s)<br>
PINNED Memory Transfers<br>
Transfer Size (Bytes)	Bandwidth(MB/s)<br>
33554432			96155.2</p>
<p>Result = PASS</p>
<p>NOTE: The CUDA Samples are not meant for performance measurements. Results may vary when GPU Boost is enabled.</p>
<p>System Information:<br>
Graphics Card: NVIDIA GeForce GTX 1050 Ti<br>
CUDA Driver Version: 12.7<br>
CUDA Runtime Version: 11.7<br>
Total Memory: 4096 MB<br>
Testing Results:<br>
Device Query:<br>
Confirmed that the graphics card is functioning correctly and supports CUDA.<br>
All information about the graphics card specifications was successfully retrieved.<br>
Bandwidth Test:<br>
Host to Device: 12,643.2 MB/s<br>
Device to Host: 12,514.7 MB/s<br>
Device to Device: 96,155.2 MB/s<br>
The results show that the data transfer bandwidth between the host and device is within the normal range, indicating good system performance.<br>
Conclusions:<br>
Your system fully supports CUDA and is functioning correctly.<br>
The data transfer bandwidth is at an acceptable level, making your graphics card suitable for computationally intensive tasks.<br>
You can use CUDA for developing and running applications optimized for your graphics card.</p>
<p><strong>I express my deep gratitude for the attention and time you have given.</strong></p>

ptrblck: <aside class="quote no-group" data-username="Torch.Cuda" data-post="8" data-topic="211985">
<div class="title">
<div class="quote-controls"></div>
<img loading="lazy" alt="" width="24" height="24" src="https://discuss.pytorch.org/user_avatar/discuss.pytorch.org/torch.cuda/48/73513_2.png" class="avatar"> Torch.Cuda:</div>
<blockquote>
<p>I want to clarify about the new environment: should I uninstall Python and reinstall it?</p>
</blockquote>
</aside>
<p>No, don’t uninstall Python itself.<br>
Just make sure no PyTorch installation can be found before trying to install a new version.<br>
I.e. run these commands a few times in your base environment (i.e. without activating a new virtual environment):</p>
<pre data-code-wrap="python"><code class="lang-python">pip uninstall torch -y
pip uninstall torch -y
pip uninstall torch -y
...
conda uninstall pytorch -y
conda uninstall pytorch -y
conda uninstall pytorch -y
...
</code></pre>
<p>The terminal should then claim no further installations were detected. Once this is done, create a new virtual environment, e.g. via <code>conda</code>, and install a single PyTorch binary there using an install command from our website.<br>
During the installation check which packages are installed as the pip wheel as well as the conda binary should pull either directly CUDA runtime libraries or would indicate the CUDA runtime version in the binary name of PyTorch.</p>
<p>Afterwards, check which version was installed via:</p>
<pre data-code-wrap="python"><code class="lang-python">import torch
print(torch.__version__)
print(torch.version.cuda)
</code></pre>
<p>which should show the selected CUDA runtime version and perform a quick test to allocate a random tensor on the GPU:</p>
<pre data-code-wrap="python"><code class="lang-python">print(torch.randn(1).cuda())
</code></pre>

Torch.Cuda: <p>Hi ,  sorry  …</p>
<p>Python 3.10.6 (tags/v3.10.6:9c7b4bd, Aug  1 2022, 21:53:49) [MSC v.1932 64 bit (AMD64)] on win32<br>
Type “help”, “copyright”, “credits” or “license” for more information.</p>
<blockquote>
<blockquote>
<blockquote>
<p>import torch<br>
print(torch.<strong>version</strong>)<br>
2.3.1+cpu<br>
print(torch.version.cuda)<br>
None<br>
print(torch.randn(1).cuda())<br>
Traceback (most recent call last):<br>
File “”, line 1, in <br>
File “C:\Users\ASROCK\AppData\Local\Programs\Python\Python310\lib\site-packages\torch\cuda_<em>init</em>_.py”, line 284, in _lazy_init<br>
raise AssertionError(“Torch not compiled with CUDA enabled”)<br>
AssertionError: Torch not compiled with CUDA enabled</p>
</blockquote>
</blockquote>
</blockquote>

Torch.Cuda: <aside class="quote no-group" data-username="ptrblck" data-post="7" data-topic="211985">
<div class="title">
<div class="quote-controls"></div>
<img loading="lazy" alt="" width="24" height="24" src="https://discuss.pytorch.org/user_avatar/discuss.pytorch.org/ptrblck/48/1823_2.png" class="avatar"> ptrblck:</div>
<blockquote>
<p>command from our website,</p>
</blockquote>
</aside>
<p>“command from our website”   - please write what it should be like</p>

Torch.Cuda: <p>Microsoft Windows [Version 10.0.19045.5011]<br>
(c) Microsoft Corporation. All rights reserved.</p>
<p>C:\Users\ASROCK&gt;nvcc --version<br>
nvcc: NVIDIA (R) Cuda compiler driver<br>
Copyright (c) 2005-2022 NVIDIA Corporation<br>
Built on Tue_May__3_19:00:59_Pacific_Daylight_Time_2022<br>
Cuda compilation tools, release 11.7, V11.7.64<br>
Build cuda_11.7.r11.7/compiler.31294372_0</p>
<p>C:\Users\ASROCK&gt;</p>

Torch.Cuda: <p>pip install torch torchvision torchaudio --extra-index-url <a href="https://download.pytorch.org/whl/cu117" rel="noopener nofollow ugc">https://download.pytorch.org/whl/cu117</a></p>
<p>OK ?</p>

Torch.Cuda: <p><div class="lightbox-wrapper"><a class="lightbox" href="https://discuss.pytorch.org/uploads/default/original/3X/6/6/66b4ed2391855492e5e631b2c23beb6a75675a4b.png" data-download-href="https://discuss.pytorch.org/uploads/default/66b4ed2391855492e5e631b2c23beb6a75675a4b" title="01-11-2024 001040"><img src="https://discuss.pytorch.org/uploads/default/original/3X/6/6/66b4ed2391855492e5e631b2c23beb6a75675a4b.png" alt="01-11-2024 001040" data-base62-sha1="eEAkL9sAiVgiEDPMf3a8onicsoH" width="690" height="286" data-dominant-color="232323"><div class="meta"><svg class="fa d-icon d-icon-far-image svg-icon" aria-hidden="true"><use href="#far-image"></use></svg><span class="filename">01-11-2024 001040</span><span class="informations">784×326 9.61 KB</span><svg class="fa d-icon d-icon-discourse-expand svg-icon" aria-hidden="true"><use href="#discourse-expand"></use></svg></div></a></div></p>
<p>Did it work?</p>

Torch.Cuda: <p><div class="lightbox-wrapper"><a class="lightbox" href="https://discuss.pytorch.org/uploads/default/original/3X/0/a/0aa9cbedf7331d878f186b8108a76d4cba41fdd3.png" data-download-href="https://discuss.pytorch.org/uploads/default/0aa9cbedf7331d878f186b8108a76d4cba41fdd3" title="1-11-2024 001428"><img src="https://discuss.pytorch.org/uploads/default/original/3X/0/a/0aa9cbedf7331d878f186b8108a76d4cba41fdd3.png" alt="1-11-2024 001428" data-base62-sha1="1wkyRfYaXL42hokiBVwQhhgIT99" width="690" height="371" data-dominant-color="1C1C1C"><div class="meta"><svg class="fa d-icon d-icon-far-image svg-icon" aria-hidden="true"><use href="#far-image"></use></svg><span class="filename">1-11-2024 001428</span><span class="informations">814×438 9.46 KB</span><svg class="fa d-icon d-icon-discourse-expand svg-icon" aria-hidden="true"><use href="#discourse-expand"></use></svg></div></a></div></p>
<p>Did it work?</p>

Torch.Cuda: <p><div class="lightbox-wrapper"><a class="lightbox" href="https://discuss.pytorch.org/uploads/default/original/3X/6/e/6e578b4deb3e5120e9b38da9f96bb6a27451b214.jpeg" data-download-href="https://discuss.pytorch.org/uploads/default/6e578b4deb3e5120e9b38da9f96bb6a27451b214" title="4 001931"><img src="https://discuss.pytorch.org/uploads/default/original/3X/6/e/6e578b4deb3e5120e9b38da9f96bb6a27451b214.jpeg" alt="4 001931" data-base62-sha1="fK85dPhzT0PD55Q2TZIKEvPxJxq" width="620" height="500" data-dominant-color="C8B79C"><div class="meta"><svg class="fa d-icon d-icon-far-image svg-icon" aria-hidden="true"><use href="#far-image"></use></svg><span class="filename">4 001931</span><span class="informations">744×600 93.3 KB</span><svg class="fa d-icon d-icon-discourse-expand svg-icon" aria-hidden="true"><use href="#discourse-expand"></use></svg></div></a></div></p>

Torch.Cuda: <p>Dear ptrblck,<br>
I want to express my sincere gratitude for your incredible help with the installation of PyTorch with CUDA support! Your support and professionalism have been a true lifesaver for me. Thanks to your recommendations and advice, I was able to successfully set up all the necessary components, and now I am enjoying all the benefits that this powerful library provides.<br>
Your knowledge and experience made the installation process easy and understandable. I was filled with joy when everything worked flawlessly. Now I can focus on my projects and reach new heights in deep learning.<br>
I wish you all the best in your endeavors! May your work bring you joy and satisfaction, and may your company continue to thrive and reach new heights.<br>
Once again, thank you for your help!</p>

Torch.Cuda: <p>I want to share my epic saga related to the installation of PyTorch with CUDA support. Before diving into this important task, I decided to prepare thoroughly! I removed everything I could: even Python didn’t survive! Conda? I got rid of dozens of programs that happened to be in my way. I even cleaned the floors at home and swept all the streets in the yard — I thought cleanliness would help with the installation.<br>
After such preparation, I went to the bathhouse to clear my mind and recharge my energy. And finally, I started the installation… and nothing worked! I was beginning to think it was some kind of karma.<br>
But then I installed version 11.8, and lo and behold — everything worked! Now I can enjoy all the benefits of PyTorch and CUDA.<br>
Thank you for your help and patience! Without you, I would have remained in a world of non-working installations and clean floors!<br>
Best wishes, Torch Cuda )))</p>

ptrblck: <p>Great to hear it’s working now and thanks for the update!</p>

Laubeee: <p>Does 11.8 refer to python or cuda? are there certain version combinations that cause (known) problems?</p>
<p>specifically, I am experiencing the same issue that torch does not detect cuda with python 3.10.16 and cuda 12.8</p>
<p>Edit: nvm, upon reading the thread in detail and visiting the install page I realized on windows you cant just <code>pip install torch</code> and expect it to ship with cuda… so un- and re-installing with cu126 fixed it for me.</p>