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 2020/07/05 16:52:04 UTC

[GitHub] [incubator-tvm] tqchen commented on a change in pull request #5993: [Target] Use TargetNode::attrs for Target serialization

tqchen commented on a change in pull request #5993:
URL: https://github.com/apache/incubator-tvm/pull/5993#discussion_r449897101



##########
File path: include/tvm/target/target_id.h
##########
@@ -60,30 +60,35 @@ class TargetIdNode : public Object {
   int device_type;
   /*! \brief Default keys of the target */
   Array<String> default_keys;
-  /*! \brief Stores the required type_key and type_index of a specific attr of a target */
-  struct ValueTypeInfo {
-    String type_key;
-    uint32_t type_index;
-    std::unique_ptr<ValueTypeInfo> key;
-    std::unique_ptr<ValueTypeInfo> val;
-  };
 
   void VisitAttrs(AttrVisitor* v) {
     v->Visit("name", &name);
     v->Visit("device_type", &device_type);
     v->Visit("default_keys", &default_keys);
   }
 
-  Map<String, ObjectRef> ParseAttrsFromRawString(const std::vector<std::string>& options);
+  Map<String, ObjectRef> ParseAttrsFromRaw(const std::vector<std::string>& options) const;
+
+  Optional<String> StringifyAttrsToRaw(const Map<String, ObjectRef>& attrs) const;
 
   static constexpr const char* _type_key = "TargetId";
   TVM_DECLARE_FINAL_OBJECT_INFO(TargetIdNode, Object);
 
  private:
+  /*! \brief Stores the required type_key and type_index of a specific attr of a target */
+  struct ValueTypeInfo {
+    String type_key;
+    uint32_t type_index;
+    std::unique_ptr<ValueTypeInfo> key;
+    std::unique_ptr<ValueTypeInfo> val;

Review comment:
       val-> value




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