Hello, I’m trying to run some model importing tutorials with a manually built nnvm/tvm and an mxnet from nixos packages (version 1.1.0). I’m experiencing the following error when running python -c "import nnvm; import mxnet"
terminate called after throwing an instance of 'dmlc::Error'
what(): [16:03:34] /build/incubator-mxnet/dmlc-core/include/dmlc/././any.h:289: Check failed: type_->ptype_info == &typeid(T) The stored type mismatch stored=N4nnvm5OpMapISt8functionIFbRKNS_9NodeAttrsEPSt6vectorINS_6TShapeESaIS6_EES9_EEEE requested=N4nnvm5OpMapISt8functionIFbRKNS_9NodeAttrsEPSt6vectorINS_6TShapeESaIS6_EES9_EEEE
Stack trace returned 10 entries:
[bt] (0) /home/grechanik/proj/nixtvm/tvm/build-native/libtvm.so(dmlc::StackTrace[abi:cxx11]()+0x53) [0x7fd3e4a0dce3]
[bt] (1) /home/grechanik/proj/nixtvm/tvm/build-native/libtvm.so(dmlc::LogMessageFatal::~LogMessageFatal()+0x39) [0x7fd3e4a0e6e9]
[bt] (2) /nix/store/dgdi1apfv3vdx9dw5jmc38yn6xcjn5li-python3.6-mxnet-1.1.0/lib/python3.6/site-packages/mxnet/libmxnet.so(nnvm::Op& nnvm::Op::set_attr<std::function<bool (nnvm::NodeAttrs const&, std::vector<nnvm::TShape, std::allocator<nnvm::TShape> >*, std::vector<nnvm::TShape, std::allocator<nnvm::TShape> >*)> >(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::function<bool (nnvm::NodeAttrs const&, std::vector<nnvm::TShape, std::allocator<nnvm::TShape> >*, std::vector<nnvm::TShape, std::allocator<nnvm::TShape> >*)> const&, int)::{lambda(dmlc::any*)#1}::operator()(dmlc::any*) const+0x137) [0x7fd3deabd277]
[bt] (3) /nix/store/dgdi1apfv3vdx9dw5jmc38yn6xcjn5li-python3.6-mxnet-1.1.0/lib/python3.6/site-packages/mxnet/libmxnet.so(nnvm::Op::UpdateAttrMap(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::function<void (dmlc::any*)>)+0xc8) [0x7fd3df3ea8a8]
[bt] (4) /nix/store/dgdi1apfv3vdx9dw5jmc38yn6xcjn5li-python3.6-mxnet-1.1.0/lib/python3.6/site-packages/mxnet/libmxnet.so(nnvm::Op& nnvm::Op::set_attr<std::function<bool (nnvm::NodeAttrs const&, std::vector<nnvm::TShape, std::allocator<nnvm::TShape> >*, std::vector<nnvm::TShape, std::allocator<nnvm::TShape> >*)> >(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::function<bool (nnvm::NodeAttrs const&, std::vector<nnvm::TShape, std::allocator<nnvm::TShape> >*, std::vector<nnvm::TShape, std::allocator<nnvm::TShape> >*)> const&, int)+0x140) [0x7fd3deab88f0]
[bt] (5) /nix/store/dgdi1apfv3vdx9dw5jmc38yn6xcjn5li-python3.6-mxnet-1.1.0/lib/python3.6/site-packages/mxnet/libmxnet.so(+0x1d07aa) [0x7fd3dea1c7aa]
[bt] (6) /nix/store/2kcrj1ksd2a14bm5sky182fv2xwfhfap-glibc-2.26-131/lib/ld-linux-x86-64.so.2(+0xf3fa) [0x7fd4054573fa]
[bt] (7) /nix/store/2kcrj1ksd2a14bm5sky182fv2xwfhfap-glibc-2.26-131/lib/ld-linux-x86-64.so.2(+0xf50b) [0x7fd40545750b]
[bt] (8) /nix/store/2kcrj1ksd2a14bm5sky182fv2xwfhfap-glibc-2.26-131/lib/ld-linux-x86-64.so.2(+0x13a60) [0x7fd40545ba60]
[bt] (9) /nix/store/2kcrj1ksd2a14bm5sky182fv2xwfhfap-glibc-2.26-131/lib/libc.so.6(_dl_catch_error+0x71) [0x7fd403cb7c31]
Importing mxnet before nnvm doesn’t cause the error, however.
Seems like mxnet internally uses its own copy of nnvm which might conflict with the external one (which may or may not be due to the difference in their versions).