-
Notifications
You must be signed in to change notification settings - Fork 70
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: (affine) use maps in affine.for bounds, and add some helpers #1209
Conversation
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## main #1209 +/- ##
==========================================
- Coverage 88.66% 88.60% -0.06%
==========================================
Files 167 167
Lines 22873 22905 +32
Branches 3478 3483 +5
==========================================
+ Hits 20280 20296 +16
- Misses 2038 2054 +16
Partials 555 555
☔ View full report in Codecov by Sentry. |
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
xdsl/ir/affine/affine_map.py
Outdated
@staticmethod | ||
def from_constant(value: int) -> AffineMap: | ||
return AffineMap(0, 0, [AffineExpr.constant(value)]) |
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.
Can we call this method constant_map
instead?
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.
How about just constant
?
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 prefer constant_map
. It's also what mlir uses.
@staticmethod | ||
def empty() -> AffineMap: | ||
return AffineMap(0, 0, []) | ||
|
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.
Can you make the empty method with dims = 0, syms = 0?
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.
you mean explicitly specifying the arguments?
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.
No, I meant the api. But it's fine, I can extend this later.
1f3fc5f
to
8d74060
Compare
@Groverkss