aboutsummaryrefslogtreecommitdiff
path: root/src/armnnSerializer/ArmnnSchema.fbs
diff options
context:
space:
mode:
Diffstat (limited to 'src/armnnSerializer/ArmnnSchema.fbs')
-rw-r--r--src/armnnSerializer/ArmnnSchema.fbs93
1 files changed, 77 insertions, 16 deletions
diff --git a/src/armnnSerializer/ArmnnSchema.fbs b/src/armnnSerializer/ArmnnSchema.fbs
index ff79f6cffe..6e5ee3f3d3 100644
--- a/src/armnnSerializer/ArmnnSchema.fbs
+++ b/src/armnnSerializer/ArmnnSchema.fbs
@@ -155,7 +155,8 @@ enum LayerType : uint {
Comparison = 52,
StandIn = 53,
ElementwiseUnary = 54,
- Transpose = 55
+ Transpose = 55,
+ QLstm = 56
}
// Base layer table to be used as part of other layers
@@ -666,37 +667,96 @@ table LstmInputParams {
outputLayerNormWeights:ConstTensor;
}
-table QuantizedLstmInputParams {
- inputToInputWeights:ConstTensor;
+table LstmDescriptor {
+ activationFunc:uint;
+ clippingThresCell:float;
+ clippingThresProj:float;
+ cifgEnabled:bool = true;
+ peepholeEnabled:bool = false;
+ projectionEnabled:bool = false;
+ layerNormEnabled:bool = false;
+}
+
+table LstmLayer {
+ base:LayerBase;
+ descriptor:LstmDescriptor;
+ inputParams:LstmInputParams;
+}
+
+table QLstmInputParams {
+ // Mandatory
inputToForgetWeights:ConstTensor;
inputToCellWeights:ConstTensor;
inputToOutputWeights:ConstTensor;
- recurrentToInputWeights:ConstTensor;
recurrentToForgetWeights:ConstTensor;
recurrentToCellWeights:ConstTensor;
recurrentToOutputWeights:ConstTensor;
- inputGateBias:ConstTensor;
forgetGateBias:ConstTensor;
cellBias:ConstTensor;
outputGateBias:ConstTensor;
+
+ // CIFG
+ inputToInputWeights:ConstTensor;
+ recurrentToInputWeights:ConstTensor;
+ inputGateBias:ConstTensor;
+
+ // Projection
+ projectionWeights:ConstTensor;
+ projectionBias:ConstTensor;
+
+ // Peephole
+ cellToInputWeights:ConstTensor;
+ cellToForgetWeights:ConstTensor;
+ cellToOutputWeights:ConstTensor;
+
+ // Layer norm
+ inputLayerNormWeights:ConstTensor;
+ forgetLayerNormWeights:ConstTensor;
+ cellLayerNormWeights:ConstTensor;
+ outputLayerNormWeights:ConstTensor;
}
-table LstmDescriptor {
- activationFunc:uint;
- clippingThresCell:float;
- clippingThresProj:float;
- cifgEnabled:bool = true;
- peepholeEnabled:bool = false;
+table QLstmDescriptor {
+ cifgEnabled:bool = true;
+ peepholeEnabled:bool = false;
projectionEnabled:bool = false;
- layerNormEnabled:bool = false;
+ layerNormEnabled:bool = false;
+
+ cellClip:float;
+ projectionClip:float;
+
+ inputIntermediateScale:float;
+ forgetIntermediateScale:float;
+ cellIntermediateScale:float;
+ outputIntermediateScale:float;
+
+ hiddenStateZeroPoint:int;
+ hiddenStateScale:float;
}
-table LstmLayer {
+table QLstmLayer {
base:LayerBase;
- descriptor:LstmDescriptor;
- inputParams:LstmInputParams;
+ descriptor:QLstmDescriptor;
+ inputParams:QLstmInputParams;
+}
+
+table QuantizedLstmInputParams {
+ inputToInputWeights:ConstTensor;
+ inputToForgetWeights:ConstTensor;
+ inputToCellWeights:ConstTensor;
+ inputToOutputWeights:ConstTensor;
+
+ recurrentToInputWeights:ConstTensor;
+ recurrentToForgetWeights:ConstTensor;
+ recurrentToCellWeights:ConstTensor;
+ recurrentToOutputWeights:ConstTensor;
+
+ inputGateBias:ConstTensor;
+ forgetGateBias:ConstTensor;
+ cellBias:ConstTensor;
+ outputGateBias:ConstTensor;
}
table QuantizedLstmLayer {
@@ -836,7 +896,8 @@ union Layer {
ComparisonLayer,
StandInLayer,
ElementwiseUnaryLayer,
- TransposeLayer
+ TransposeLayer,
+ QLstmLayer
}
table AnyLayer {