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

[Frontend, Tensorflow] Support for broadcasting in batch_matmul when shapes differ #8251

Merged
merged 4 commits into from
Jun 16, 2021

Conversation

rohanmukh
Copy link
Contributor

@rohanmukh rohanmukh commented Jun 12, 2021

Current implementation of batch_matmul in TF frontend is not able to handle cases where the shape of the second input differs from the first and a broadcast is needed to complete the operation. Also, in the current logic it always assumed that the shape of second input shape_y is atleast of length 3. This is not the case is some TF2 models like efficientdet. This PR handles these use cases.

Thanks for contributing to TVM! Please refer to guideline https://tvm.apache.org/docs/contribute/ for useful information and tips. After the pull request is submitted, please request code reviews from Reviewers by @ them in the pull request thread.

@rohanmukh rohanmukh marked this pull request as ready for review June 14, 2021 17:02
@rohanmukh
Copy link
Contributor Author

Copy link
Contributor

@comaniac comaniac left a comment

Choose a reason for hiding this comment

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

LGTM

@mbrookhart mbrookhart merged commit ec6a817 into apache:main Jun 16, 2021
@mbrookhart
Copy link
Contributor

Thanks @rohanmukh @comaniac

@rohanmukh
Copy link
Contributor Author

Thanks @comaniac @mbrookhart

trevor-m pushed a commit to trevor-m/tvm that referenced this pull request Jun 17, 2021
…shapes differ (apache#8251)

* Support for broadcasting in batch_matmul when shapes differ

* refactor

* refactor logic for reshape in conditional

* refactor
trevor-m pushed a commit to neo-ai/tvm that referenced this pull request Jun 17, 2021
…shapes differ (apache#8251)

* Support for broadcasting in batch_matmul when shapes differ

* refactor

* refactor logic for reshape in conditional

* refactor
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.

3 participants