From 4aade1d7330e8d050e497d71b0d55f79af6a005f Mon Sep 17 00:00:00 2001 From: sunki <ajsthfldu@outlook.com> Date: Mon, 30 Sep 2024 14:39:25 +0900 Subject: [PATCH 1/2] [res] Add TFLiteRecipe for dynamic shape Multiply This commit adds TFLiteRecipe for dynamic shape Multiply. ONE-DCO-1.0-Signed-off-by: sunki <ajsthfldu@outlook.com> This fixes Inf_Mul_000 recipe. ONE-DCO-1.0-Signed-off-by: sunki <ajsthfldu@outlook.com> --- compiler/common-artifacts/exclude.lst | 1 + .../Inf_Mul_000/test.recipe | 30 +++++++++++++++++++ .../Inf_Mul_000/test.rule | 5 ++++ 3 files changed, 36 insertions(+) create mode 100644 res/TensorFlowLiteRecipes/Inf_Mul_000/test.recipe create mode 100644 res/TensorFlowLiteRecipes/Inf_Mul_000/test.rule diff --git a/compiler/common-artifacts/exclude.lst b/compiler/common-artifacts/exclude.lst index 4b934277853..6ee23916ee4 100644 --- a/compiler/common-artifacts/exclude.lst +++ b/compiler/common-artifacts/exclude.lst @@ -51,6 +51,7 @@ tcgenerate(FullyConnected_I4_002) tcgenerate(FullyConnected_U8_000) tcgenerate(GatherNd_000) tcgenerate(GatherNd_001) +tcgenerate(Inf_Mul_000) # TestDataGenerator does not support unknown dimension tcgenerate(L2Pool2D_U8_000) tcgenerate(Log_000) tcgenerate(MatMul_000) diff --git a/res/TensorFlowLiteRecipes/Inf_Mul_000/test.recipe b/res/TensorFlowLiteRecipes/Inf_Mul_000/test.recipe new file mode 100644 index 00000000000..8fab1b7cda7 --- /dev/null +++ b/res/TensorFlowLiteRecipes/Inf_Mul_000/test.recipe @@ -0,0 +1,30 @@ +operand { + name: "ifm1" + type: FLOAT32 + shape { dim: 1 dim: 4 dim: 1 dim: 1 } + shape_signature { dim: 1 dim: -1 dim: -1 dim: -1} +} +operand { + name: "ifm2" + type: FLOAT32 + shape { dim: 1 dim: 1 dim: 4 dim: 1} + shape_signature { dim: 1 dim: -1 dim: 4 dim: -1} +} +operand { + name: "ofm" + type: FLOAT32 + shape { dim: 1 dim: 1 dim: 4 dim: 1 } + shape_signature { dim: 1 dim: -1 dim: 4 dim: -1} +} +operation { + type: "Mul" + input: "ifm1" + input: "ifm2" + output: "ofm" + mul_options { + activation: NONE + } +} +input: "ifm1" +input: "ifm2" +output: "ofm" diff --git a/res/TensorFlowLiteRecipes/Inf_Mul_000/test.rule b/res/TensorFlowLiteRecipes/Inf_Mul_000/test.rule new file mode 100644 index 00000000000..50009329484 --- /dev/null +++ b/res/TensorFlowLiteRecipes/Inf_Mul_000/test.rule @@ -0,0 +1,5 @@ +# To check if dynamic dimension properly inferred + +RULE "VERIFY_FILE_FORMAT" $(verify_file_format) '=' 1 + +RULE "MUL_SHAPE" $(tensor_shape ofm) '=' [1,-1,4,-1] From d7ad88a02451689b8bdcbfe30c912692c8b83630 Mon Sep 17 00:00:00 2001 From: sunki <ajsthfldu@outlook.com> Date: Wed, 2 Oct 2024 12:56:33 +0900 Subject: [PATCH 2/2] [circle2circle-dredd-recipe-test] Add Inf_Mul_000 test This commit adds Inf_Mul_000 to circle2circle-dredd-recipe-test ONE-DCO-1.0-Signed-off-by: sunki <ajsthfldu@outlook.com> --- compiler/circle2circle-dredd-recipe-test/test.lst | 1 + 1 file changed, 1 insertion(+) diff --git a/compiler/circle2circle-dredd-recipe-test/test.lst b/compiler/circle2circle-dredd-recipe-test/test.lst index 66441c0881c..51f76e958e5 100644 --- a/compiler/circle2circle-dredd-recipe-test/test.lst +++ b/compiler/circle2circle-dredd-recipe-test/test.lst @@ -147,3 +147,4 @@ Add(REGRESS_Issue_13863 PASS substitute_pack_to_reshape) # SHAPE INFERENCE test Add(Inf_Pad_000 PASS) +Add(Inf_Mul_000 PASS)