Vision: Error building C++ backend

Created on 10 Mar 2020  Â·  11Comments  Â·  Source: pytorch/vision

Trying version 0.5.0 (but same with 0.4.2), first I get:

/usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/include/g++-v9/x86_64-pc-linux-gnu/bits/c++config.h:273:27: error: #if with no expression
  273 | #if _GLIBCXX_USE_CXX11_ABI
      |                           ^

if I fix it by manually changing makefile and replacing -D_GLIBCXX_USE_CXX11_ABI= with _GLIBCXX_USE_CXX11_ABI=1 I get another errors:

/usr/include/ATen/core/dispatch/Dispatcher.h:211:80: error: redeclaration of ‘at::Tensor& args#0’
  211 |     return kernel.template callUnboxedOnly<Return, Args...>(std::forward<Args>(args)...);
      |                                 
c++ frontend needs reproduction build

All 11 comments

Hi,

What's your current setup? It looks like you are using gcc 9.2.0?

Also, this seems to be an issue in PyTorch compilation with your setup, so I think you might have more chance getting some help if you create an issue there

cc @smessmer just in case you happen to know what's happening

yes, gcc 9.2.0, pytorch itself 1.4.0 compiles fine.

Thanks for the information. I'll see if someone with more experience with the dispatcher knows what is going on

@fmassa was trying different pytorch build and then I get: no member named 'bias' in 'torch::nn::ConvOptions

@cnd you probably hit an incompatibility of versions, as https://github.com/pytorch/vision/pull/1576 replaced with_bias by bias

@fmassa it looks strange, I'm on 1.4 version of PyTorch and trying 0.5.0 vision, what versions I need to have compatibility?

@cnd PyTorch 1.4 is compatible with torchvision 0.5.0, except if I missed something for the C++ API during the release.

@cnd I was able to build one from Pytroch 1.4. You might be linking the old ones.
Check libtorch in /usr.

@cnd did you have a chance to try @jinuhwang comment?

Hello, I have it there from 1.4

 * Searching for /usr/lib64/libtorch.so ... 
sci-libs/pytorch-1.4.0_p0 (/usr/lib64/libtorch.so)

(tho not fully sure what's p0)

Was this page helpful?
0 / 5 - 0 ratings

Related issues

xuanqing94 picture xuanqing94  Â·  3Comments

Wadaboa picture Wadaboa  Â·  3Comments

bodokaiser picture bodokaiser  Â·  3Comments

ibtingzon picture ibtingzon  Â·  3Comments

a-maci picture a-maci  Â·  3Comments