Skip to content

Commit

Permalink
[circle2circle] Add remove_gather_guard option (#12644)
Browse files Browse the repository at this point in the history
This will add remove_gather_guard to remove Gather guard ops.

ONE-DCO-1.0-Signed-off-by: SaeHie Park <[email protected]>
  • Loading branch information
seanshpark authored Feb 16, 2024
1 parent a19c00b commit a077481
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions compiler/circle2circle/src/Circle2Circle.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,9 @@ int entry(int argc, char **argv)
add_switch(arser, "--fuse_gelu", "This will fuse operators to GeLU operator");
add_switch(arser, "--remove_duplicate_const", "This will remove all duplicate constant nodes");
add_switch(arser, "--remove_fakequant", "This will remove FakeQuant operators");
add_switch(arser, "--remove_gather_guard",
"This will remove Add/FloorMod guards of Gather indices with certain conditions. "
"CAUTION: user must guarantee that indices are all non-negative values.");
add_switch(arser, "--remove_quantdequant", "This will remove Quantize-Dequantize sequence");
add_switch(arser, "--remove_redundant_quantize", "This will remove redundant Quantize operators");
add_switch(arser, "--remove_redundant_reshape",
Expand Down Expand Up @@ -312,6 +315,8 @@ int entry(int argc, char **argv)
options->enable(Algorithms::RemoveDuplicateConst);
if (arser.get<bool>("--remove_fakequant"))
options->enable(Algorithms::RemoveFakeQuant);
if (arser.get<bool>("--remove_gather_guard"))
options->enable(Algorithms::RemoveGatherGuard);
if (arser.get<bool>("--remove_quantdequant"))
options->enable(Algorithms::RemoveQuantDequantSeq);
if (arser.get<bool>("--remove_redundant_quantize"))
Expand Down

0 comments on commit a077481

Please sign in to comment.