Skip to content

Commit

Permalink
[circle2circle] Add an option for RemoveUnnecessaryCastPass (#13895)
Browse files Browse the repository at this point in the history
* [circle2circle] Add an option for RemoveUnnecessaryCastPass

This commit adds an option for RemoveUnnecessaryCastPass.

ONE-DCO-1.0-Signed-off-by: Jan Iwaszkiewicz <[email protected]>

* Update to new C2C
  • Loading branch information
jiwaszki authored Sep 4, 2024
1 parent 433edf9 commit 552a0e7
Showing 1 changed file with 3 additions and 0 deletions.
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

0 comments on commit 552a0e7

Please sign in to comment.