-
Notifications
You must be signed in to change notification settings - Fork 83
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
core: (traits) Add SameOperandsAndResultType
trait
#3751
core: (traits) Add SameOperandsAndResultType
trait
#3751
Conversation
Quick question. Looking at it, it seems that this is more complex than just the |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #3751 +/- ##
==========================================
+ Coverage 91.24% 91.26% +0.02%
==========================================
Files 459 461 +2
Lines 57298 57454 +156
Branches 5532 5545 +13
==========================================
+ Hits 52279 52437 +158
+ Misses 3593 3591 -2
Partials 1426 1426 ☔ View full report in Codecov by Sentry. |
Is it? I thought it also checks within the container type? |
Okay my bad then, I indeed misunderstood what MLIR was doing! |
Thanks for the pointer! |
Does this achieve anything that you can't do with range constraints? Is it just so you can write the same thing as you can in mlir? |
My feeling is that |
I think i've misunderstood what this does then, I'll have a proper look tomorrow |
Ah, I see what this does now, I feel the name is confusing but I guess that's what mlir uses |
We should figure out how to do shapes properly with constraints/irdl at some point |
This PR: - Adds the `SameOperandsAndResultType` trait - Tests of the above A [few](https://github.com/llvm/llvm-project/blob/539b15b41a6a01017c0a555e89b7d2b62ba194d2/mlir/test/IR/traits.mlir#L41) examples of this being tested in upstream MLIR.
This PR:
SameOperandsAndResultType
traitA few examples of this being tested in upstream MLIR.