Skip to content

Conversation

@apivovarov
Copy link
Contributor

@apivovarov apivovarov commented Mar 18, 2021

About the problem:
dmlc-core has cmake generated build_config.h which enables DMLC_LOG_STACK_TRACE in case cxxabi.h and execinfo.h files are present on the system. This feature (LOG_STACK_TRACE) is used in dmlc/logging.h which is used in tvm runtime/graph/graph_runtime.cc (via tvm/runtime/packed_func.h).

In order to build TVM runtime on a systems which do not have execinfo.h (e.g. OpenWRT) we should not automatically enable DMLC_LOG_STACK_TRACE.
This check will be done if we use dmlc-core as a cmake module.
Currently TVM build simply points to dmlc-core src and include folders but does not use dmlc-core cmake logic during the build.
Instead of that we should use dmlc-core as another cmake project.
For example xgboost already using dmlc-core as a cmake project

To verify that the fix works.

  1. Rename /usr/include/execinfo.h to smth else
  2. build tvm runtime.
cmake ..
make runtime

The build should work.

@tkonolige
Copy link
Contributor

I've proposed this change in the past, but it seems like we want to use dmlc-core as a header only library. @tqchen can provide more info.

You'll be happy to know that #7153 move the stack trace code from dmlc-core into tvm proper. Maybe you should look at that PR?

@tqchen
Copy link
Member

tqchen commented Mar 19, 2021

right, the dependency of TVM on dmlc-core is only limited to the header only, so we do not want to introduce a separate build dep step. Hopefully things can be easier after #7153

@apivovarov apivovarov closed this Mar 19, 2021
@apivovarov apivovarov deleted the dmcl-core-cmake branch March 19, 2021 00:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants