New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
dialect: (builtin) Custom syntax for UnrealizedConversionCastOp #1406
Conversation
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## main #1406 +/- ##
=======================================
Coverage 90.09% 90.10%
=======================================
Files 214 214
Lines 26410 26434 +24
Branches 3912 3914 +2
=======================================
+ Hits 23794 23818 +24
Misses 2003 2003
Partials 613 613
☔ View full report in Codecov by Sentry. |
Can you add proper interop tests as well? Just checking that mlir can parse our custom syntax and it doesn't fail |
347ef80
to
cfc6db9
Compare
Tests are added for print and parsing custom syntax. |
I think @AntonLydike means a test like |
@@ -1,16 +1,22 @@ | |||
// RUN: xdsl-opt %s | xdsl-opt --print-op-generic | filecheck %s | |||
// RUN: xdsl-opt %s | xdsl-opt --print-op-generic | xdsl-opt | filecheck %s |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure of the benefit of three xdsl-opt
s
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For around-tripping printing and parsing of both generic and custom syntax.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This implementation doesn't handle nor test extra attributes in the syntax.
Just noticed the other day that we have this problem with quite a few custom syntaxes, we should be careful!
%3 = "builtin.unrealized_conversion_cast"(%0) : (i64) -> i64 | ||
// CHECK: %4 = builtin.unrealized_conversion_cast to i64 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, never seen that case, what is a cast from nothing to a type? 🤔
Looked for a case because I see it specially implemented in the parser.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
UnrealizedConversionCastOp seems has 0-1 conversion.
Interop tests has been added. |
Attribute dict has been handled. |
Custom syntax for UnrealizedConversionCastOp in par with MLIR. Address #1402