From 87534183980688c5bae748c24e39b09de4af5b55 Mon Sep 17 00:00:00 2001 From: sunki <96693975+qsunki@users.noreply.github.com> Date: Wed, 2 Oct 2024 18:44:41 +0900 Subject: [PATCH] [res] Add TFLiteRecipe for dynamic shape Multiply (#14147) This commit adds TFLiteRecipe for dynamic shape Multiply. ONE-DCO-1.0-Signed-off-by: sunki --- .../Inf_Mul_000/test.recipe | 30 +++++++++++++++++++ .../Inf_Mul_000/test.rule | 5 ++++ 2 files changed, 35 insertions(+) create mode 100644 res/TensorFlowLiteRecipes/Inf_Mul_000/test.recipe create mode 100644 res/TensorFlowLiteRecipes/Inf_Mul_000/test.rule diff --git a/res/TensorFlowLiteRecipes/Inf_Mul_000/test.recipe b/res/TensorFlowLiteRecipes/Inf_Mul_000/test.recipe new file mode 100644 index 00000000000..43c84226068 --- /dev/null +++ b/res/TensorFlowLiteRecipes/Inf_Mul_000/test.recipe @@ -0,0 +1,30 @@ +operand { + name: "ifm1" + type: FLOAT32 + shape { dim: 1 dim: 1 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]