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: (stablehlo) add elementwise add, sub, mul #3030

Merged
merged 1 commit into from
Aug 14, 2024

Conversation

superlopuh
Copy link
Member

Also reorganizes the test.

CC @efferifick

@superlopuh superlopuh added the dialects Changes on the dialects label Aug 14, 2024
@superlopuh superlopuh self-assigned this Aug 14, 2024
Copy link

codecov bot commented Aug 14, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 89.85%. Comparing base (996f649) to head (debd77b).
Report is 4 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #3030   +/-   ##
=======================================
  Coverage   89.85%   89.85%           
=======================================
  Files         413      413           
  Lines       51852    51871   +19     
  Branches     8006     8010    +4     
=======================================
+ Hits        46592    46610   +18     
- Misses       3970     3972    +2     
+ Partials     1290     1289    -1     

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

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.

Do these operations not have assemblyFormat/custom parsing?

@@ -1,8 +0,0 @@
// RUN: xdsl-opt %s --parsing-diagnostics --verify-diagnostics --split-input-file | filecheck %s
Copy link
Collaborator

Choose a reason for hiding this comment

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

Would be good it this could have been git mved but not necessary

class ElementwiseBinaryOperation(IRDLOperation, abc.ABC):
# TODO: Remove this constraint for complex types.
T = Annotated[AnyTensorType, ConstraintVar("T")]

Copy link
Collaborator

Choose a reason for hiding this comment

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

Should these have some verification that the inputs are "numeric"

Copy link
Member Author

Choose a reason for hiding this comment

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

Eventually we'll make these constrained to the values that the original stablehlo dialect supports, I don't think it's critical right now.

@superlopuh
Copy link
Member Author

Do these operations not have assemblyFormat/custom parsing?

nope

@superlopuh superlopuh merged commit 6d84955 into main Aug 14, 2024
10 checks passed
@superlopuh superlopuh deleted the sasha/jax/elementwise-ops branch August 14, 2024 22:03
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