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: (stream) simplify constr helper on stream attributes #3473

Merged
merged 12 commits into from
Nov 20, 2024

Conversation

superlopuh
Copy link
Member

@superlopuh superlopuh commented Nov 19, 2024

I'm working towards removing the stream dialect, and would like to simplify it as much as possible before copying to both memref_stream and snitch_stream. I don't think the constr overload is pulling its weight, it's much simpler just to provide a shorthand for the BaseAttr constraint, and only return a ParamAttrConstraint from constr.

@superlopuh superlopuh added the dialects Changes on the dialects label Nov 19, 2024
@superlopuh superlopuh self-assigned this Nov 19, 2024
Comment on lines +74 to +76
AnyWritableStreamTypeConstr = BaseAttr[WritableStreamType[Attribute]](
WritableStreamType
)
Copy link
Member Author

Choose a reason for hiding this comment

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

I have a feeling that this will be the pattern to use until we have defaults for TypeVars

Copy link

codecov bot commented Nov 19, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 90.33%. Comparing base (ee4094f) to head (1307bd4).
Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3473      +/-   ##
==========================================
+ Coverage   90.32%   90.33%   +0.01%     
==========================================
  Files         464      464              
  Lines       58079    58057      -22     
  Branches     5565     5556       -9     
==========================================
- Hits        52458    52446      -12     
+ Misses       4188     4185       -3     
+ Partials     1433     1426       -7     

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


🚨 Try these New Features:

Copy link
Collaborator

@alexarice alexarice left a comment

Choose a reason for hiding this comment

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

If someone is brave at some point, we could also think about auto-generating these constr helpers

Base automatically changed from sasha/stream/split-dialect-utils to main November 20, 2024 16:50
@superlopuh superlopuh merged commit 25adb58 into main Nov 20, 2024
14 of 15 checks passed
@superlopuh superlopuh deleted the sasha/stream/constr-class-method branch November 20, 2024 17:00
superlopuh added a commit that referenced this pull request Nov 20, 2024
@superlopuh superlopuh restored the sasha/stream/constr-class-method branch November 20, 2024 17:12
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.

2 participants