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 2021/02/17 05:27:25 UTC

[GitHub] [tvm] junrushao1994 commented on a change in pull request #7462: [Target] Add target host field for target specification

junrushao1994 commented on a change in pull request #7462:
URL: https://github.com/apache/tvm/pull/7462#discussion_r577334704



##########
File path: include/tvm/target/target.h
##########
@@ -122,14 +125,28 @@ class Target : public ObjectRef {
   TVM_DLL explicit Target(std::nullptr_t) { data_ = nullptr; }
   /*!
    * \brief Construct a Target given a string
-   * \param tag_or_config_or_target_str the string to parse
+   * \param tag_or_config_or_target_str the string to parse for target
    */
   TVM_DLL explicit Target(const String& tag_or_config_or_target_str);
+  /*!
+   * \brief Construct a Target given a string
+   * \param tag_or_config_or_target_str the string to parse for target
+   * \param host_tag_or_config_or_host_str the string to parse for target host
+   */
+  TVM_DLL explicit Target(const String& tag_or_config_or_target_str,
+                          const String& host_tag_or_config_or_host_str);
   /*!
    * \brief Construct a Target using a JSON-like configuration
-   * \param config The JSON-like configuration
+   * \param config The JSON-like configuration for target
    */
   TVM_DLL explicit Target(const Map<String, ObjectRef>& config);
+  /*!
+   * \brief Construct a Target using a JSON-like configuration
+   * \param config The JSON-like configuration for target
+   * \param host_config The JSON-like configuration for target host
+   */
+  TVM_DLL explicit Target(const Map<String, ObjectRef>& config,
+                          const Map<String, ObjectRef>& host_config);

Review comment:
       nit: No need to provide these two constructors - C++ users can assemble them up using Target(Target(dict_a), Target(dict_b)).

##########
File path: include/tvm/target/target.h
##########
@@ -122,14 +125,28 @@ class Target : public ObjectRef {
   TVM_DLL explicit Target(std::nullptr_t) { data_ = nullptr; }
   /*!
    * \brief Construct a Target given a string
-   * \param tag_or_config_or_target_str the string to parse
+   * \param tag_or_config_or_target_str the string to parse for target
    */
   TVM_DLL explicit Target(const String& tag_or_config_or_target_str);
+  /*!
+   * \brief Construct a Target given a string
+   * \param tag_or_config_or_target_str the string to parse for target
+   * \param host_tag_or_config_or_host_str the string to parse for target host
+   */
+  TVM_DLL explicit Target(const String& tag_or_config_or_target_str,
+                          const String& host_tag_or_config_or_host_str);
   /*!
    * \brief Construct a Target using a JSON-like configuration
-   * \param config The JSON-like configuration
+   * \param config The JSON-like configuration for target
    */
   TVM_DLL explicit Target(const Map<String, ObjectRef>& config);
+  /*!
+   * \brief Construct a Target using a JSON-like configuration
+   * \param config The JSON-like configuration for target
+   * \param host_config The JSON-like configuration for target host
+   */
+  TVM_DLL explicit Target(const Map<String, ObjectRef>& config,
+                          const Map<String, ObjectRef>& host_config);

Review comment:
       No need to provide these two constructors - C++ users can assemble them up using Target(Target(dict_a), Target(dict_b)).




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