tvm.driver.tvmc.config_options.ConfigsJsonNotFoundError

i have compiled tvm successfully on windows and installed TVM package through python setup.py install within conda tvm-build environment ,but when i type tvmc -h (tvm-build) D:\mystudy\tvm\python>tvmc -h Traceback (most recent call last): File “D:\ENVIRONMENT\anaconda\envs\tvm-build\Scripts\tvmc-script.py”, line 33, in sys.exit(load_entry_point(‘tvm==0.9.dev1713+gc9d0d253f’, ‘console_scripts’, ‘tvmc’)()) File “D:\ENVIRONMENT\anaconda\envs\tvm-build\lib\site-packages\tvm-0.9.dev1713+gc9d0d253f-py3.8-win-amd64.egg\tvm\driver\tvmc\main.py”, line 115, in main sys.exit(_main(sys.argv[1:])) File “D:\ENVIRONMENT\anaconda\envs\tvm-build\lib\site-packages\tvm-0.9.dev1713+gc9d0d253f-py3.8-win-amd64.egg\tvm\driver\tvmc\main.py”, line 74, in _main json_param_dict = read_and_convert_json_into_dict(config_arg) File “D:\ENVIRONMENT\anaconda\envs\tvm-build\lib\site-packages\tvm-0.9.dev1713+gc9d0d253f-py3.8-win-amd64.egg\tvm\driver\tvmc\config_options.py”, line 119, in read_and_convert_json_into_dict config_dir = get_configs_json_dir() File “D:\ENVIRONMENT\anaconda\envs\tvm-build\lib\site-packages\tvm-0.9.dev1713+gc9d0d253f-py3.8-win-amd64.egg\tvm\driver\tvmc\config_options.py”, line 69, in get_configs_json_dir raise ConfigsJsonNotFoundError() tvm.driver.tvmc.config_options.ConfigsJsonNotFoundError

can someone please tell me where to get tvmc config.json file?

Hi @JackWw, in our repository this file is at tvm/configs/host at main · apache/tvm · GitHub, but I see you’re using Conda. I’m not a Conda user, but perhaps there is an issue somewhere that is making this file default.json not to be included in the Conda package?

cc @tqchen any idea who can help with Conda packaging issues?

I appreciate your reply,and there is an error occur in running demo following tutorial"Optimizing Operators with Auto-scheduling".

when comes to task.tune(tune_option), jupyter Notebook(anaconda)

reports error

I mean that i build tcm within tvm-build environment succussfully ,but there are warnings during compiling

warning C4819: The file contains characters that cannot be represented in the current code page (936). Please save this file in Unicode format to prevent data loss

I ignored the warning, i am thinking would this be the reason for my failure in installing tvm on Windows?

But demo in “Working with Operators Using Tensor Expression” runs perfectly in my computer.

Maybe i missed something vital during build tvm?

Hi, @JackWw. I found the same problem when I build tvm on windows11 using conda. It seems that the --user flag with pip is not necessary for conda env.

An easy way to solve this question is to add the TVM_CONFIGS_JSON_DIR env variable to PATH according to the link

2 Likes

Thank you very much for your reply! I am developing TVM on Linux now, maybe i will try Windows again in the future.

hi, i also meet the same problem ,how to set TVM_CONFIGS_JSON_DIR env variable to PATH?

Depend on your platform.

  • On Windows, add environment variable to your computer setting
  • On Linux, export environment variable to your shell rc file e.g. .bashrc/.zshrc

Instead of set env, we can run tvmc --config configs/host/default.json by explicitly setting config in command.

tvmc compile --target “llvm” --output resnet50-v2-7-tvm.tar resnet50-v2-7.onnx --config E:\github\tvm\configs\host\default.json

This works