[NEED HELP] Solution for CUDA error -> no kernel image available for execution

luda1013: <p>Hallo all, first thanks for helping me <img src="https://discuss.pytorch.org/images/emoji/apple/slight_smile.png?v=12" title=":slight_smile:" class="emoji" alt=":slight_smile:" loading="lazy" width="20" height="20"></p>
<p>I am currently doing depth estimation project. i tried to do packnet-sfm from toyota:</p><aside class="onebox allowlistedgeneric" data-onebox-src="https://github.com/TRI-ML/packnet-sfm">
  <header class="source">
      <img src="https://github.githubassets.com/favicons/favicon.svg" class="site-icon" width="32" height="32">

      <a href="https://github.com/TRI-ML/packnet-sfm" target="_blank" rel="noopener nofollow ugc">GitHub</a>
  </header>

  <article class="onebox-body">
    <div class="aspect-image" style="--aspect-ratio:690/344;"><img src="https://opengraph.githubassets.com/030f70696b769b9fef8df09b1d85e97769131e48c1c711cc1fe40939c5ef0b71/TRI-ML/packnet-sfm" class="thumbnail" width="690" height="345"></div>

<h3><a href="https://github.com/TRI-ML/packnet-sfm" target="_blank" rel="noopener nofollow ugc">GitHub - TRI-ML/packnet-sfm: TRI-ML Monocular Depth Estimation Repository</a></h3>

  <p>TRI-ML Monocular Depth Estimation Repository. Contribute to TRI-ML/packnet-sfm development by creating an account on GitHub.</p>


  </article>

  <div class="onebox-metadata">
    
    
  </div>

  <div style="clear: both"></div>
</aside>

<p>i made docker using their file and tried also to install the packages inside my virtual environment, But as i wanna try their scripts, i got following error:<br>
-using docker:<br>
RuntimeError: CUDA error: no kernel image is available for execution on the device</p>
<p>-using virtual environment:<br>
RuntimeError: CUDA error: no kernel image is available for execution on the device<br>
CUDA kernel errors might be asynchronously reported at some other API call,so the stacktrace below might be incorrect.<br>
For debugging consider passing CUDA_LAUNCH_BLOCKING=1.</p>
<p>so here is my system:<br>
Collecting environment information…<br>
PyTorch version: 1.12.0.dev20220316+cu102<br>
Is debug build: False<br>
CUDA used to build PyTorch: 10.2<br>
ROCM used to build PyTorch: N/A</p>
<p>OS: Ubuntu 20.04.4 LTS (x86_64)<br>
GCC version: (Ubuntu 7.5.0-6ubuntu2) 7.5.0<br>
Clang version: Could not collect<br>
CMake version: version 3.16.3<br>
Libc version: glibc-2.31</p>
<p>Python version: 3.8.10 (default, Nov 26 2021, 20:14:08)  [GCC 9.3.0] (64-bit runtime)<br>
Python platform: Linux-5.13.0-35-generic-x86_64-with-glibc2.29<br>
Is CUDA available: True<br>
CUDA runtime version: 10.2.89<br>
GPU models and configuration: GPU 0: NVIDIA GeForce RTX 3050<br>
Nvidia driver version: 510.54<br>
cuDNN version: Could not collect<br>
HIP runtime version: N/A<br>
MIOpen runtime version: N/A<br>
Is XNNPACK available: True</p>
<p>Versions of relevant libraries:<br>
[pip3] numpy==1.22.3<br>
[pip3] pytorch-lightning==1.3.8<br>
[pip3] torch==1.12.0.dev20220316+cu102<br>
[pip3] torchmetrics==0.7.2<br>
[pip3] torchvision==0.13.0.dev20220316+cu102<br>
[conda] Could not collect</p>
<p>Question:<br>
i tried this in python:</p>
<blockquote>
<blockquote>
<blockquote>
<p>torch.cuda.get_arch_list()<br>
[‘sm_37’, ‘sm_50’, ‘sm_60’, ‘sm_70’]</p>
</blockquote>
</blockquote>
</blockquote>
<p>i have Cuda 10.2 now running with RTX 3050 (compute capabilty 8,6).<br>
i have read that 10.2 doesnt support the compute capabilty 8.6.<br>
What should i do?<br>
Should i try to upgrade cuda to 11.**, if yes, which version of 11 i need to install?<br>
Are there also any solutions without upgrading the cuda 10.2? because the development team in the github/ in docker file, they used cuda 10.2.</p>
<p>Thank you all for the answers!</p>

ptrblck: <aside class="quote no-group" data-username="luda1013" data-post="1" data-topic="146634">
<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/l/edb3f5/48.png" class="avatar"> luda1013:</div>
<blockquote>
<p>Should i try to upgrade cuda to 11.**, if yes, which version of 11 i need to install?</p>
</blockquote>
</aside>
<p>Yes, you would need to update PyTorch with a CUDA 11 runtime.<br>
I would generally recommend to use the latest release, i.e. if you are installing the pip wheels or conda binaries, use 11.5.</p>
<aside class="quote no-group" data-username="luda1013" data-post="1" data-topic="146634">
<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/l/edb3f5/48.png" class="avatar"> luda1013:</div>
<blockquote>
<p>Are there also any solutions without upgrading the cuda 10.2? because the development team in the github/ in docker file, they used cuda 10.2.</p>
</blockquote>
</aside>
<p>No, you need to update to the binaries with CUDA 11, as the previous ones don’t ship with the needed compute capability.</p>

luda1013: <p>Hi Ptrblck!</p>
<p>thanks for ur quick response XD</p>
<p>okay, i will try to upgrade the cuda and tel u guys later if i succedd or not… lol</p>

luda1013: <aside class="quote no-group" data-username="luda1013" data-post="1" data-topic="146634">
<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/l/edb3f5/48.png" class="avatar"> luda1013:</div>
<blockquote>
<p>torch.cuda.get_arch_list()<br>
[‘sm_37’, ‘sm_50’, ‘sm_60’, ‘sm_70’]</p>
</blockquote>
</aside>
<p><div class="lightbox-wrapper"><a class="lightbox" href="https://discuss.pytorch.org/uploads/default/original/3X/4/d/4d95100f4fb804b9ec02d236eeb4e5811df7acc4.png" data-download-href="https://discuss.pytorch.org/uploads/default/4d95100f4fb804b9ec02d236eeb4e5811df7acc4" title="image"><img src="https://discuss.pytorch.org/uploads/default/original/3X/4/d/4d95100f4fb804b9ec02d236eeb4e5811df7acc4.png" alt="image" data-base62-sha1="b4k86fzJHeyRiYdBAfBmaGsB8MI" width="690" height="278" data-dominant-color="F5DEDB"><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">image</span><span class="informations">859×347 20.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>
<p>mm i think i wanna try first with 11.3 because in the pytorc_installation only for 11.3 or 10.2</p>