From 06ce76b6ea3f1c47255cb4237e77de34e6061ef4 Mon Sep 17 00:00:00 2001 From: Xingyu Zhou Date: Thu, 9 Jan 2020 20:22:45 -0800 Subject: [PATCH] download fallback config file for search from tophub if it does not exist (#4671) --- python/tvm/autotvm/tophub.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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 = {}