-
Notifications
You must be signed in to change notification settings - Fork 73
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: introduce param_def API for ParametrizedAttribute declaration #3444
base: sasha/misc/type-var-constr-merge
Are you sure you want to change the base?
Changes from all commits
8e3df95
76de217
adcc2f8
12136c6
6d65312
adb3882
21d2f80
697da11
1ef3492
6dfd769
c508e80
3ee0a70
7629bcb
3dce048
7c10bca
fa2427b
9c47a82
77faf83
a8dfc11
a5a09f8
f1e2898
c46787f
9c61860
bb94566
6bec340
5959a8d
51b6d07
c31fa27
9f4b2f7
8d33d04
2893129
2a4f14e
ee9980b
3d3bf4c
38dd699
c6b190b
d9e5859
fd153eb
6a32589
90d1c93
4c79972
bf81d8c
e5eb94c
56102f5
691c1a6
7a8b187
8c6d4bc
52a5e43
2dd1b0f
616a67b
b203e5a
6b8686e
0937de7
1b51b4d
9e4aad1
1387b91
41ec646
ead530c
df9395b
7224141
7167cf4
a904f29
827477f
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -49,6 +49,7 @@ | |
PatternRewriteWalker, | ||
RewritePattern, | ||
TypeConversionPattern, | ||
attr_constr_rewrite_pattern, | ||
attr_type_rewrite_pattern, | ||
op_type_rewrite_pattern, | ||
) | ||
|
@@ -649,7 +650,7 @@ def return_target_analysis(module: builtin.ModuleOp): | |
|
||
|
||
class StencilTypeConversion(TypeConversionPattern): | ||
@attr_type_rewrite_pattern | ||
@attr_constr_rewrite_pattern(StencilTypeConstr) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is this a different change? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I guess it's more related to the previous change, let me revert this and see what happens There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Nope it's related to this change, since we use the attr_def instead of the type hints to construct the constraint, we can't do it on the ABC that is StencilTypeConstr since it's not really an attribute. We have to construct the constraint manually instead. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Similarly in the change in riscv_snitch |
||
def convert_type(self, typ: StencilType[Attribute]) -> MemRefType[Attribute]: | ||
return StencilToMemRefType(typ) | ||
|
||
|
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 doesn't feel ideal? We effectively lose the python typing for the field which was kind of the whole point of having the typevar
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.
yep and it's currently breaking my code when I migrate xDSL to it. I'll probably change this soon.