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


##########
include/tvm/meta_schedule/database.h:
##########
@@ -357,6 +357,18 @@ class Database : public runtime::ObjectRef {
    */
   TVM_DLL static Database JSONDatabase(String path_workload, String 
path_tuning_record,
                                        bool allow_missing);
+  /*!
+   * \brief Create a database merged from multiple databases.
+   * \param preferred The preferred database. If the preferred database 
responses to a query,
+   * all other databases will be ignored.
+   * \param databases The databases to be merged.
+   * \param fallback The fallback databases. If all the databases didn't 
answer a query,
+   * the fallback databases will be used.
+   * \return The merged database.
+   */
+  TVM_DLL static Database MergedDatabase(Array<Database, void> preferred,
+                                         Array<Database, void> databases,
+                                         Array<Database, void> fallback);

Review Comment:
   `Database` at that moment is an incomplete type, which won't pass Array's 
static type checking which requires the `Database` to be a subclass of 
`ObjectRef`, and therefore, we use the void-trick here



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