Replies: 1 comment 2 replies
-
|
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Currently, our operations have a dedicated field called
name
where we store their name for printing/parsing. However, this means that thename
field cannot be used for Attributes/Regions/Operands...This becomes particularly hard in the context of representing MLIR dialects, some of which actually have a
name
attribute (in IRDL, the DialectOp has a name attribute for the dialect name).I can think of two ways:
a) Rename
name
to_name
. This is what Python usually does for "already used" names in functions etc.b) The main issue comes from storing both the name of the operation and its attributes in the same way. We could also implement a dictionary mapping classes to their names. This would probably live within the MLContext and it would mean that printer and parser would need to access it and map things around. Obviously in the case of parsing we would need the reverse mapping (string to Class).
Any ideas/inputs?
Beta Was this translation helpful? Give feedback.
All reactions