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

[circle2circle] Add an option for RemoveUnnecessaryCastPass #13895

Merged
merged 3 commits into from
Sep 4, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions compiler/circle2circle/src/Circle2Circle.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,8 @@ int entry(int argc, char **argv)
"This will fuse or remove subsequent Transpose operators");
add_switch(arser, "--remove_unnecessary_add",
"This will remove unnecessary add of zero constant");
add_switch(arser, "--remove_unnecessary_cast",
"This will remove unnecessary cast with the same input and output type.");
add_switch(arser, "--remove_unnecessary_reshape",
"This will remove unnecessary reshape operators");
add_switch(arser, "--remove_unnecessary_slice", "This will remove unnecessary slice operators");
Expand Down Expand Up @@ -310,6 +312,7 @@ int entry(int argc, char **argv)
option_str_to_enum["remove_redundant_reshape"] = Algorithms::RemoveRedundantReshape;
option_str_to_enum["remove_redundant_transpose"] = Algorithms::RemoveRedundantTranspose;
option_str_to_enum["remove_unnecessary_add"] = Algorithms::RemoveUnnecessaryAdd;
option_str_to_enum["remove_unnecessary_cast"] = Algorithms::RemoveUnnecessaryCast;
option_str_to_enum["remove_unnecessary_reshape"] = Algorithms::RemoveUnnecessaryReshape;
option_str_to_enum["remove_unnecessary_slice"] = Algorithms::RemoveUnnecessarySlice;
option_str_to_enum["remove_unnecessary_strided_slice"] = Algorithms::RemoveUnnecessaryStridedSlice;
Expand Down