diff options
author | Eric Kunze <eric.kunze@arm.com> | 2022-06-07 05:17:37 +0000 |
---|---|---|
committer | Eric Kunze <eric.kunze@arm.com> | 2022-06-15 08:30:47 -0700 |
commit | bdcc3fee1b8bf55aac50e060115b92a1ccf9741c (patch) | |
tree | 05951f3fd1b9e42f859e999976715e6e673acb15 /schema/tosa.fbs | |
parent | a336d54aca08b06953a8b6c49d7e5f6c4899952e (diff) | |
download | serialization_lib-bdcc3fee1b8bf55aac50e060115b92a1ccf9741c.tar.gz |
Remove quantinfo types
Any needed information has been moved into the attributes for each operator.
This aligns with the structure of the attributes in the TOSA
specification, and generally simplifies the code.
Change-Id: I8243e91b09de1a9115f8af09c5e7def7e8f2866b
Signed-off-by: Eric Kunze <eric.kunze@arm.com>
Diffstat (limited to 'schema/tosa.fbs')
-rw-r--r-- | schema/tosa.fbs | 37 |
1 files changed, 17 insertions, 20 deletions
diff --git a/schema/tosa.fbs b/schema/tosa.fbs index 7830bd2..b342103 100644 --- a/schema/tosa.fbs +++ b/schema/tosa.fbs @@ -157,24 +157,33 @@ union Attribute { WhileLoopAttribute, TransposeAttribute, TableAttribute, + MatMulAttribute, + FullyConnectedAttribute, + NegateAttribute } table PoolAttribute { pad: [int32]; kernel: [int32]; stride: [int32]; + input_zp: int32; + output_zp: int32; } table ConvAttribute { pad: [int32]; stride: [int32]; dilation: [int32]; + input_zp: int32; + weight_zp: int32; } table TransposeConvAttribute { out_pad: [int32]; stride: [int32]; output_shape: [int32]; + input_zp: int32; + weight_zp: int32; } table PadAttribute { @@ -253,35 +262,24 @@ table TableAttribute { table: [int16]; } -union QuantInfo { - UnaryQuantInfo, - ConvQuantInfo, - MatMulQuantInfo, - PadQuantInfo, -} - -table UnaryQuantInfo { - input_zp: int32; - output_zp: int32; +table MatMulAttribute { + a_zp: int32; + b_zp: int32; } -table ConvQuantInfo { +table FullyConnectedAttribute { input_zp: int32; weight_zp: int32; } -table MatMulQuantInfo { - a_zp: int32; - b_zp: int32; -} - -table PadQuantInfo { - input_zp: int32; +table NegateAttribute { + input1_zp: int32; + output_zp: int32; } table Version { _major: int32 = 0; - _minor: int32 = 25; + _minor: int32 = 30; _patch: int32 = 0; _draft: bool = true; } @@ -298,7 +296,6 @@ table TosaOperator { attribute: Attribute; // union structure. operator attribute inputs:[string]; // list of input tensor names outputs:[string]; // list of output tensor names - quant_info: QuantInfo; // op-based quantization information } table TosaBasicBlock { |