-
Notifications
You must be signed in to change notification settings - Fork 141
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Artem Balyshev
committed
Apr 25, 2024
1 parent
8974450
commit faf419e
Showing
7 changed files
with
184 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
66 changes: 66 additions & 0 deletions
66
res/TensorFlowLiteRecipes/Net_FullyConnected_Mul_000/test.recipe
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
operand { | ||
name: "ifm" | ||
type: FLOAT32 | ||
shape { dim: 1 dim: 8 } | ||
} | ||
operand { | ||
name: "mul_ifm" | ||
type: FLOAT32 | ||
shape { dim: 1 dim: 16 } | ||
filler { | ||
tag: "gaussian" | ||
arg: "0.0" | ||
arg: "1.0" | ||
} | ||
} | ||
operand { | ||
name: "fc_wgt" | ||
type: FLOAT32 | ||
shape { dim: 16 dim: 8 } | ||
filler { | ||
tag: "gaussian" | ||
arg: "0.0" | ||
arg: "1.0" | ||
} | ||
} | ||
operand { | ||
name: "fc_bias" | ||
type: FLOAT32 | ||
shape { dim: 16 } | ||
filler { | ||
tag: "gaussian" | ||
arg: "0.0" | ||
arg: "1.0" | ||
} | ||
} | ||
operand { | ||
name: "fc" | ||
type: FLOAT32 | ||
shape { dim: 1 dim: 16 } | ||
} | ||
operand { | ||
name: "ofm" | ||
type: FLOAT32 | ||
shape { dim: 1 dim: 16 } | ||
} | ||
operation { | ||
type: "FullyConnected" | ||
fullyconnected_options { | ||
activation: NONE | ||
} | ||
input: "ifm" | ||
input: "fc_wgt" | ||
input: "fc_bias" | ||
output: "fc" | ||
} | ||
operation { | ||
type: "Mul" | ||
input: "mul_ifm" | ||
input: "fc" | ||
output: "ofm" | ||
mul_options { | ||
activation: NONE | ||
} | ||
} | ||
input: "ifm" | ||
output: "ofm" |
6 changes: 6 additions & 0 deletions
6
res/TensorFlowLiteRecipes/Net_FullyConnected_Mul_000/test.rule
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
# To check if Mul is fused | ||
|
||
RULE "VERIFY_FILE_FORMAT" $(verify_file_format) '=' 1 | ||
|
||
RULE "FC_EXIST" $(op_count FULLY_CONNECTED) '=' 1 | ||
RULE "NO_MUL" $(op_count MUL) '=' 0 |
102 changes: 102 additions & 0 deletions
102
res/TensorFlowLiteRecipes/Net_StridedSlices_Neg_000/test.recipe
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,102 @@ | ||
operand { | ||
name: "ifm" | ||
type: FLOAT32 | ||
shape { dim: 1 dim: 1 dim: 4 } | ||
} | ||
operand { | ||
name: "begin" | ||
type: INT32 | ||
shape { dim: 3 } | ||
filler { tag: "explicit" arg: "0" arg: "0" arg: "0" } | ||
} | ||
operand { | ||
name: "end" | ||
type: INT32 | ||
shape { dim: 3 } | ||
filler { tag: "explicit" arg: "1" arg: "1" arg: "2" } | ||
} | ||
operand { | ||
name: "strides" | ||
type: INT32 | ||
shape { dim: 3 } | ||
filler { tag: "explicit" arg: "1" arg: "1" arg: "1" } | ||
} | ||
operand { | ||
name: "output_1" | ||
type: FLOAT32 | ||
shape { dim: 1 dim: 1 dim: 2 } | ||
} | ||
operation { | ||
type: "StridedSlice" | ||
strided_slice_options { | ||
begin_mask: 0 | ||
end_mask: 0 | ||
ellipsis_mask: 0 | ||
new_axis_mask: 0 | ||
shrink_axis_mask: 0 | ||
} | ||
input: "ifm" | ||
input: "begin" | ||
input: "end" | ||
input: "strides" | ||
output: "output_1" | ||
} | ||
operand { | ||
name: "begin_2" | ||
type: INT32 | ||
shape { dim: 3 } | ||
filler { tag: "explicit" arg: "0" arg: "0" arg: "2" } | ||
} | ||
operand { | ||
name: "end_2" | ||
type: INT32 | ||
shape { dim: 3 } | ||
filler { tag: "explicit" arg: "1" arg: "1" arg: "4" } | ||
} | ||
operand { | ||
name: "output_2" | ||
type: FLOAT32 | ||
shape { dim: 1 dim:1 dim: 2 } | ||
} | ||
operation { | ||
type: "StridedSlice" | ||
strided_slice_options { | ||
begin_mask: 0 | ||
end_mask: 0 | ||
ellipsis_mask: 0 | ||
new_axis_mask: 0 | ||
shrink_axis_mask: 0 | ||
} | ||
input: "ifm" | ||
input: "begin_2" | ||
input: "end_2" | ||
input: "strides" | ||
output: "output_2" | ||
} | ||
operand { | ||
name: "output_neg" | ||
type: FLOAT32 | ||
shape { dim: 1 dim: 1 dim: 2 } | ||
} | ||
operation { | ||
type: "Neg" | ||
input: "output_2" | ||
output: "output_neg" | ||
} | ||
operand { | ||
name: "ofm" | ||
type: FLOAT32 | ||
shape { dim: 1 dim: 1 dim: 4 } | ||
} | ||
operation { | ||
type: "Concatenation" | ||
concatenation_options { | ||
axis: -1 | ||
activation: NONE | ||
} | ||
input: "output_1" | ||
input: "output_neg" | ||
output: "ofm" | ||
} | ||
input: "ifm" | ||
output: "ofm" |
5 changes: 5 additions & 0 deletions
5
res/TensorFlowLiteRecipes/Net_StridedSlices_Neg_000/test.rule
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# To check if StridedSlicesNeg pattern fused as mul. | ||
|
||
RULE "VERIFY_FILE_FORMAT" $(verify_file_format) '=' 1 | ||
RULE "MUL_EXIST" $(op_count MUL) '=' 1 | ||
RULE "NO_STRIDEDSLICES" $(op_count STRIDEDSLICE) '=' 0 |