When I cmake the lastest version of tvm, the vta cmake file cannot find vta_config.py
/usr/bin/python: can’t open file ‘vta/vta-hw/config/vta_config.py’: [Errno 2] No such file or directory
Then I found that
The config_path
use relative path, which in fact not the right path. Since the current working directory when running the script is /path/to/tvm/build
, rather than the dir of the script. Besides, config_path
does not consider the args --use-cfg
.
I think the config_path should be something like
config_dir = os.path.dirname(os.path.abspath(__file__))
config_path = os.path.join(config_dir, "vta_config.json")
if args.use_cfg:
config_path = args.use_cfg
if not os.path.exists(config_path):
raise RuntimeError("Cannot find config in %s" % str(config_path))
Besides, for VTA.cmake, under my env, it cannot recognize the relative path of vta_config.py. I need to add ${CMAKE_CURRENT_SOURCE_DIR}/
before $ENV{VTA_HW_PATH}/config/vta_config.py
to make it work.