-
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
dialects: (bufferization) Simplify tensor/memref constraint #3475
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #3475 +/- ##
==========================================
+ Coverage 90.27% 90.28% +0.01%
==========================================
Files 462 462
Lines 57845 57860 +15
Branches 5565 5563 -2
==========================================
+ Hits 52218 52240 +22
+ Misses 4190 4187 -3
+ Partials 1437 1433 -4 ☔ View full report in Codecov by Sentry. 🚨 Try these New Features:
|
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.
LGTM
Co-authored-by: Sasha Lopoukhine <superlopuh@gmail.com>
xdsl/dialects/bufferization.py
Outdated
if isa(attr, UnrankedTensorType[Attribute]): | ||
memref_type = UnrankedMemrefType.from_type(attr.element_type) | ||
return self.memref_constraint.verify(memref_type, constraint_context) | ||
raise VerifyException(f"Expected TensorType or UnrankedTensorType, got {attr}") |
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.
worth adding a test for this?
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 think it's probably OK to merge without this but if it's quick and easy it would catch this sort of thing in the future, hopefully
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.
Added an array of tests
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.
Beautiful
…ect#3475) Removes the `TensorMemrefInferenceConstraint` in favour of a simpler `TensorFromMemrefConstraint`. --------- Co-authored-by: Sasha Lopoukhine <superlopuh@gmail.com>
Removes the
TensorMemrefInferenceConstraint
in favour of a simplerTensorFromMemrefConstraint
.