Pythorch version for cuda_12.2!

Hdi: <p>Please help !</p>
<p><div class="lightbox-wrapper"><a class="lightbox" href="https://discuss.pytorch.org/uploads/default/original/3X/0/b/0baaeb5e684b44b9324646467e5327f89dfedd2c.png" data-download-href="https://discuss.pytorch.org/uploads/default/0baaeb5e684b44b9324646467e5327f89dfedd2c" title="Screenshot 2024-01-10 131954"><img src="https://discuss.pytorch.org/uploads/default/optimized/3X/0/b/0baaeb5e684b44b9324646467e5327f89dfedd2c_2_690x326.png" alt="Screenshot 2024-01-10 131954" data-base62-sha1="1FdrBOl6oXG85hUiQNLkCmmuBmk" width="690" height="326" srcset="https://discuss.pytorch.org/uploads/default/optimized/3X/0/b/0baaeb5e684b44b9324646467e5327f89dfedd2c_2_690x326.png, https://discuss.pytorch.org/uploads/default/optimized/3X/0/b/0baaeb5e684b44b9324646467e5327f89dfedd2c_2_1035x489.png 1.5x, https://discuss.pytorch.org/uploads/default/optimized/3X/0/b/0baaeb5e684b44b9324646467e5327f89dfedd2c_2_1380x652.png 2x" data-dominant-color="ECECED"><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">Screenshot 2024-01-10 131954</span><span class="informations">1530×725 119 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>I am using Colab , Python 3.10.12, GPU,<br>
NVIDIA-SMI 535.104.05             Driver Version: 535.104.05   CUDA Version: 12.2<br>
cuda_12.2.r12.2/compiler.33191640_0<br>
I’m not able to find the Pythorch version for cuda_12.2. I used the installation for cuda_12.1</p>
<p>pip3 install torch torchvision torchaudio</p>
<p>I clone the git code " <a href="https://github.com/davidnvq/grit.git" class="inline-onebox" rel="noopener nofollow ugc">GitHub - davidnvq/grit: GRIT: Faster and Better Image-captioning Transformer (ECCV 2022)</a>"</p>
<p>When I run the following<br>
!python models/ops/setup.py build develop<br>
I got this error<br>
running build<br>
running build_py<br>
running build_ext<br>
/usr/local/lib/python3.10/dist-packages/torch/utils/cpp_extension.py:502: UserWarning: Attempted to use ninja as the BuildExtension backend but we could not find ninja… Falling back to using the slow distutils backend.<br>
warnings.warn(msg.format(‘we could not find ninja.’))<br>
/usr/local/lib/python3.10/dist-packages/torch/utils/cpp_extension.py:414: UserWarning: The detected CUDA version (12.2) has a minor version mismatch with the version that was used to compile PyTorch (12.1). Most likely this shouldn’t be a problem.<br>
warnings.warn(CUDA_MISMATCH_WARN.format(cuda_str_version, torch.version.cuda))<br>
/usr/local/lib/python3.10/dist-packages/torch/utils/cpp_extension.py:424: UserWarning: There are no x86_64-linux-gnu-g++ version bounds defined for CUDA version 12.2<br>
warnings.warn(f’There are no {compiler_name} version bounds defined for CUDA version {cuda_str_version}')<br>
running develop<br>
/usr/local/lib/python3.10/dist-packages/setuptools/command/develop.py:40: EasyInstallDeprecationWarning: easy_install command is deprecated.<br>
!!</p>
<pre><code>    ********************************************************************************
    Please avoid running ``setup.py`` and ``easy_install``.
    Instead, use pypa/build, pypa/installer, pypa/build or
    other standards-based tools.

    See https://github.com/pypa/setuptools/issues/917 for details.
    ********************************************************************************
</code></pre>
<p>!!<br>
easy_install.initialize_options(self)<br>
/usr/local/lib/python3.10/dist-packages/setuptools/_distutils/cmd.py:66: SetuptoolsDeprecationWarning: setup.py install is deprecated.<br>
!!</p>
<pre><code>    ********************************************************************************
    Please avoid running ``setup.py`` directly.
    Instead, use pypa/build, pypa/installer, pypa/build or
    other standards-based tools.

    See https://blog.ganssle.io/articles/2021/10/setup-py-deprecated.html for details.
    ********************************************************************************
</code></pre>
<p>!!<br>
self.initialize_options()<br>
running egg_info<br>
writing MultiScaleDeformableAttention.egg-info/PKG-INFO<br>
writing dependency_links to MultiScaleDeformableAttention.egg-info/dependency_links.txt<br>
writing top-level names to MultiScaleDeformableAttention.egg-info/top_level.txt<br>
reading manifest file ‘MultiScaleDeformableAttention.egg-info/SOURCES.txt’<br>
writing manifest file ‘MultiScaleDeformableAttention.egg-info/SOURCES.txt’<br>
running build_ext<br>
/usr/local/lib/python3.10/dist-packages/torch/utils/cpp_extension.py:414: UserWarning: The detected CUDA version (12.2) has a minor version mismatch with the version that was used to compile PyTorch (12.1). Most likely this shouldn’t be a problem.<br>
warnings.warn(CUDA_MISMATCH_WARN.format(cuda_str_version, torch.version.cuda))<br>
/usr/local/lib/python3.10/dist-packages/torch/utils/cpp_extension.py:424: UserWarning: There are no x86_64-linux-gnu-g++ version bounds defined for CUDA version 12.2<br>
warnings.warn(f’There are no {compiler_name} version bounds defined for CUDA version {cuda_str_version}')<br>
Creating /usr/local/lib/python3.10/dist-packages/MultiScaleDeformableAttention.egg-link (link to .)<br>
MultiScaleDeformableAttention 1.0 is already the active version in easy-install.pth</p>

ptrblck: <aside class="quote no-group" data-username="Hdi" data-post="1" data-topic="195217">
<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/h/3ec8ea/48.png" class="avatar"> Hdi:</div>
<blockquote>
<p>warnings.warn(msg.format(‘we could not find ninja.’))<br>
/usr/local/lib/python3.10/dist-packages/torch/utils/cpp_extension.py:414: UserWarning: The detected CUDA version (12.2) has a minor version mismatch with the version that was used to compile PyTorch (12.1). Most likely this shouldn’t be a problem.</p>
</blockquote>
</aside>
<p>What kind of issue are you seeing besides the warning?</p>

Hdi: <p>Thank you for your reply. other than the warning. Do you mean it should be fine to use “Pythorch” with cuda12.2!. on Colab GPU. I feel I got lost. As I keep getting the errors :<br>
2024-01-10 19:40:50.450395: E external/local_xla/xla/stream_executor/cuda/cuda_dnn.cc:9261] Unable to register cuDNN factory: Attempting to register factory for plugin cuDNN when one has already been registered<br>
2024-01-10 19:40:50.450456: E external/local_xla/xla/stream_executor/cuda/cuda_fft.cc:607] Unable to register cuFFT factory: Attempting to register factory for plugin cuFFT when one has already been registered<br>
2024-01-10 19:40:50.452587: E external/local_xla/xla/stream_executor/cuda/cuda_blas.cc:1515] Unable to register cuBLAS factory: Attempting to register factory for plugin cuBLAS when one has already been registered<br>
2024-01-10 19:40:52.010412: W tensorflow/compiler/tf2tensorrt/utils/py_utils.cc:38] TF-TRT Warning: Could not find TensorRT</p>

ptrblck: <p>Yes, your locally installed CUDA 12.2 toolkit should not interfere with the PyTorch binary shipping with CUDA 12.1U1. The other warnings you are seeing are raised by TensorFlow and I’m not familiar with these.</p>