Repository navigation
Replies: 1 comment 2 replies
|
|
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Currently, our operations have a dedicated field called
namewhere we store their name for printing/parsing. However, this means that thenamefield cannot be used for Attributes/Regions/Operands...This becomes particularly hard in the context of representing MLIR dialects, some of which actually have a
nameattribute (in IRDL, the DialectOp has a name attribute for the dialect name).I can think of two ways:
a) Rename
nameto_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?
All reactions