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

[DRAF][one-optimize] Optimize part of the transformer's attention-head #12918

Draft
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

BalyshevArtem
Copy link
Contributor

This draft introduces two new passes to optimize part of the transformer's attention-head: FuseMulWithFullyConnected and FuseStridedSlicesNegAsMul.

for issue: #12917

ONE-DCO-1.0-Signed-off-by: Artem Balyshev a.balyshev@samsung.com

@BalyshevArtem BalyshevArtem added the DRAFT A draft issue or PR for sharing one's current working status and discussion. label Apr 24, 2024
@BalyshevArtem BalyshevArtem marked this pull request as draft April 24, 2024 15:56
This draft introduces two new passes to optimize part of the transformer's attention-head: FuseMulWithFullyConnected and FuseStridedSlicesNegAsMul.

ONE-DCO-1.0-Signed-off-by: Artem Balyshev <a.balyshev@samsung.com>
@seanshpark
Copy link
Contributor

compiler/luci/pass/src/FuseMulWithFullyConnectedPass.cpp:77:21: error: unused variable ‘fc_input’ [-Werror=unused-variable]

@seanshpark
Copy link
Contributor

some comments;

  • please add some test models in res/TensorFlowLiteRecipes
  • and add to circle2circle-dredd-recipe-test
  • also to luci-pass-value-py-test

@BalyshevArtem
Copy link
Contributor Author

  • please add some test models in res/TensorFlowLiteRecipes
  • and add to circle2circle-dredd-recipe-test
  • also to luci-pass-value-py-test

Done

@BalyshevArtem
Copy link
Contributor Author

@seanshpark, can I split this draft into PRs?

@seanshpark
Copy link
Contributor

can I split this draft into PRs?

Yes, please do :)
Actually I don't do detailed reviewed with draft PRs.

Comment on lines +97 to +98
input: "output_1"
input: "output_neg"
Copy link
Contributor

Choose a reason for hiding this comment

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

In the target model, the inputs are swapped. PTAL #12917 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
DRAFT A draft issue or PR for sharing one's current working status and discussion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants