Terminate called after throwing an instance of 'dmlc::Error'

I run the code like insightface with mxnet ,and I have met this problem:
terminate called after throwing an instance of ‘dmlc::Error’
what(): [16:27:37] /home/jnet/tvm/nnvm/include/nnvm/op.h:473: Check failed: pmap->type() == typeid(OpMap): Attribute FInferShape of operator resize is registered as inconsistent types previously N4nnvm5OpMapISt8functionIFbRKNS_9NodeAttrsEPSt6vectorIN5mxnet6TShapeESaIS7_EESA_EEEE current N4nnvm5OpMapISt8functionIFbRKNS_9NodeAttrsEPSt6vectorINS_6TShapeESaIS6_EES9_EEEE
Stack trace:
[bt] (0) /home/jnet/.local/lib/python3.6/site-packages/tvm-0.6.dev0-py3.6-linux-aarch64.egg/tvm/libtvm.so(dmlc::LogMessageFatal::~LogMessageFatal()+0x4c) [0x7f38e1f3a4]
[bt] (1) /home/jnet/.local/lib/python3.6/site-packages/nnvm-0.8.0-py3.6.egg/nnvm/libnnvm_compiler.so(nnvm::Op::set_attr<std::function<bool (nnvm::NodeAttrs const&, std::vector<nnvm::TShape, std::allocator<nnvm::TSha pe> >, std::vector<nnvm::TShape, std::allocator<nnvm::T Shape> >)> >(std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&, std::function<bool (nnvm::NodeAttrs const&, std::vector<nnvm:: TShape, std::allocator<nnvm::T Shape> >, std::vector<nnvm:: TShape, std::allocator<nnvm:: TShape> >)> const&, int)::{lambda(dmlc::any*)#1}::operator()(dmlc::any*) const+0x164) [0x7f40861d9c]
[bt] (2) /home/jnet/.local/lib/python3.6/site-packages/nnvm-0.8.0-py3.6.egg/nnvm/libnnvm_compiler.so(nnvm::Op::UpdateAttrMap(std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&, std::function<void (dmlc::any*)>)+0xe4) [0x7f407a424c]
[bt] (3) /home/jnet/.local/lib/python3.6/site-packages/nnvm-0.8.0-py3.6.egg/nnvm/libnnvm_compiler.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, std::allocator > 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)+0x148) [0x7f408587c8]
[bt] (4) /home/jnet/.local/lib/python3.6/site-packages/nnvm-0.8.0-py3.6.egg/nnvm/libnnvm_compiler.so(+0x9d880) [0x7f4075c880]
[bt] (5) /lib/ld-linux-aarch64.so.1(+0xd8e4) [0x7f99f488e4]

Aborted (core dumped)

Please help me !

I got the same error:
terminate called after throwing an instance of ‘dmlc::Error’
what(): [07:23:03] …/include/nnvm/op.h:473: Check failed: pmap->type() == typeid(OpMap): Attribute FInferShape of operator _CachedOp is registered as inconsistent types previously N4nnvm5OpMapISt8functionIFbRKNS_9NodeAttrsEPSt6vectorINS_6TShapeESaIS6_EES9_EEEE current N4nnvm5OpMapISt8functionIFbRKNS_9NodeAttrsEPSt6vectorIN5mxnet6TShapeESaIS7_EESA_EEEE
Stack trace:
[bt] (0) /home/face/env/tvm/build/libtvm.so(dmlc::LogMessageFatal::~LogMessageFatal()+0x25) [0xae3ddc9e]
[bt] (1) /usr/local/lib/python3.5/dist-packages/mxnet-1.5.0-py3.5.egg/mxnet/libmxnet.so(nnvm::Op& nnvm::Op::set_attr<std::function<bool (nnvm::NodeAttrs const&, std::vector<mxnet::TShape, std::allocatormxnet::TShape >, std::vector<mxnet::TShape, std::allocatormxnet::TShape >)> >(std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&, std::function<bool (nnvm::NodeAttrs const&, std::vector<mxnet::TShape, std::allocatormxnet::TShape >, std::vector<mxnet::TShape, std::allocatormxnet::TShape >)> const&, int)::{lambda(dmlc::any*)#1}::operator()(dmlc::any*) const+0xef) [0xaaa6be5c]
[bt] (2) /usr/local/lib/python3.5/dist-packages/mxnet-1.5.0-py3.5.egg/mxnet/libmxnet.so(nnvm::Op::UpdateAttrMap(std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&, std::function<void (dmlc::any*)>)+0x101) [0xabf0790e]
[bt] (3) /usr/local/lib/python3.5/dist-packages/mxnet-1.5.0-py3.5.egg/mxnet/libmxnet.so(nnvm::Op& nnvm::Op::set_attr<std::function<bool (nnvm::NodeAttrs const&, std::vector<mxnet::TShape, std::allocatormxnet::TShape >, std::vector<mxnet::TShape, std::allocatormxnet::TShape >)> >(std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&, std::function<bool (nnvm::NodeAttrs const&, std::vector<mxnet::TShape, std::allocatormxnet::TShape >, std::vector<mxnet::TShape, std::allocatormxnet::TShape >)> const&, int)+0xfb) [0xaaa61708]
[bt] (4) /usr/local/lib/python3.5/dist-packages/mxnet-1.5.0-py3.5.egg/mxnet/libmxnet.so(+0x5424bc) [0xaa9864bc]
[bt] (5) /lib/ld-linux-armhf.so.3(+0xb960) [0xb6f7c960]

Aborted (core dumped)

which platform you met this problem ?
Do you have any idea?

I dont know why:
root@firefly:/home/face/env/tvm/nnvm/python# python
Python 3.5.2 (default, Nov 12 2018, 13:43:14)
[GCC 5.4.0 20160609] on linux
Type “help”, “copyright”, “credits” or “license” for more information.
>>> import nnvm.compiler
>>> import mxnet as mx
terminate called after throwing an instance of ‘dmlc::Error’
what(): [07:34:14] …/include/nnvm/op.h:473: Check failed: pmap->type() == typeid(OpMap): Attribute FInferShape of operator _CachedOp is registered as inconsistent types previously N4nnvm5OpMapISt8functionIFbRKNS_9NodeAttrsEPSt6vectorINS_6TShapeESaIS6_EES9_EEEE current N4nnvm5OpMapISt8functionIFbRKNS_9NodeAttrsEPSt6vectorIN5mxnet6TShapeESaIS7_EESA_EEEE

Aborted (core dumped)
root@firefly:/home/face/env/tvm/nnvm/python# python
Python 3.5.2 (default, Nov 12 2018, 13:43:14)
[GCC 5.4.0 20160609] on linux
Type “help”, “copyright”, “credits” or “license” for more information.
>>> import mxnet as mx
>>>
root@firefly:/home/face/env/tvm/nnvm/python# python
Python 3.5.2 (default, Nov 12 2018, 13:43:14)
[GCC 5.4.0 20160609] on linux
Type “help”, “copyright”, “credits” or “license” for more information.
>>> import nnvm.compiler
>>>
root@firefly:/home/face/env/tvm/nnvm/python# cat /proc/cpuinfo
processor : 0
model name : ARMv7 Processor rev 1 (v7l)

I re-install tvm under mxnet/3rdparty/tvm,ererything is ok.
https://docs.tvm.ai/install/from_source.html#python-package-installation
it works for me.good luck!
root@firefly:~/mxnet/3rdparty/tvm# python
Python 3.5.2 (default, Nov 12 2018, 13:43:14)
[GCC 5.4.0 20160609] on linux
Type “help”, “copyright”, “credits” or “license” for more information.
>>> import mxnet
>>> import nnvm.compiler
>>> exit()
root@firefly:~/mxnet/3rdparty/tvm#

I think it is a version issue

TVM0.6 use mxnet1.4.1 is OK!

when I import tvm, got the same error.

terminate called after throwing an instance of ‘dmlc::Error’
what(): [13:28:06] /data/mmzhu/software/tvm_project/tvm/src/ir/op.cc:45: Check failed: reg != nullptr: Operator annotation.stop_fusion is not registered
Stack trace:
[bt] (0) /data/mmzhu/software/tvm_project/tvm/build/libtvm.so(dmlc::LogMessageFatal::~LogMessageFatal()+0x4d) [0x7fca2f415eed]
[bt] (1) /data/mmzhu/software/tvm_project/tvm/build/libtvm.so(tvm::Op::Get(tvm::runtime::String const&)+0x138) [0x7fca2f529348]
[bt] (2) /data/mmzhu/software/tvm_project/tvm/build/libtvm.so(+0x8c1d56) [0x7fca2f396d56]
[bt] (3) /data/mmzhu/software/tvm_project/tvm/build/libtvm.so(+0x2b6fee6) [0x7fca31644ee6]

what’s the problem? thx.


PS:package installation process:
gcc 5.5.0
LLVM 9.0.0
anaconda python 3.6.8

LLVM:

  1. download package( llvm-9.0.0.src.tar.xz 、cfe-9.0.0.src.tar.xz ) to /data/mmzhu/software/llvm_project
  2. cd /data/mmzhu/software/llvm_project
    tar -xvf llvm-9.0.0.src.tar.xz
    tar -xvf cfe-9.0.0.src.tar.xz
  3. rename cfe-9.0.0 to clang,rename llvm-9.0.0 to llvm then
    mv clang llvm/tools/
  4. mkdir build
    cd build
    cmake -DCMAKE_BUILD_TYPE=Release -DLLVM_TARGETS_TO_BUILD=“X86;ARM;AArch64” …/llvm
    make -j4

TVM:
installation process as same as offical:https://docs.tvm.ai/install/from_source.html

  1. git clone --recursive https://github.com/apache/incubator-tvm tvm
  2. cd /your/path/to/tvm/
    mkdir build
    cp cmake/config.cmake build
  3. fix config.cmake
    set(USE_LLVM /data/mmzhu/software/llvm_project/build/bin/llvm-config)
  4. cd build
    cmake …
    make -j4
  5. vim .bashrc
    export TVM_HOME=/data/mmzhu/software/tvm_project/tvm export PYTHONPATH=$TVM_HOME/python:$TVM_HOME/topi/python:${PYTHONPATH}
    source .bashrc