From bfb9c6fb0846c66d284e9ef28ef383d56b1da01d Mon Sep 17 00:00:00 2001 From: icodo98 Date: Mon, 23 Sep 2024 12:14:58 +0900 Subject: [PATCH] [dredd] add comma ONE-DCO-1.0-Signed-off-by: JuYoung Lee rsb98759@gmail.com --- compiler/circle-inspect/src/Dump.cpp | 4 ++++ compiler/circle2circle-dredd-recipe-test/test.lst | 1 + res/TensorFlowLiteRecipes/Pad_002/test.recipe | 8 ++++---- res/TensorFlowLiteRecipes/Pad_002/test.rule | 2 +- 4 files changed, 10 insertions(+), 5 deletions(-) diff --git a/compiler/circle-inspect/src/Dump.cpp b/compiler/circle-inspect/src/Dump.cpp index aa1f0673274..5bd18ea31d5 100644 --- a/compiler/circle-inspect/src/Dump.cpp +++ b/compiler/circle-inspect/src/Dump.cpp @@ -264,6 +264,10 @@ void DumpTensorShape::run(std::ostream &os, const circle::Model *model, for (int8_t i = 0; i < shape->size(); i++) { os << shape->Get(i); + if (i != shape->size() - 1) + { + os << ","; + } } os << std::endl; } diff --git a/compiler/circle2circle-dredd-recipe-test/test.lst b/compiler/circle2circle-dredd-recipe-test/test.lst index 0a8d893c43b..6059effc528 100644 --- a/compiler/circle2circle-dredd-recipe-test/test.lst +++ b/compiler/circle2circle-dredd-recipe-test/test.lst @@ -96,6 +96,7 @@ Add(PadV2_001 PASS substitute_padv2_to_pad) Add(Softmax_001 PASS decompose_softmax) Add(Softmax_002 PASS decompose_softmax) Add(StridedSlice_003 PASS substitute_strided_slice_to_reshape) +Add(Pad_002 PASS) # CSE test diff --git a/res/TensorFlowLiteRecipes/Pad_002/test.recipe b/res/TensorFlowLiteRecipes/Pad_002/test.recipe index 3e4ba359bf1..f22f13510c0 100644 --- a/res/TensorFlowLiteRecipes/Pad_002/test.recipe +++ b/res/TensorFlowLiteRecipes/Pad_002/test.recipe @@ -2,8 +2,8 @@ operand { name: "ifm" type: FLOAT32 - shape { dim: 1 dim: 3 dim: 3 dim: 2 } - shape_signature { dim: -1 dim: 3 dim: 3 dim: 2 } + shape { dim: 1 dim: 1 dim: 3 dim: 2 } + shape_signature { dim: 1 dim: -1 dim: 3 dim: 2 } } operand { name: "padding" @@ -20,8 +20,8 @@ operand { operand { name: "ofm" type: FLOAT32 - shape { dim: 1 dim: 5 dim: 7 dim: 2 } - shape_signature { dim: -1 dim: 5 dim: 7 dim: 2 } + shape { dim: 1 dim: 1 dim: 7 dim: 2 } + shape_signature { dim: 1 dim: -1 dim: 7 dim: 2 } } operation { type: "Pad" diff --git a/res/TensorFlowLiteRecipes/Pad_002/test.rule b/res/TensorFlowLiteRecipes/Pad_002/test.rule index 08d53a1d691..62625045543 100644 --- a/res/TensorFlowLiteRecipes/Pad_002/test.rule +++ b/res/TensorFlowLiteRecipes/Pad_002/test.rule @@ -3,4 +3,4 @@ RULE "VERIFY_FILE_FORMAT" $(verify_file_format) '=' 1 RULE "PAD_EXIST" $(op_count PAD) '=' 1 -RULE "PAD_SHAPE" $(tensor_shape ofm) '=' -1572 +RULE "PAD_SHAPE" $(tensor_shape ofm) '=' 1,-1,7,2