dialects: (hw) Modernise dialect with properties instead of attributes#5320
dialects: (hw) Modernise dialect with properties instead of attributes#5320gabrielrodcanal wants to merge 4 commits intomainfrom
Conversation
…instead of attributes in this dialect
|
The method |
|
Two thoughts:
|
|
Respect to the second thought, it turns out it's not necessary to change anything in the dialect. Just by keeping However, I've seen that some tests try to add custom attributes, such as here How is this usually handled in xDSL when properties are expected? Is compatibility for attributes added too? Or maybe we don't really need support for this and the test can be updated accordingly? |
|
I'm a bit confused by your question, what doesn't work? This is one of those things that the custom syntax must support, all ops can have extra attributes added that are not in the definition. I have a feeling that a bunch of our custom printers/parsers don't handle it properly but we should. |
|
I think there might be a little misunderstanding on the support of attributes and properties on my end. As far as I know MLIR supports both attributes and properties at the same time, correct? Does that mean that for a case like properties and attributes need to be parsed separately? As far as I know it is possible to have custom attributes but not custom properties. Sorry if it's basic, but I've never had to mix attributes and properties before. |
|
It's a little weird, but since properties were added later and as a kind of optimisation over attributes, there are some places where they behave in a slightly weird way. One case of this is |
Attributes are replaced by properties to be compliant with latest MLIR versions (tested with 22.0.0).