Skip to content

[Operator] Composite Elementwise Operation#337

Merged
hjjq merged 5 commits intohidet-org:mainfrom
hjjq:conv
Aug 1, 2023
Merged

[Operator] Composite Elementwise Operation#337
hjjq merged 5 commits intohidet-org:mainfrom
hjjq:conv

Conversation

@hjjq
Copy link
Copy Markdown
Collaborator

@hjjq hjjq commented Aug 1, 2023

Assuming U1 and U2 are unary elementwise operators, and B is a binary elementwise operator.
Introduce a new fused operator called Composite Elementwise Operation, where comp_elemwise(x, U1, U2, B) = B(U1(x), U2(x)).
Also add subgraph rewrite rule. This allows for more fusion opportunity.

Copy link
Copy Markdown
Member

@yaoyaoding yaoyaoding left a comment

Choose a reason for hiding this comment

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

Thanks @hjjq, it looks good to me!

Comment on lines +48 to +51
self.lhs = lhs
self.rhs = rhs
self.out = out
self.name = name
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Better to add some type hints to increase the readability.

@hjjq hjjq merged commit 1eb41ad into hidet-org:main Aug 1, 2023
@hjjq hjjq deleted the conv branch August 1, 2023 15:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants