TVMError: TVM_LOG_DEBUG ill-formed, invalid level

Hi,

I’m new to TVM and I am trying to run the first Tutorial: Compiling and Optimizing a Model with TVMC. When I do

python -m tvm.driver.tvmc compile --target “llvm” --output resnet50-v2-7-tvm.tar resnet50-v2-7.onnx

An error occurs:

I guess this error is related to the debug, after changing set(USE_RELAY_DEBUG ON) to set(USE_RELAY_DEBUG OFF) and rebuild, this problem disappears. But I don’t know what’s wrong.

My environment: ubuntu 20.04, llvm-10,cmake 3.23.1

I have added

export TVM_LOG_DEBUG=“ir/transform.cc=1;relay/ir/transform.cc=1”

in my .bashrc.

Thanks for help.

The Docs is wrong. Check the latest code, correct way is [TVM_LOG_DEBUG=“DEFAULT=2,ir/bar.cc=-1”, All files log level set 2, but ir/bar.cc set -1, not print any log]

Apologies for that–@hh123 is right. The format is documented in code here. If you’d like to update the tutorial I’d be happy to review a PR!

when i set : export TVM_LOG_DEBUG="DEFAULT=2;ir/bar.cc=-1"

run code :

tvmc tune \
--target "llvm" \
--output resnet50-v2-7-autotuner_records.json \
resnet50-v2-7.onnx

still get error like this-

me::Backtrace() + 24
  File "/Users/chendongsheng/github/tvm/src/runtime/logging.cc", line 251
TVMError: TVM_LOG_DEBUG ill-formed, invalid level

how that could work fine? tks

This should work if you use the , delimiter here:

TVM_LOG_DEBUG=“DEFAULT=2,ir/bar.cc=-1”

I opened https://github.com/apache/tvm/pull/11344 to improve the docs.

1 Like

very tks for your help,wish you happy every day.