junrushao1994 commented on pull request #8750: URL: https://github.com/apache/tvm/pull/8750#issuecomment-899848131
@mbs-octoml Thanks for the discussion! Yes, I do like the fact that `DictAttrs` is a subclass of `Attrs`, and could be handled in a unified way as other `Attrs` on operators, etc. It provides other advantages like easier serialization. `WithAttrs` is definitely a good point, and it's not actually restricted to `DictAttrs`. If we use `Map<String, ObjectRef>` as the attributes' type, the same method is still valid with proper template programming. What about this? If an object has an `attrs` field whose type is `DictAttrs`, then we require the object to be consistent with a C++ concept that: - works with `WithAttr` - has the method `GetAttr` (with proper type signature) - has the method `HasNonzeroAttr` (with proper type signature) -- 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]
