From 3bfb7d77f8b7ae4c47b5023adece07572c86574e Mon Sep 17 00:00:00 2001 From: bokyeong lee Date: Mon, 7 Oct 2024 10:49:27 +0900 Subject: [PATCH] [res] Add TFLiteRecipe for Dynamic shape Range This commit adds TFLiteRecipe for dynamic shape Range. ONE-DCO-1.0-Signed-off-by: bokyeong lee --- compiler/common-artifacts/exclude.lst | 1 + .../Inf_Range_000/test.recipe | 41 +++++++++++++++++++ .../Inf_Range_000/test.rule | 5 +++ 3 files changed, 47 insertions(+) create mode 100644 res/TensorFlowLiteRecipes/Inf_Range_000/test.recipe create mode 100644 res/TensorFlowLiteRecipes/Inf_Range_000/test.rule diff --git a/compiler/common-artifacts/exclude.lst b/compiler/common-artifacts/exclude.lst index 07f6dc37a79..92c99814b89 100644 --- a/compiler/common-artifacts/exclude.lst +++ b/compiler/common-artifacts/exclude.lst @@ -52,6 +52,7 @@ tcgenerate(FullyConnected_U8_000) tcgenerate(GatherNd_000) tcgenerate(GatherNd_001) tcgenerate(Inf_Mul_000) # TestDataGenerator does not support unknown dimension +tcgenerate(Inf_Range_000) # TestDataGenerator does not support unknown dimension tcgenerate(L2Pool2D_U8_000) tcgenerate(Log_000) tcgenerate(MatMul_000) diff --git a/res/TensorFlowLiteRecipes/Inf_Range_000/test.recipe b/res/TensorFlowLiteRecipes/Inf_Range_000/test.recipe new file mode 100644 index 00000000000..54d62b5db91 --- /dev/null +++ b/res/TensorFlowLiteRecipes/Inf_Range_000/test.recipe @@ -0,0 +1,41 @@ +# range with non-const params +operand { + name: "start" + type: FLOAT32 + shape { dim: 1 } +} +operand { + name: "limit" + type: FLOAT32 + shape { } + filler { + tag: "constant" + arg: "10" + } +} +operand { + name: "delta" + type: FLOAT32 + shape { } + filler { + tag: "constant" + arg: "4" + } +} +operand { + name: "ofm" + type: FLOAT32 + shape { dim: 1 } + shape_signature { dim : -1 } +} +operation { + type: "Range" + range_options { + } + input: "start" + input: "limit" + input: "delta" + output: "ofm" +} +input: "start" +output: "ofm" diff --git a/res/TensorFlowLiteRecipes/Inf_Range_000/test.rule b/res/TensorFlowLiteRecipes/Inf_Range_000/test.rule new file mode 100644 index 00000000000..d1d6aaeca88 --- /dev/null +++ b/res/TensorFlowLiteRecipes/Inf_Range_000/test.rule @@ -0,0 +1,5 @@ +# To check if const params properly infered + +RULE "VERIFY_FILE_FORMAT" $(verify_file_format) '=' 1 + +RULE "RANGE_SHAPE" $(tensor_shape ofm) '=' [-1]