Skip to content

Commit

Permalink
[res] Introduce extype and custom_code for custom operators (#11764)
Browse files Browse the repository at this point in the history
This introduces extype and custom_code for custom operators.

ONE-DCO-1.0-Signed-off-by: SeungHui Lee <[email protected]>
  • Loading branch information
Seunghui98 authored Oct 25, 2023
1 parent b52c094 commit 6fc769a
Show file tree
Hide file tree
Showing 15 changed files with 34 additions and 0 deletions.
2 changes: 2 additions & 0 deletions res/TensorFlowLiteRecipes/All_000/test.recipe
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ operation {
input: "ifm"
input: "All/reduction_indices"
output: "ofm"
custom_code: "All"
extype: "Custom"
}
input: "ifm"
output: "ofm"
2 changes: 2 additions & 0 deletions res/TensorFlowLiteRecipes/BatchMatMulV2_000/test.recipe
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ operation {
input: "ifm1"
input: "ifm2"
output: "ofm"
custom_code: "BatchMatMulV2"
extype: "Custom"
}
input: "ifm1"
input: "ifm2"
Expand Down
2 changes: 2 additions & 0 deletions res/TensorFlowLiteRecipes/BatchMatMulV2_001/test.recipe
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ operation {
input: "ifm1"
input: "ifm2"
output: "ofm"
custom_code: "BatchMatMulV2"
extype: "Custom"
}
input: "ifm1"
input: "ifm2"
Expand Down
2 changes: 2 additions & 0 deletions res/TensorFlowLiteRecipes/BroadcastTo_000/test.recipe
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ operation {
input: "bc_input"
input: "bc_shape"
output: "bc_ofm"
custom_code: "BroadcastTo"
extype: "Custom"
}
input: "bc_input"
output: "bc_ofm"
2 changes: 2 additions & 0 deletions res/TensorFlowLiteRecipes/MatMul_000/test.recipe
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ operation {
transpose_a: true
transpose_b: false
}
custom_code: "MatMul"
extype: "Custom"
}
input: "ifm1"
input: "ifm2"
Expand Down
2 changes: 2 additions & 0 deletions res/TensorFlowLiteRecipes/MatrixBandPart_000/test.recipe
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ operation {
input: "MatrixBandPart/num_lower"
input: "MatrixBandPart/num_upper"
output: "ofm"
custom_code: "MatrixBandPart"
extype: "Custom"
}
input: "ifm"
output: "ofm"
2 changes: 2 additions & 0 deletions res/TensorFlowLiteRecipes/MaxPoolWithArgmax_000/test.recipe
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ operation {
output_type: INT64
include_batch_in_index: false
}
custom_code: "MaxPoolWithArgmax"
extype: "Custom"
}
input: "ifm"
output: "ofm"
Expand Down
2 changes: 2 additions & 0 deletions res/TensorFlowLiteRecipes/MaxPoolWithArgmax_001/test.recipe
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ operation {
output_type: INT32
include_batch_in_index: false
}
custom_code: "MaxPoolWithArgmax"
extype: "Custom"
}
input: "ifm"
output: "ofm"
Expand Down
2 changes: 2 additions & 0 deletions res/TensorFlowLiteRecipes/MaxPoolWithArgmax_002/test.recipe
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ operation {
output_type: INT64
include_batch_in_index: false
}
custom_code: "MaxPoolWithArgmax"
extype: "Custom"
}
input: "ifm"
output: "ofm"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ operation {
input: "bc_input"
input: "bc_shape"
output: "bc_ofm"
custom_code: "BroadcastTo"
extype: "Custom"
}
operand {
name: "reshape_data"
Expand Down Expand Up @@ -57,6 +59,8 @@ operation {
input: "bc_ofm"
input: "reshape_ofm"
output: "ofm"
custom_code: "AddV2"
extype: "Custom"
}
input: "bc_input"
input: "reshape_data"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ operation {
input: "bc_input"
input: "bc_shape"
output: "bc_ofm"
custom_code: "BroadcastTo"
extype: "Custom"
}
operand {
name: "reshape_data"
Expand Down Expand Up @@ -57,6 +59,8 @@ operation {
input: "bc_ofm"
input: "reshape_ofm"
output: "ofm"
custom_code: "AddV2"
extype: "Custom"
}
input: "bc_input"
input: "reshape_data"
Expand Down
2 changes: 2 additions & 0 deletions res/TensorFlowLiteRecipes/Net_FC_Gelu_FC_000/test.recipe
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,8 @@ operation {
type: "Erf"
input: "fc2"
output: "erf"
custom_code: "Erf"
extype: "Custom"
}
operation {
type: "Add"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,8 @@ operation {
input: "ofm_sparse"
input: "add_v2_2"
output: "ofm_add_v2"
custom_code: "AddV2"
extype: "Custom"
}
operation {
type: "Cast"
Expand Down
2 changes: 2 additions & 0 deletions res/TensorFlowLiteRecipes/Net_Gelu_000/test.recipe
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,8 @@ operation {
type: "Erf"
input: "mul_sqrt"
output: "erf"
custom_code: "Erf"
extype: "Custom"
}
operation {
type: "Add"
Expand Down
2 changes: 2 additions & 0 deletions res/TensorFlowLiteRecipes/Net_Gelu_001/test.recipe
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,8 @@ operation {
type: "Erf"
input: "mul_sqrt"
output: "erf"
custom_code: "Erf"
extype: "Custom"
}
operation {
type: "Add"
Expand Down

0 comments on commit 6fc769a

Please sign in to comment.