Installation from source stuck

dembouz: <p>I’ve installed pytorch 1.12.1 using the following command:<br>
<strong>pip3 install torch torchvision torchaudio --extra-index-url <a href="https://download.pytorch.org/whl/cu116" rel="noopener nofollow ugc">https://download.pytorch.org/whl/cu116</a></strong></p>
<p>This is what I got installed:</p>
<p><strong>torch                       1.12.1+cu116</strong><br>
<strong>torchaudio              0.12.1+cu116</strong><br>
<strong>torchvision              0.13.1+cu116</strong></p>
<p>Now I’m checking to see if torch is able to find my GPU:</p>
<pre><code class="lang-auto">Python 3.10.4 (main, Jun 29 2022, 12:14:53) [GCC 11.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
&gt;&gt;&gt; import torch
&gt;&gt;&gt; torch.cuda.is_available()
True
&gt;&gt;&gt; torch.cuda.current_device()
/home/alex/invoicenet/lib/python3.10/site-packages/torch/cuda/__init__.py:123: UserWarning: 
    Found GPU0 NVIDIA GeForce 920M which is of cuda capability 3.5.
    PyTorch no longer supports this GPU because it is too old.
    The minimum cuda capability supported by this library is 3.7.
    
  warnings.warn(old_gpu_warn % (d, name, major, minor, min_arch // 10, min_arch % 10))
0

</code></pre>
<p>Correct me if I’m wrong, but from what I have read now I can only either upgrade my hardware or install pytorch from source.</p>
<p>So I tried to install pytorch from source following step by step the guide posted <a href="https://github.com/pytorch/pytorch#from-source" rel="noopener nofollow ugc">here</a>.</p>
<p>Unfortunately is not working for me.  Installation gets stuck showing this error:</p>
<pre><code class="lang-auto">In file included from /home/alex/pytorch/c10/util/ConstexprCrc.h:3,
                 from /home/alex/pytorch/c10/test/util/ConstexprCrc_test.cpp:1:
/home/alex/pytorch/c10/util/IdWrapper.h:42:10: error: ‘size_t’ does not name a type
   42 |   friend size_t hash_value(const concrete_type&amp; v) {
      |          ^~~~~~
/home/alex/pytorch/c10/util/IdWrapper.h:5:1: note: ‘size_t’ is defined in header ‘&lt;cstddef&gt;’; did you forget to ‘#include &lt;cstddef&gt;’?
    4 | #include &lt;functional&gt;
  +++ |+#include &lt;cstddef&gt;
    5 | #include &lt;utility&gt;
/home/alex/pytorch/c10/util/ConstexprCrc.h: In member function ‘std::size_t std::hash&lt;c10::util::crc64_t&gt;::operator()(c10::util::crc64_t) const’:
/home/alex/pytorch/c10/util/IdWrapper.h:74:14: error: ‘hash_value’ was not declared in this scope
   74 |       return hash_value(x);                      \
      |              ^~~~~~~~~~
/home/alex/pytorch/c10/util/ConstexprCrc.h:131:1: note: in expansion of macro ‘C10_DEFINE_HASH_FOR_IDWRAPPER’
  131 | C10_DEFINE_HASH_FOR_IDWRAPPER(c10::util::crc64_t);
      | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[4749/6823] Building CXX object c10/te....dir/util/DeadlockDetection_test.cpp.o
</code></pre>
<p>Is there a way to fix this or any other workaround so I can use my GPU to train my models without upgrading my hardware?</p>
<p>Im using ubuntu 22. This is my <strong>nvidia-smi</strong> output in case it helps:</p>
<pre><code class="lang-auto">Thu Aug 25 11:11:59 2022       
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 470.141.03   Driver Version: 470.141.03   CUDA Version: 11.4     |
|-------------------------------+----------------------+----------------------+
| GPU  Name        Persistence-M| Bus-Id        Disp.A | Volatile Uncorr. ECC |
| Fan  Temp  Perf  Pwr:Usage/Cap|         Memory-Usage | GPU-Util  Compute M. |
|                               |                      |               MIG M. |
|===============================+======================+======================|
|   0  NVIDIA GeForce ...  Off  | 00000000:01:00.0 N/A |                  N/A |
| N/A   38C    P8    N/A /  N/A |      4MiB /  2004MiB |     N/A      Default |
|                               |                      |                  N/A |
+-------------------------------+----------------------+----------------------+
                                                                               
+-----------------------------------------------------------------------------+
| Processes:                                                                  |
|  GPU   GI   CI        PID   Type   Process name                  GPU Memory |
|        ID   ID                                                   Usage      |
|=============================================================================|
|  No running processes found                                                 |
+-----------------------------------------------------------------------------+
</code></pre>

ptrblck: <p>Is this the first error you are seeing?</p>
<pre><code class="lang-auto">/home/alex/pytorch/c10/util/IdWrapper.h:42:10: error: ‘size_t’ does not name a type
</code></pre>
<p>or were other errors raised before this issue?<br>
I haven’t seen this error before and it usually would point to a missing <code>#include</code> which is strange as a current source build works fine in my environment.</p>

dembouz: <p>Hi, I started the process from scratch and just seen I also get a previous error during the clonning phase (git clone --recursive <a href="https://github.com/pytorch/pytorch" rel="noopener nofollow ugc">https://github.com/pytorch/pytorch</a>).</p>
<p>The clonning ends with the following error:<br>
<strong>fatal: Failed to request submodule path ‘third_party/tensorpipe’</strong></p>