From bdcc3fee1b8bf55aac50e060115b92a1ccf9741c Mon Sep 17 00:00:00 2001 From: Eric Kunze Date: Tue, 7 Jun 2022 05:17:37 +0000 Subject: 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 --- schema/tosa.fbs | 37 +++++++++++++++++-------------------- 1 file changed, 17 insertions(+), 20 deletions(-) (limited to 'schema/tosa.fbs') 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 { -- cgit v1.2.1