CUDA error: no kernel image is available for execution on the device?

username: Bree_Yogurt
cooked: <p>Hi All</p>
<p>! I’m a new learner of Pytorch, today I try the example of tutorial, the CUDA error happens.<br>
<div class="lightbox-wrapper"><a class="lightbox" href="https://discuss.pytorch.org/uploads/default/original/3X/9/d/9d7918600765986f60144a0f1c6aade5e152b19e.png" data-download-href="https://discuss.pytorch.org/uploads/default/9d7918600765986f60144a0f1c6aade5e152b19e" title="56dcb9df8a75-composite"><img src="https://discuss.pytorch.org/uploads/default/original/3X/9/d/9d7918600765986f60144a0f1c6aade5e152b19e.png" alt="56dcb9df8a75-composite" data-base62-sha1="mt4piYBc1U6I0iC0PKDxwiGZREy" width="562" height="500" data-dominant-color="DBDADA"><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">56dcb9df8a75-composite</span><span class="informations">1146×1018 16 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>It seems that the opreation move tensor from cpu to GPU is not allowed. Does pytroch not support GT 710? But as shown in the figure, the flag of GPU available is Ture. I am confusing…</p>
<p><strong>The configurations:</strong></p>
<p>Windows 10 64bit,<br>
Anaconda3,<br>
Python 3.7.5,<br>
pytorch 1.3.1 ( py3.7_cuda101_cudnn7_0 )<br>
torchvision 0.4.2 ( py37_cu101 )</p>
<p>And the status of GPU is shown in the pic.</p>
<p>What is the error comes from? Should I adjust somethere to let it work or just need to change an advanced GPU?</p>
<p>Thanks all !</p>
<p>Bree</p>

username: ptrblck
cooked: <p>The <code>1.3.1</code> binaries support GPUs with compute capability &gt;= 3.7, while your GPU seems to have 3.5.<br>
You could build from source as described <a href="https://github.com/pytorch/pytorch#from-source">here</a>.</p>

username: Bree_Yogurt
cooked: <p>Thanks for your reply!</p>
<p>I follow the instructions to build from source, and when “python setup.py install” meet cmake error as shown in the figure:</p>
<p><div class="lightbox-wrapper"><a class="lightbox" href="https://discuss.pytorch.org/uploads/default/original/3X/c/0/c0abae86ba0840b673f1ec45c489fd31eafb98e5.png" data-download-href="https://discuss.pytorch.org/uploads/default/c0abae86ba0840b673f1ec45c489fd31eafb98e5" title="cmakeerror"><img src="https://discuss.pytorch.org/uploads/default/original/3X/c/0/c0abae86ba0840b673f1ec45c489fd31eafb98e5.png" alt="cmakeerror" data-base62-sha1="rurv2WgtvV4UwXfsdTVrcFpH697" width="602" height="500" data-dominant-color="4D6588"><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">cmakeerror</span><span class="informations">1897×1575 44.9 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>It seems that the C++ compiler cannot to compile a sample  test program. But I installed Visual Studio 2019, the compiler should be the latest,  why is the error happend?  The conda list is also shown at the end of the fig. How to fix this error?</p>
<p>Thank you.</p>

username: peterjc123
cooked: <p>You may need to update cmake to a newer version. Please also remember to do <code>python setup.py install --cmake</code> next time if you build again.</p>

username: Bree_Yogurt
cooked: <p>Thanks for your reply!</p>
<p>I follow the instructions to build from source, and when “python setup.py install” meet cmake error as shown in the figure:</p>
<p><div class="lightbox-wrapper"><a class="lightbox" href="https://discuss.pytorch.org/uploads/default/original/3X/c/0/c0abae86ba0840b673f1ec45c489fd31eafb98e5.png" data-download-href="https://discuss.pytorch.org/uploads/default/c0abae86ba0840b673f1ec45c489fd31eafb98e5" title="cmakeerror"><img src="https://discuss.pytorch.org/uploads/default/original/3X/c/0/c0abae86ba0840b673f1ec45c489fd31eafb98e5.png" alt="cmakeerror" data-base62-sha1="rurv2WgtvV4UwXfsdTVrcFpH697" width="602" height="500" data-dominant-color="4D6588"><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">cmakeerror</span><span class="informations">1897×1575 44.9 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>It seems that the C++ compiler cannot to compile a sample  test program. But I installed Visual Studio 2019, the compiler should be the latest,  why is the error happend?  The conda list is also shown at the end of the fig. How to fix this error?</p>
<p>Thank you.</p>

username: Bree_Yogurt
cooked: <p>Thank you my friend.</p>
<p>I have conda update cmake to the lastest, but it still got the wrong answer.</p>

username: peterjc123
cooked: <p><a href="https://cmake.org/download/" rel="nofollow noopener">https://cmake.org/download/</a> The latest version should be 3.16.1. It is also available in the conda-forge channel. <a href="https://anaconda.org/conda-forge/cmake" rel="nofollow noopener">https://anaconda.org/conda-forge/cmake</a></p>

username: Bree_Yogurt
cooked: <p>Sorry I forgot to upload the screenshot after I followed your first advice. But I do update cmake to version 3.16.1, and it does not work…</p>

username: peterjc123
cooked: <p>What about doing the following?</p>
<pre><code class="lang-auto">set USE_NINJA=OFF
python setup.py install --cmake
</code></pre>