backend: str
The backend name
model: str
- The name of the model
+ The name of the device model
workload_name: str
The name of the workload. (The first item in the workload tuple)
template_key: str
if os.path.isfile(os.path.join(AUTOTVM_TOPHUB_ROOT_PATH, package_name)):
find = False
inp = None
+ counts = {}
for inp, res in load_from_file(filename):
+ counts[inp.target.model] = counts.get(inp.target.model, 0) + 1
if model == inp.target.model:
find = True
break
- if not find and inp:
- model = inp.target.model
+ # if device model is not find, use the device model with the most tuned worklaods
+ if not find and counts:
+ model = max(counts.items(), key=lambda k: k[1])[0]
for inp, res in load_from_file(filename):
if (model == inp.target.model and inp.task.workload[0] == workload_name and