-
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
api: use new base helper in more operation definitions #2893
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## sasha/irdl/typed-constraints/pyrdl-filecheck #2893 +/- ##
================================================================================
- Coverage 89.90% 89.90% -0.01%
================================================================================
Files 403 403
Lines 50413 50421 +8
Branches 7787 7787
================================================================================
+ Hits 45324 45330 +6
- Misses 3862 3863 +1
- Partials 1227 1228 +1 ☔ View full report in Codecov by Sentry. |
@@ -113,7 +120,7 @@ class PrefetchOp(IRDLOperation): | |||
name = "csl_stencil.prefetch" | |||
|
|||
input_stencil = operand_def( | |||
stencil.TempType[Attribute] | memref.MemRefType[Attribute] | |||
base(stencil.TempType[Attribute]) | base(memref.MemRefType[Attribute]) |
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 this is not allowed with new pyright right?
Base should be type type[T] -> constrain[T]
, but a generic is not a type
anymore right?
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.
Which new pyright?
Since base is not defined in this PR, please can you include a link to the original PR or add pointers to docs / implementation (I also can't locate it in the code) |
We just added it yesterday/this morning, it's a helper to construct a constraint that carries the type information of the Attribute type passed in. The "new pyright" is any pyright newer than the one we're using (v1.1.345), notably the one in VSCode that is tied to the extension version and not the one in the virtual environment. |
Pylance errors: 725 -> 678