From b423ede2edeac088e30e5f04b61c7c569bb7073e Mon Sep 17 00:00:00 2001 From: Dayoung Lee Date: Fri, 11 Oct 2024 17:25:59 +0900 Subject: [PATCH] [circle2circle] Add substitute_expand_dims_to_reshape option (#14197) Let's add substitute_expand_dims_to_reshape option to circle2circle cli. ONE-DCO-1.0-Signed-off-by: Dayoung Lee --- compiler/circle2circle/src/Circle2Circle.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/compiler/circle2circle/src/Circle2Circle.cpp b/compiler/circle2circle/src/Circle2Circle.cpp index fdf769ba73f..7112bcbcec4 100644 --- a/compiler/circle2circle/src/Circle2Circle.cpp +++ b/compiler/circle2circle/src/Circle2Circle.cpp @@ -181,6 +181,8 @@ int entry(int argc, char **argv) "it only converts weights whose row is a multiple of 16"); add_switch(arser, "--replace_non_const_fc_with_batch_matmul", "Replace FullyConnected with BatchMatMul when its weight is non-constant"); + add_switch(arser, "--substitute_expand_dims_to_reshape", + "This will convert ExpandDims with constant axis to Reshape"); add_switch(arser, "--substitute_pack_to_reshape", "This will convert single input Pack to Reshape"); add_switch(arser, "--substitute_padv2_to_pad", @@ -333,6 +335,7 @@ int entry(int argc, char **argv) option_str_to_enum["resolve_former_customop"] = Algorithms::ResolveFormerCustomOp; option_str_to_enum["shuffle_weight_to_16x1float32"] = Algorithms::ShuffleWeightTo16x1Float32; option_str_to_enum["replace_non_const_fc_with_batch_matmul"] = Algorithms::ReplaceNonConstFCWithBatchMatMul; + option_str_to_enum["substitute_expand_dims_to_reshape"] = Algorithms::SubstituteExpandDimsToReshape; option_str_to_enum["substitute_pack_to_reshape"] = Algorithms::SubstitutePackToReshape; option_str_to_enum["substitute_padv2_to_pad"] = Algorithms::SubstitutePadV2ToPad; option_str_to_enum["substitute_splitv_to_split"] = Algorithms::SubstituteSplitVToSplit;