-
Notifications
You must be signed in to change notification settings - Fork 52
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
Add Reduction, Squeeze, Reshape, and Expand to FusionTranslation #2856
Conversation
7cd4305
to
b63cde3
Compare
263cdea
to
4dc689b
Compare
b63cde3
to
7c54c5f
Compare
* Currently, the python frontend represents broadcast_in_dims as a broadcast and expand composite operation. For cpp to python translation, when we encounter an Expand expression, we must create a BroadcastInDimsOp, which creates a redundant broadcast in the definition. By adding the expand operation to the python frontend, we can create a one-to-one mapping in the translation.
Add squeeze op Add reshape support Add squeeze_expanded to python_frontend squeeze add squeeze_expanded flag support expand op
451823b
to
af06daf
Compare
!build |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's bump the version number here since we are changing existing API.
I don't know what's the reason behind the behavior on disable squeeze expanded by default. If we change that behavior I think we would be able to get away without the plumbing on squeeze
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
!build |
This PR adds support for Reduction, Squeeze, Reshape, and Expand operations.
Details:
squeeze_expanded
field toSqueezeOpRecord
. The flag is enabled by default during translation to avoid saving an extra field.