Build getting failed

username: PyExtreme
cooked: <p>I am getting error related to onnx while building which is causing it to fail.</p>
<p>The command which I have executed is<code> MAX_JOBS=8 DEBUG=1 USE_DISTRIBUTED=0 USE_MKLDNN=0 USE_CUDA=0 BUILD_TEST=1 USE_FBGEMM=0 USE_NNPACK=0 USE_QNNPACK=0 python setup.py develop</code></p>
<p>The error which I am getting is:</p>
<pre><code class="lang-auto">../caffe2/opt/onnxifi_op.cc:95:7: error: ‘onnxTensorDescriptorV1 {aka struct onnxTensorDescriptorV1}’ has no member named ‘isOffline’
   to-&gt;isOffline = from-&gt;isOffline;
       ^~~~~~~~~
../caffe2/opt/onnxifi_op.cc: In function ‘void caffe2::{anonymous}::BlobToTensorDescriptor(const string&amp;, caffe2::Workspace*, onnxTensorDescriptorV1*, std::vector&lt;std::vector&lt;long unsigned int, std::allocator&lt;long unsigned int&gt; &gt; &gt;*, std::vector&lt;std::vector&lt;float&gt; &gt;*, std::vector&lt;std::vector&lt;int&gt; &gt;*)’:
../caffe2/opt/onnxifi_op.cc:134:9: error: ‘onnxTensorDescriptorV1 {aka struct onnxTensorDescriptorV1}’ has no member named ‘isOffline’
   desc-&gt;isOffline = false;
</code></pre>
<p>However, I haven’t made any change to it.</p>

username: ptrblck
cooked: <p>Could you clean your build via <code>python setup.py clean</code>, update all submodules again</p>
<pre><code class="lang-auto">git submodule sync
git submodule update --init --recursive
</code></pre>
<p>And try to rebuild?</p>
<p>Please let me know, if that helps or if you get the same error again.</p>

username: PyExtreme
cooked: <p><a class="mention" href="/u/ptrblck">@ptrblck</a>, should I do it in current branch or master branch?</p>
<p>I have tried in my current work branch but still getting the same error.</p>
<p>Thank you</p>

username: ptrblck
cooked: <p>If you have just formed from master, it shouldn’t matter.<br>
However, just to make sure your branch didn’t mess with the setup, could you try to build from current master?</p>

username: PyExtreme
cooked: <p>Hi <a class="mention" href="/u/ptrblck">@ptrblck</a>,  while running <code>python setup.py clean</code> in <strong>master</strong> branch,<br>
I am gettting the following error:</p>
<pre><code class="lang-auto">Building wheel torch-1.4.0a0+3657df3
Traceback (most recent call last):
  File "setup.py", line 759, in &lt;module&gt;
    extensions, cmdclass, packages, entry_points = configure_extension_build()
  File "setup.py", line 640, in configure_extension_build
    os.path.dirname(cmake_cache_vars['CUDA_CUDA_LIB']))
  File "/usr/lib/python3.6/posixpath.py", line 156, in dirname
    p = os.fspath(p)
TypeError: expected str, bytes or os.PathLike object, not bool
</code></pre>
<p>Not sure if I have to clone the repo and again and rebuild it. Would be great if you could please provide solution for it.</p>

username: ptrblck
cooked: <p>To build from source you would have to call <code>python setup.py install</code>.<br>
Could you run <code>python setup.py clean</code> and then try to rebuild?</p>

username: PyExtreme
cooked: <p>Hi <a class="mention" href="/u/ptrblck">@ptrblck</a>, Sorry for my mistake. I missed <strong>clean</strong> in <strong>python setup.py</strong>. I have edited my comment. Please have a look.</p>

username: ptrblck
cooked: <p>Clean shouldn’t produce the output <code>Building wheel ...</code>.</p>
<p>Could you clone the repository again, use a new and clean conda environment, and follow <a href="https://github.com/pytorch/pytorch/blob/master/README.md#from-source" rel="nofollow noopener">these instructions</a>?</p>

username: Aditya_Ranganath
cooked: <p>I am having the exact same issue. Was this ever solved ?</p>

username: fshart
cooked: <p>In pytorch/cmake/public/cuda.cmake there is the following block (lines 196-198) which sets $CUDA_CUDA_LIB</p>
<pre><code class="lang-auto">find_library(CUDA_CUDA_LIB cuda
    PATHS ${CUDA_TOOLKIT_ROOT_DIR}
    PATH_SUFFIXES lib lib64 lib/stubs lib64/stubs lib/x64)
</code></pre>
<p>Thus it is likely, that $CUDA_TOOLKIT_ROOT_DIR was not available, which could be fixed:</p>
<pre><code class="lang-auto">export CUDA_TOOLKIT_ROOT_DIR=/usr/local/cuda
</code></pre>