You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tvm.apache.org by GitBox <gi...@apache.org> on 2019/11/23 01:19:09 UTC

[GitHub] [incubator-tvm] broune commented on a change in pull request #4404: [AutoTVM] select model with the most tuned schedules

broune commented on a change in pull request #4404: [AutoTVM] select model with the most tuned schedules
URL: https://github.com/apache/incubator-tvm/pull/4404#discussion_r349849273
 
 

 ##########
 File path: python/tvm/autotvm/tophub.py
 ##########
 @@ -218,12 +218,14 @@ def load_reference_log(backend, model, workload_name, template_key):
         if os.path.isfile(os.path.join(AUTOTVM_TOPHUB_ROOT_PATH, package_name)):
             find = False
             inp = None
+            counts = dict()
             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 not find and len(counts) > 0:
+                model = max(counts.items(), key=lambda k: k[1])[0]
 
 Review comment:
   From a conversation I had just now with Xingyu, model refers to a device type (device model, like a car model), not an ML model, and what this code is doing is finding a default device type to use in the case where there are no schedules for the actual type of the device. A comment to briefly explain this would be good.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services