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

dialects: (stencil) add StencilType constraints #3254

Merged
merged 3 commits into from
Oct 8, 2024

Conversation

superlopuh
Copy link
Member

@superlopuh superlopuh commented Oct 7, 2024

This adds some constraint constants and a new .constr helper to construct parametrized constraints for stencil types. Pyright errors 143 -> 133

@superlopuh superlopuh added the dialects Changes on the dialects label Oct 7, 2024
@superlopuh superlopuh self-assigned this Oct 7, 2024
Comment on lines +90 to +93
stencil.StencilTypeConstr,
) and isattr(
el_type := field_t.element_type,
AnyTensorTypeConstr | AnyMemRefTypeConstr,
Copy link
Member Author

Choose a reason for hiding this comment

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

this is the only kind of functional change, splitting the check into two, it should still be equivalent

Copy link
Collaborator

Choose a reason for hiding this comment

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

LGTM, thanks for doing this

Copy link

codecov bot commented Oct 7, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 89.92%. Comparing base (5243d81) to head (45f4e92).
Report is 3 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #3254   +/-   ##
=======================================
  Coverage   89.92%   89.92%           
=======================================
  Files         441      441           
  Lines       55420    55430   +10     
  Branches     8643     8644    +1     
=======================================
+ Hits        49835    49846   +11     
  Misses       4158     4158           
+ Partials     1427     1426    -1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@superlopuh superlopuh changed the title dialects: (stencil) add StencilTypeConstr dialects: (stencil) add StencilType constraints Oct 8, 2024
@superlopuh superlopuh requested a review from math-fehr October 8, 2024 10:15
Copy link
Collaborator

@math-fehr math-fehr left a comment

Choose a reason for hiding this comment

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

Nice!
I think we should try to follow this on the other dialects later on

@superlopuh superlopuh merged commit 14d1a54 into main Oct 8, 2024
14 checks passed
@superlopuh superlopuh deleted the sasha/stencil/stencil-type-constr branch October 8, 2024 12:56
emmau678 pushed a commit that referenced this pull request Oct 8, 2024
This adds some constraint constants and a new `.constr` helper to
construct parametrized constraints for stencil types. Pyright errors 143
-> 133
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dialects Changes on the dialects
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants