TVMError: TVM_LOG_DEBUG ill-formed, invalid level


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/;relay/ir/”

in my .bashrc.

Thanks for help.

The Docs is wrong. Check the latest code, correct way is [TVM_LOG_DEBUG=“DEFAULT=2,ir/”, All files log level set 2, but ir/ 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/"

run code :

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

still get error like this-

me::Backtrace() + 24
  File "/Users/chendongsheng/github/tvm/src/runtime/", 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:


I opened to improve the docs.

1 Like

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