-
Notifications
You must be signed in to change notification settings - Fork 157
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[res] CircleRecipes and TFLiteRecipes added for RmsNorm (#14022)
This commit adds RmsNorm test recipe in CircleRecipes/TFLiteRecipes. ONE-DCO-1.0-Signed-off-by: Seockho Kim [email protected]
- Loading branch information
1 parent
273f81f
commit 82a7d90
Showing
4 changed files
with
170 additions
and
0 deletions.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
operand { | ||
name: "ifm" | ||
type: FLOAT32 | ||
shape { dim: 1 dim: 3 dim: 3 dim: 4 } | ||
} | ||
operand { | ||
name: "gamma" | ||
type: FLOAT32 | ||
shape { dim: 4 } | ||
filler { | ||
tag: "explicit" | ||
arg: "1.0" | ||
arg: "1.0" | ||
arg: "1.0" | ||
arg: "1.0" | ||
} | ||
} | ||
operand { | ||
name: "beta" | ||
type: FLOAT32 | ||
shape { dim: 4 } | ||
filler { | ||
tag: "explicit" | ||
arg: "0.0" | ||
arg: "0.0" | ||
arg: "0.0" | ||
arg: "0.0" | ||
} | ||
} | ||
operand { | ||
name: "ofm" | ||
type: FLOAT32 | ||
shape { dim: 1 dim: 3 dim: 3 dim: 4 } | ||
} | ||
operation { | ||
type: "RmsNorm" | ||
input: "ifm" | ||
input: "gamma" | ||
input: "beta" | ||
output: "ofm" | ||
rms_norm_options { | ||
epsilon: 0.0001 | ||
} | ||
} | ||
input: "ifm" | ||
output: "ofm" |
Empty file.
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,117 @@ | ||
operand { | ||
name: "Input" | ||
type: FLOAT32 | ||
shape { | ||
dim: 1 | ||
dim: 1 | ||
dim: 4 | ||
} | ||
} | ||
operand { | ||
name: "RmsNorm/Mul/Square" | ||
type: FLOAT32 | ||
shape { | ||
dim: 1 | ||
dim: 1 | ||
dim: 4 | ||
} | ||
} | ||
operand { | ||
name: "RmsNorm/Mean/Axis" | ||
type: INT32 | ||
shape { | ||
} | ||
filler { | ||
tag: "explicit" | ||
arg: "-1" | ||
} | ||
} | ||
operand { | ||
name: "RmsNorm/Mean/MeanSquare" | ||
type: FLOAT32 | ||
shape { | ||
dim: 1 | ||
dim: 1 | ||
dim: 1 | ||
} | ||
} | ||
operand { | ||
name: "RmsNorm/Add/Epsilon" | ||
type: FLOAT32 | ||
shape { | ||
} | ||
filler { | ||
tag: "explicit" | ||
arg: "1e-06" | ||
} | ||
} | ||
operand { | ||
name: "RmsNorm/Add/MeanSquare_plus_eps" | ||
type: FLOAT32 | ||
shape { | ||
dim: 1 | ||
dim: 1 | ||
dim: 1 | ||
} | ||
} | ||
operand { | ||
name: "RmsNorm/Sqrt/RMS" | ||
type: FLOAT32 | ||
shape { | ||
dim: 1 | ||
dim: 1 | ||
dim: 1 | ||
} | ||
} | ||
operand { | ||
name: "RmsNorm/Mul/RmsNorm" | ||
type: FLOAT32 | ||
shape { | ||
dim: 1 | ||
dim: 1 | ||
dim: 4 | ||
} | ||
} | ||
operation { | ||
type: "Mul" | ||
input: "Input" | ||
input: "Input" | ||
output: "RmsNorm/Mul/Square" | ||
mul_options { | ||
activation: NONE | ||
} | ||
} | ||
operation { | ||
type: "Mean" | ||
input: "RmsNorm/Mul/Square" | ||
input: "RmsNorm/Mean/Axis" | ||
output: "RmsNorm/Mean/MeanSquare" | ||
mean_options { | ||
keep_dims: true | ||
} | ||
} | ||
operation { | ||
type: "Add" | ||
input: "RmsNorm/Mean/MeanSquare" | ||
input: "RmsNorm/Add/Epsilon" | ||
output: "RmsNorm/Add/MeanSquare_plus_eps" | ||
add_options { | ||
activation: NONE | ||
} | ||
} | ||
operation { | ||
type: "Rsqrt" | ||
input: "RmsNorm/Add/MeanSquare_plus_eps" | ||
output: "RmsNorm/Sqrt/RMS" | ||
} | ||
operation { | ||
type: "Mul" | ||
input: "Input" | ||
input: "RmsNorm/Sqrt/RMS" | ||
output: "RmsNorm/Mul/RmsNorm" | ||
mul_options { | ||
activation: NONE | ||
} | ||
} | ||
input: "Input" | ||
output: "RmsNorm/Mul/RmsNorm" |
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,7 @@ | ||
# To check if this network is converted to circle RmsNorm op | ||
|
||
RULE "VERIFY_FILE_FORMAT" $(verify_file_format) '=' 1 | ||
|
||
RULE "RMS_NORM_EXIST" $(op_count RMS_NORM) '=' 1 | ||
RULE "NO_ADD" $(op_count ADD) '=' 0 | ||
RULE "NO_MUL" $(op_count MUL) '=' 0 |