From: lixiaoquan Date: Wed, 3 Jun 2020 15:01:10 +0000 (+0800) Subject: Avoid downloading when TOPHUB_LOCATION is NONE (#5720) X-Git-Tag: upstream/0.7.0~620 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=927510a6f3a454c31e893d79e46da898bc984df0;p=platform%2Fupstream%2Ftvm.git Avoid downloading when TOPHUB_LOCATION is NONE (#5720) --- diff --git a/python/tvm/autotvm/tophub.py b/python/tvm/autotvm/tophub.py index a001337..c7c55ed 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