Skip to content
This repository was archived by the owner on Nov 17, 2023. It is now read-only.
This repository was archived by the owner on Nov 17, 2023. It is now read-only.

USE_TVM_OP=1 build broken with DMLC_LOG_FATAL_THROW=0 #17875

Closed

Description

@leezu

Description

Setting -DDMLC_LOG_FATAL_THROW=0 is useful for debugging with gdb or lldb. Unfortunately we can't compile MXNet with USE_TVM_OP=1 in that case.

Error Message

[658/658] Linking CXX shared library libmxnet.so
FAILED: libmxnet.so
: && /usr/bin/c++ -fPIC -Wall -Wno-sign-compare -O3 -std=c++11 -fopenmp   -shared -Wl,-soname,libmxnet.so -o libmxnet.so CMakeFiles/mxnet.dir/dummy.c.o -L/home/ubuntu/src/mxnet-master/build/3rdparty/tvm -Wl,-rpath,/usr/local/lib:/home/ubuntu/src/mxnet-master/build/3rdparty/tvm:  -Wl,--whole-archive  libmxnet.a  -Wl,--no-whole-archive  libmxnet.a  3rdparty/dmlc-core/libdmlc.a  -ldl  3rdparty/mkldnn/src/libdnnl.a  -lpthread  -Wl,--start-group  /opt/intel/mkl/lib/intel64/libmkl_intel_lp64.a  /opt/intel/mkl/lib/intel64/libmkl_intel_thread.a  /opt/intel/mkl/lib/intel64/libmkl_core.a  /usr/local/lib/libiomp5.so  -Wl,--end-group  /usr/lib/x86_64-linux-gnu/librt.so  /usr/lib/x86_64-linux-gnu/libopencv_highgui.so.3.2.0  /usr/lib/x86_64-linux-gnu/libopencv_imgcodecs.so.3.2.0  /usr/lib/x86_64-linux-gnu/libopencv_imgproc.so.3.2.0  /usr/lib/x86_64-linux-gnu/libopencv_core.so.3.2.0  -llapack  -ltvm_runtime  /usr/lib/gcc/x86_64-linux-gnu/7/libgomp.so  -lpthread  -lrt && cd /home/ubuntu/src/mxnet-master/build && /home/ubuntu/.pyenv/versions/3.8.2-debug/lib/python3.8/site-packages/cmake/data/bin/cmake -E copy /home/ubuntu/src/mxnet-master/build/3rdparty/mkldnn/include/dnnl_config.h /home/ubuntu/src/mxnet-master/include/mkldnn/ && /home/ubuntu/.pyenv/versions/3.8.2-debug/lib/python3.8/site-packages/cmake/data/bin/cmake -E copy /home/ubuntu/src/mxnet-master/build/3rdparty/mkldnn/include/dnnl_version.h /home/ubuntu/src/mxnet-master/include/mkldnn/ && cd /home/ubuntu/src/mxnet-master/build && /home/ubuntu/.pyenv/versions/3.8.2-debug/lib/python3.8/site-packages/cmake/data/bin/cmake -E env PYTHONPATH="/home/ubuntu/src/mxnet-master/3rdparty/tvm/python:/home/ubuntu/src/mxnet-master/3rdparty/tvm/topi/python:/home/ubuntu/src/mxnet-master/contrib" LD_LIBRARY_PATH=/home/ubuntu/src/mxnet-master/build:/home/ubuntu/src/mxnet-master/build/3rdparty/tvm:/usr/local/cuda/lib64:/usr/local/lib:/usr/lib:/usr/local/cuda/extras/CUPTI/lib64:/usr/local/mpi/lib:/home/ubuntu/local/lib:/home/ubuntu/local/lib:/usr/local/cuda/lib64:/usr/local/lib:/usr/lib:/usr/local/cuda/extras/CUPTI/lib64:/usr/local/mpi/lib:/home/ubuntu/local/lib /home/ubuntu/.pyenv/versions/3.8.2-debug/bin/python3.8 /home/ubuntu/src/mxnet-master/contrib/tvmop/compile.py -o/home/ubuntu/src/mxnet-master/build --config /home/ubuntu/src/mxnet-master/build/tvmop.conf -L /home/ubuntu/src/mxnet-master/build/3rdparty/tvm
[19:56:21] ../3rdparty/tvm/src/node/reflection.cc:113: AttributeError: Variable object has no attributed shape

Child aborted
ninja: build stopped: subcommand failed.

To Reproduce

Steps to reproduce

  1. Apply patch below
  2. Compile with cmake -GNinja -DUSE_CUDA=0 -DUSE_TVM_OP=ON ..; ninja
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 365da2d90..b4c9d267b 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -151,7 +151,7 @@ endif()
 add_definitions(-DDMLC_MODERN_THREAD_LOCAL=0)
 # disable stack trace in exception by default.
 add_definitions(-DDMLC_LOG_STACK_TRACE_SIZE=0)
-add_definitions(-DDMLC_LOG_FATAL_THROW=1)
+add_definitions(-DDMLC_LOG_FATAL_THROW=0)

 if(MSVC)
   add_definitions(-DWIN32_LEAN_AND_MEAN)

Activity

  1. added
    TVM OP
    on Mar 19, 2020
  2. leezu commented on Mar 20, 2020

    @leezu
    ContributorAuthor

    This failure is from tvmop/compile.py. Backtrace:

    frame #2: 0x00007fff4cc3a496 libtvm.so`dmlc::LogMessageFatal::~LogMessageFatal() + 166                                                                                                 frame #3: 0x00007fff4cdbf0cd libtvm.so`tvm::ReflectionVTable::GetAttr(tvm::runtime::Object*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&
    ) const + 605                                                                                                                                                                              frame #4: 0x00007fff4cdbf79e libtvm.so`tvm::NodeGetAttr(tvm::runtime::TVMArgs, tvm::runtime::TVMRetValue*) + 766
        frame #5: 0x00007fff4cdc0d84 libtvm.so`std::_Function_handler<void (tvm::runtime::TVMArgs, tvm::runtime::TVMRetValue*), void (*)(tvm::runtime::TVMArgs, tvm::runtime::TVMRetValue*)>::_M_invoke(std::_Any_data const&, tvm::runtime::TVMArgs&&, tvm::runtime::TVMRetValue*&&) + 20
        frame #6: 0x00007fff4d49c75e libtvm.so`TVMFuncCall + 110
        frame #7: 0x00007ffff5965dae libffi.so.6`ffi_call_unix64 + 76
        frame #8: 0x00007ffff596571f libffi.so.6`ffi_call + 559
    
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugBuildTVM OP

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions