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

Relay transform for rolling a known pattern into batch_matmul #14210

Merged
merged 1 commit into from
Mar 9, 2023

Conversation

rasagna-quic
Copy link
Contributor

@rasagna-quic rasagna-quic commented Mar 6, 2023

This PR contains relay pattern matching to roll a pattern containing strided_slice, qnn.dense, qnn.requantize, reshape, transpose, expand_dims and concatenate operators into batch_matmul operator.

https://discuss.tvm.apache.org/t/optimizing-qat-distilbert-int8-model/14182 contains more details.

@masahi @quic-sanirudh @arangasa @jverma-quic @kparzysz-quic

@tvm-bot
Copy link
Collaborator

tvm-bot commented Mar 6, 2023

Thanks for contributing to TVM! Please refer to the contributing guidelines https://tvm.apache.org/docs/contribute/ for useful information and tips. Please request code reviews from Reviewers by @-ing them in a comment.

  • No users to auto-tag found, no teams are specified in PR title See #10317 for details

Generated by tvm-bot

@masahi
Copy link
Member

masahi commented Mar 8, 2023

  • Please fix the CI issues
  • Use the snake_case naming convention for Python code.

return mod


class remove_empty_pad_callback(DFPatternCallback):
Copy link
Member

Choose a reason for hiding this comment

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

Sorry the class name should be CamelCase. I'll merge this, but when you send a new PR in the future, please fix them.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thank you @masahi for your quick review and help. I will keep the above changes in mind, when I create a new PR.

@masahi masahi merged commit 594bc0f into apache:main Mar 9, 2023
@rasagna-quic rasagna-quic deleted the relay_transforms branch March 11, 2023 10:21
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