Skip to content

Commit

Permalink
[res] Add TFLiteRecipe for dynamic shape Multiply
Browse files Browse the repository at this point in the history
This commit adds TFLiteRecipe for dynamic shape Multiply.

ONE-DCO-1.0-Signed-off-by: sunki <[email protected]>
  • Loading branch information
qsunki committed Oct 2, 2024
1 parent ced67ad commit fde0536
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 0 deletions.
1 change: 1 addition & 0 deletions compiler/common-artifacts/exclude.lst
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
30 changes: 30 additions & 0 deletions res/TensorFlowLiteRecipes/Inf_Mul_000/test.recipe
Original file line number Diff line number Diff line change
@@ -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: 4 dim: 1 dim: 1 }
shape_signature { dim: 1 dim: 4 dim: -1 dim: -1}
}
operation {
type: "Mul"
input: "ifm1"
input: "ifm2"
output: "ofm"
mul_options {
activation: NONE
}
}
input: "ifm1"
input: "ifm2"
output: "ofm"
5 changes: 5 additions & 0 deletions res/TensorFlowLiteRecipes/Inf_Mul_000/test.rule
Original file line number Diff line number Diff line change
@@ -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,4,-1,-1]

0 comments on commit fde0536

Please sign in to comment.