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 2022/09/19 17:49:43 UTC

[GitHub] [tvm] junrushao commented on a diff in pull request #12838: [MetaSchedule] PyDatabase Complete Function Reload Support

junrushao commented on code in PR #12838:
URL: https://github.com/apache/tvm/pull/12838#discussion_r974521553


##########
include/tvm/meta_schedule/database.h:
##########
@@ -325,6 +362,25 @@ class PyDatabaseNode : public DatabaseNode {
     return f_get_all_tuning_records();
   }
 
+  Optional<TuningRecord> QueryTuningRecord(const IRModule& mod, const Target& target,
+                                           const String& workload_name) final {
+    ICHECK(f_query_tuning_record != nullptr)
+        << "PyDatabase's QueryTuningRecord method not implemented!";
+    return f_query_tuning_record(mod, target, workload_name);

Review Comment:
   Note that `QueryXYZ`  does have their default implementation: https://github.com/apache/tvm/blob/2af9b90ec191424724842795c552d4c15682eb8c/src/meta_schedule/database/database.cc#L159. Therefore, if `f_query_tuning_record` is null, we should still use the default implementation rather than error out.
   
   Let's also have both cases tests (has default impl vs no default impl)



-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@tvm.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org