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

[Draft] Revise RemoveUnnecessaryTransposeNetPass #14121

Closed
wants to merge 6 commits into from

Conversation

zetwhite
Copy link
Contributor

This Draft

  • refactor RemoveUnnecessaryTransposeNetPass
  • support rank expansion case

ONE-DCO-1.0-Signed-off-by: seunghui youn sseung.youn@samsung.com

This PR Simplifies TaggedShapeAnaylzer in RemoveUnnecessaryTransposeNetPass.

ONE-DCO-1.0-Signed-off-by: seunghui youn <sseung.youn@samsung.com>
This commit move luci::CircleNode into TaggedShapeAnalyzer
@zetwhite
Copy link
Contributor Author

related : #13663

zetwhite added a commit to zetwhite/ONE that referenced this pull request Sep 30, 2024
This PR simplify TaggedShapeAnalyzer in RemoveUnnecessaryTransposeNetPass.
By removing less-related code(flatzize(), inference_incomplete_shape()) in TaggedShapeAnaylzer, This PR clearfy TaggedShapeAnaylzer's role.

ONE-DCO-1.0-Signed-off-by: seunghui youn <sseung.youn@samsung.com>

* draft : Samsung#14121

(background) Before resolving Samsung#13663, I'd like to trim current RemoveUnnecessaryTransposeNetPass.
Comment on lines +367 to +375
{
reset_tag(_out_shape);

analyze_transpose(reverse_perm(_back_perm));

analyze_transpose<DType>(b_tr);
auto shape = extract_shape(_front_transpose);
RET_FALSE_UNLESS(analyze_reshape(shape));

analyze_transpose(reverse_perm(_front_perm));
Copy link
Contributor Author

@zetwhite zetwhite Oct 2, 2024

Choose a reason for hiding this comment

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

  • if out_rank > in_rank, analyze it in reverse order :
    • set_tag(output_shape)
    • analyze(back_transponse)
    • analyze(mid_resahpe)
    • analyze(front_transpose)

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.

1 participant