Skip to content
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

Merged
merged 3 commits into from
Jul 17, 2024

Conversation

superlopuh
Copy link
Member

Pylance errors: 725 -> 678

@superlopuh superlopuh added the API Related to changes regarding API of constructs label Jul 17, 2024
@superlopuh superlopuh self-assigned this Jul 17, 2024
Copy link

codecov bot commented Jul 17, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 89.90%. Comparing base (6637e85) to head (7f59830).

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.
📢 Have feedback on the report? Share it here.

Base automatically changed from sasha/irdl/typed-constraints/pyrdl-filecheck to main July 17, 2024 12:23
@@ -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])
Copy link
Collaborator

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?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Which new pyright?

@n-io
Copy link
Collaborator

n-io commented Jul 17, 2024

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)

@superlopuh
Copy link
Member Author

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.

@superlopuh superlopuh merged commit ed144cf into main Jul 17, 2024
9 checks passed
@superlopuh superlopuh deleted the sasha/irdl/typed-constarints/more-constr branch July 17, 2024 14:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
API Related to changes regarding API of constructs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants