From 77e2ed0ba9c685d24352d1c55ebe63c739770542 Mon Sep 17 00:00:00 2001 From: Li Xiaoquan Date: Wed, 3 Jun 2020 14:01:21 +0800 Subject: [PATCH] Avoid downloading when TOPHUB_LOCATION is NONE --- python/tvm/autotvm/tophub.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/python/tvm/autotvm/tophub.py b/python/tvm/autotvm/tophub.py index a00133709bea..c7c55ed1038a 100644 --- a/python/tvm/autotvm/tophub.py +++ b/python/tvm/autotvm/tophub.py @@ -216,10 +216,12 @@ def load_reference_log(backend, model, workload_name): if key not in REFERENCE_LOG_CACHE: tmp = [] + # If TOPHUB_LOCATION is not AUTOTVM_TOPHUB_NONE_LOC, # 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 tophub_location != AUTOTVM_TOPHUB_NONE_LOC: + download_package(tophub_location, package_name) if os.path.isfile(filename): # in case download failed find = False inp = None