Latest cuda toolkit release 11.7. is it compatible with pytorch?

jayz: <p>Hello,</p>
<p>I just saw there is a new release 11.7 of the Cuda toolkit. Is it possible to build pytorch with this?<br>
I am hoping that it will solve issues with my Gigabyte RTX3080, which does not perform better than my GTX 1650 Ti notebook card, I suspect because I have used prebuilt binaries for pytorch. If 11.7 is not supported, what version of cuda and cudnn do you recommend for an RTX 3080. Thanks!</p>
<p>Best, JZ</p>

eqy: <p>What are the issues you are experiencing with the 3080? It’s a bit tough to say what the performance impact would be without knowing the workload and the versions of the dependent libraries (e.g., cuBLAS, cuDNN) that are being used.</p>
<p>However, 11.7 should work fine with a recent version of PyTorch if you are building from source.</p>

mfaqihts: <p>so I am trying to build pytorch from source with cuda 11.7 on linux, however i couldn’t find exact magma cuda for 11.7.</p>
<blockquote>
<p><code># CUDA only: Add LAPACK support for the GPU if needed</code></p>
</blockquote>
<blockquote>
<p><code>conda install -c pytorch magma-cuda110  # or the magma-cuda* that matches your CUDA version from https://anaconda.org/pytorch/repo </code></p>
</blockquote>
<p>any info about this?</p>

ptrblck: <p>You could rebuild MAGMA from source for 11.7 or wait until we publish them.</p>

Sedherthe: <p>Hey!<br>
<a class="mention" href="/u/jayz">@jayz</a> Were you able to install PyTorch from the source for CUDA toolkit 11.7?<br>
<a class="mention" href="/u/ptrblck">@ptrblck</a> I am getting the below when I try installing from source:</p>
<pre><code class="lang-auto">CMake Error at torch/lib/libshm/CMakeLists.txt:36 (add_executable):
  The install of the torch_shm_manager target requires changing an RPATH from
  the build tree, but this is not supported with the Ninja generator unless
  on an ELF-based or XCOFF-based platform.  The
  CMAKE_BUILD_WITH_INSTALL_RPATH variable may be set to avoid this relinking
  step.
</code></pre>
<p>Tried installing the latest version of CMake and also setting the variable CMAKE_BUILD_WITH_INSTALL_RPATH=ON (Not sure if this is right).</p>
<p>Can anybody help me with this?</p>

ptrblck: <p>I haven’t seen this issue before, but <a href="https://stackoverflow.com/questions/68202182/pytorch-building-from-source-cmake-build-with-install-rpath">this similar post</a> points to a <code>cmake</code> version which might be too old (the answer mentions to install <code>cmake</code> but it was already installed as it’s raising the error, so maybe it was updated instead).</p>

Sedherthe: <p><a class="mention" href="/u/ptrblck">@ptrblck</a> Thank you for your instant response!<br>
I did try removing the CMake that’s prebuilt(And I guess this was not an old version: 3.22.x) and installing again using apt earlier. But, this didn’t work.<br>
So, I tried deleting the PyTorch repo itself, cloned it once again, then started the whole process, and this time it worked!<br>
I guess this didn’t work earlier due to CMake cache? Not sure what happened here.</p>

ptrblck: <p>Weird issue, but you might be right that “something” was still in the cache. Running <code>python setup.py clean</code> should wipe every intermediate build files and should also work, but it’s good to hear it’s working now.</p>

jayz: <p>Nope, i went with the cuda 11.6 binaries in the end, did not try building 11.7 from source.</p>

MaMai_Mechatronics: <p>I am trying to fix</p>
<blockquote>
<p>Blockquote<br>
AssertionError: Torch not compiled with CUDA enabled</p>
</blockquote>
<p>I attemped many solution in github and stackflow. It still doesn’t work.</p>

KyleLiang5: <p>any chance someone has attempted this solution? I am facing the similar issue with RTX 3090 and CUDA 11.7 and Windows 11.</p>

FantasyFrontline: <p>These days I am working with the newest version of pytorch on my Win11 Laptop with RTX3070, but it always occurs some fatal problem with cuda 11.7. It seems that not only I am suffering from this problem. Still waiting for a solution. Running ML on CPU is too slow.</p>

ptrblck: <p>I assume you are trying to build PyTorch from source using CUDA 11.7 as the binaries are not released yet. If so, use the supported pip wheels or conda binaries with CUDA 11.3 or 11.6.</p>

Saddam_Sinatrya_Jalu: <p>Currently still not support <img src="https://discuss.pytorch.org/images/emoji/apple/frowning.png?v=12" title=":frowning:" class="emoji" alt=":frowning:" loading="lazy" width="20" height="20"></p>
<pre><code class="lang-bash">&gt;&gt;&gt; import torch
&gt;&gt;&gt; torch.cuda.is_available()
False
&gt;&gt;&gt; torch.zeros(1).cuda()
Traceback (most recent call last):
  File "&lt;stdin&gt;", line 1, in &lt;module&gt;
  File "C:\Users\myxzlpltk\anaconda3\envs\tf-gpu\lib\site-packages\torch\cuda\__init__.py", line 211, in _lazy_init
    raise AssertionError("Torch not compiled with CUDA enabled")
AssertionError: Torch not compiled with CUDA enabled

</code></pre>
<p>If you insist, you can downgrade cuda-toolkit to 11.6</p>