diff --git a/python/tvm/autotvm/tophub.py b/python/tvm/autotvm/tophub.py index ebfe6ee3a354..d953eaaeea9d 100644 --- a/python/tvm/autotvm/tophub.py +++ b/python/tvm/autotvm/tophub.py @@ -214,7 +214,11 @@ def load_reference_log(backend, model, workload_name, template_key): if key not in REFERENCE_LOG_CACHE: tmp = [] - if os.path.isfile(os.path.join(AUTOTVM_TOPHUB_ROOT_PATH, package_name)): + # Download the config file from tophub if not exists. + if not os.path.exists(filename): + tophub_location = _get_tophub_location() + download_package(tophub_location, package_name) + if os.path.isfile(filename): # in case download failed find = False inp = None counts = {}