zxybazh commented on code in PR #12520:
URL: https://github.com/apache/tvm/pull/12520#discussion_r956421893


##########
include/tvm/meta_schedule/database.h:
##########
@@ -203,6 +203,27 @@ class DatabaseNode : public runtime::Object {
    * \return The size of the database.
    */
   virtual int64_t Size() = 0;
+  /*!
+   * \brief Query the best record of the given workload from the database.
+   * \param mod The IRModule to be searched for.
+   * \param target The target to be searched for.
+   * \return The best record of the given workload; NullOpt if not found.
+   */
+  virtual Optional<TuningRecord> QueryTuningRecord(IRModule mod, Target 
target);
+  /*!
+   * \brief Query the best record of the given workload from the database.

Review Comment:
   Ditto, `record` -> `Schedule`



##########
src/meta_schedule/database/database.cc:
##########
@@ -154,6 +154,59 @@ TuningRecord TuningRecord::FromJSON(const ObjectRef& 
json_obj, const Workload& w
   return TuningRecord(trace, workload, run_secs, target, args_info);
 }
 
+/******** Database ********/
+
+Optional<TuningRecord> DatabaseNode::QueryTuningRecord(IRModule mod, Target 
target) {

Review Comment:
   We may want to add a target comparison function to distinguish between the 
target given here in the future.



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

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to