Build getting failed

I am getting error related to onnx while building which is causing it to fail.

The command which I have executed is 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 develop

The error which I am getting is:

../caffe2/opt/ error: ‘onnxTensorDescriptorV1 {aka struct onnxTensorDescriptorV1}’ has no member named ‘isOffline’
   to->isOffline = from->isOffline;
../caffe2/opt/ In function ‘void caffe2::{anonymous}::BlobToTensorDescriptor(const string&, caffe2::Workspace*, onnxTensorDescriptorV1*, std::vector<std::vector<long unsigned int, std::allocator<long unsigned int> > >*, std::vector<std::vector<float> >*, std::vector<std::vector<int> >*)’:
../caffe2/opt/ error: ‘onnxTensorDescriptorV1 {aka struct onnxTensorDescriptorV1}’ has no member named ‘isOffline’
   desc->isOffline = false;

However, I haven’t made any change to it.

Could you clean your build via python clean, update all submodules again

git submodule sync
git submodule update --init --recursive

And try to rebuild?

Please let me know, if that helps or if you get the same error again.

@ptrblck, should I do it in current branch or master branch?

I have tried in my current work branch but still getting the same error.

Thank you

If you have just formed from master, it shouldn’t matter.
However, just to make sure your branch didn’t mess with the setup, could you try to build from current master?

Hi @ptrblck, while running python clean in master branch,
I am gettting the following error:

Building wheel torch-1.4.0a0+3657df3
Traceback (most recent call last):
  File "", line 759, in <module>
    extensions, cmdclass, packages, entry_points = configure_extension_build()
  File "", line 640, in configure_extension_build
  File "/usr/lib/python3.6/", line 156, in dirname
    p = os.fspath(p)
TypeError: expected str, bytes or os.PathLike object, not bool

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.

To build from source you would have to call python install.
Could you run python clean and then try to rebuild?

Hi @ptrblck, Sorry for my mistake. I missed clean in python I have edited my comment. Please have a look.

Clean shouldn’t produce the output Building wheel ....

Could you clone the repository again, use a new and clean conda environment, and follow these instructions?

I am having the exact same issue. Was this ever solved ?

In pytorch/cmake/public/cuda.cmake there is the following block (lines 196-198) which sets $CUDA_CUDA_LIB

find_library(CUDA_CUDA_LIB cuda
    PATH_SUFFIXES lib lib64 lib/stubs lib64/stubs lib/x64)

Thus it is likely, that $CUDA_TOOLKIT_ROOT_DIR was not available, which could be fixed:

export CUDA_TOOLKIT_ROOT_DIR=/usr/local/cuda