blob: 39dc1012f75c2b20cc2cda91f41d1e0135cfe123 [file] [log] [blame]
Eric Kunzee5e26762020-10-13 16:11:07 -07001
2// Copyright (c) 2020, ARM Limited.
3//
4// Licensed under the Apache License, Version 2.0 (the "License");
5// you may not use this file except in compliance with the License.
6// You may obtain a copy of the License at
7//
8// http://www.apache.org/licenses/LICENSE-2.0
9//
10// Unless required by applicable law or agreed to in writing, software
11// distributed under the License is distributed on an "AS IS" BASIS,
12// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13// See the License for the specific language governing permissions and
14// limitations under the License.
15
16/*
17 Syntax:
18 DEF_QUANTIZATION_INFO(NAME, NUM_ARGS_IN_OPTIONS, ARG0_TYPE, ARG0_SCALAR_OR_VECTOR, ARGS0_NAME, ...)
19
20 Description:
21 NAME: corresponding quantization info name, must match corresponding "table XXXQuantInfo" in tosa.fbs
22 NUM_ARGS_IN_QINFO: number of arguments in this quantization info
23 ARG0_TYPE: data type of arg0
24 ARG0_SCALAR_OR_VECTOR: is arg0 a scalar (S) or a vector (V)
25 ARG0_NAME: name of arg0
26 ...: variadic variables for more arguments, depending on NUM_ARGS_IN_QINFO
27*/
28
29
30DEF_QUANTIZATION_INFO(Unary, 2,
31 int32_t, S, input_zp,
32 int32_t, S, output_zp)
33
34DEF_QUANTIZATION_INFO(Conv, 2,
35 int32_t, S, input_zp,
36 int32_t, S, weight_zp)
37
38DEF_QUANTIZATION_INFO(MatMul, 2,
39 int32_t, S, a_zp,
40 int32_t, S, b_zp)
41
42DEF_QUANTIZATION_INFO(Pad, 1,
43 int32_t, S, input_zp)