jwfromm commented on a change in pull request #7823:
URL: https://github.com/apache/tvm/pull/7823#discussion_r616981235



##########
File path: tests/python/driver/tvmc/test_autoscheduler.py
##########
@@ -26,28 +24,30 @@
 
 
 def _get_tasks(model):
-    mod, params = tvmc.frontends.load_model(model)
-    tasks, weights = tvmc.autotuner.autoscheduler_get_tuning_tasks(mod, 
params, "llvm")
+    tvmc_model = tvmc.frontends.load_model(model)
+    tasks, weights = tvmc.autotuner.autoscheduler_get_tuning_tasks(
+        tvmc_model.mod, tvmc_model.params, "llvm"
+    )
     return (tasks, weights)
 
 
-def _autoscheduler_test_helper(
-    model, tmpdir_name, tasks_weights=None, early_stopping=1, 
tuning_records=None
-):
-    tasks, weights = tasks_weights if tasks_weights else _get_tasks(model)
+def _autoscheduler_test_helper(model, tmpdir_name, early_stopping=1, 
prior_records=None):
+    tvmc_model = tvmc.frontends.load_model(model)
     log_file = os.path.join(tmpdir_name, "autoscheduler.json")
 
-    tuning_options = auto_scheduler.TuningOptions(
-        num_measure_trials=1,
-        measure_callbacks=[auto_scheduler.RecordToFile(log_file)],
-        runner="local",
-        builder="local",
-        verbose=0,
+    hardware_params = auto_scheduler.HardwareParams(num_cores=4, target="llvm")
+
+    tvmc.tune(
+        tvmc_model,
+        target="llvm",
+        tuning_records=log_file,
+        prior_records=prior_records,
         early_stopping=early_stopping,
+        enable_autoscheduler=True,
+        trials=32,

Review comment:
       I've switched to testing an mnist model that requires only 4 trials and 
runs much faster.




-- 
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:
[email protected]


Reply via email to