添加链接
link管理
链接快照平台
  • 输入网页链接,自动生成快照
  • 标签化管理网页链接

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 setup.py develop

The error which I am getting is:

../caffe2/opt/onnxifi_op.cc:95:7: error: ‘onnxTensorDescriptorV1 {aka struct onnxTensorDescriptorV1}’ has no member named ‘isOffline’
   to->isOffline = from->isOffline;
       ^~~~~~~~~
../caffe2/opt/onnxifi_op.cc: 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/onnxifi_op.cc:134:9: 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 setup.py 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

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

Building wheel torch-1.4.0a0+3657df3
Traceback (most recent call last):
  File "setup.py", line 759, in <module>
    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

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.

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
    PATHS ${CUDA_TOOLKIT_ROOT_DIR}
    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