From 3683c785f2bd407970193d436b90181bad2ff322 Mon Sep 17 00:00:00 2001 From: Lev Proleev Date: Fri, 1 Nov 2019 17:24:02 +0000 Subject: Add QUANT8_ASYMM_SIGNED support to SELECT op Also fix repo hook complaining about comment formatting. Bug: 143935354 Test: NNTest_static and VTS_1_3 with --gtest_filter="*QuantizationCouplingTest*select*" Change-Id: I1b0d1e987ebccc6700dd172b4222f9996105513d Merged-In: I1b0d1e987ebccc6700dd172b4222f9996105513d (cherry picked from commit 04bf939c7ad760457bb811dafd5ac362624c0ad0) --- neuralnetworks/1.2/types.hal | 11 ++++++----- neuralnetworks/1.3/types.hal | 15 +++++++++------ 2 files changed, 15 insertions(+), 11 deletions(-) (limited to 'neuralnetworks') diff --git a/neuralnetworks/1.2/types.hal b/neuralnetworks/1.2/types.hal index 837ced5b48..ef71ea8712 100644 --- a/neuralnetworks/1.2/types.hal +++ b/neuralnetworks/1.2/types.hal @@ -2448,15 +2448,17 @@ enum OperationType : int32_t { * then clipping is disabled. * If all the input tensors have type {@link OperandType::TENSOR_FLOAT32}, * this scalar must be of the type {@link OperandType::FLOAT32}, - * otherwise if all the input tensors have the type {@link OperandType::TENSOR_FLOAT16}, - * this scalar must be of type {@link OperandType::FLOAT16}. + * otherwise if all the input tensors have the type + * {@link OperandType::TENSOR_FLOAT16}, this scalar must be + * of type {@link OperandType::FLOAT16}. * * 50: The clipping threshold for the output from the * projection layer, such that values are bound within * [-proj_clip, proj_clip]. If set to 0.0 then clipping is disabled. * If all the input tensors have type {@link OperandType::TENSOR_FLOAT32}, * this scalar must be of the type {@link OperandType::FLOAT32}, - * otherwise if all the input tensors have the type {@link OperandType::TENSOR_FLOAT16}, - * this scalar must be of type {@link OperandType::FLOAT16}. + * otherwise if all the input tensors have the type + * {@link OperandType::TENSOR_FLOAT16}, this scalar must be + * of type {@link OperandType::FLOAT16}. * * 51: merge_outputs * An {@link OperandType::BOOL} scalar specifying if the outputs * from forward and backward cells should be merged. @@ -4124,7 +4126,6 @@ enum OperationType : int32_t { * * 0: A tensor of the same type and shape as input1 and input2. * For a {@link OperandType::TENSOR_QUANT8_ASYMM} tensor, * the scale and zeroPoint can be different from inputs' scale and zeroPoint. - * */ SELECT = 84, diff --git a/neuralnetworks/1.3/types.hal b/neuralnetworks/1.3/types.hal index 7df14b18f6..f959e45b5a 100644 --- a/neuralnetworks/1.3/types.hal +++ b/neuralnetworks/1.3/types.hal @@ -2375,15 +2375,17 @@ enum OperationType : int32_t { * then clipping is disabled. * If all the input tensors have type {@link OperandType::TENSOR_FLOAT32}, * this scalar must be of the type {@link OperandType::FLOAT32}, - * otherwise if all the input tensors have the type {@link OperandType::TENSOR_FLOAT16}, - * this scalar must be of type {@link OperandType::FLOAT16}. + * otherwise if all the input tensors have the type + * {@link OperandType::TENSOR_FLOAT16}, this scalar must be + * of type {@link OperandType::FLOAT16}. * * 50: The clipping threshold for the output from the * projection layer, such that values are bound within * [-proj_clip, proj_clip]. If set to 0.0 then clipping is disabled. * If all the input tensors have type {@link OperandType::TENSOR_FLOAT32}, * this scalar must be of the type {@link OperandType::FLOAT32}, - * otherwise if all the input tensors have the type {@link OperandType::TENSOR_FLOAT16}, - * this scalar must be of type {@link OperandType::FLOAT16}. + * otherwise if all the input tensors have the type + * {@link OperandType::TENSOR_FLOAT16}, this scalar must be + * of type {@link OperandType::FLOAT16}. * * 51: merge_outputs * An {@link OperandType::BOOL} scalar specifying if the outputs * from forward and backward cells should be merged. @@ -4034,6 +4036,7 @@ enum OperationType : int32_t { * * {@link OperandType::TENSOR_FLOAT32} * * {@link OperandType::TENSOR_INT32} * * {@link OperandType::TENSOR_QUANT8_ASYMM} + * * {@link OperandType::TENSOR_QUANT8_ASYMM_SIGNED} (since HAL version 1.3) * * Supported tensor rank: from 1 * @@ -4044,14 +4047,14 @@ enum OperationType : int32_t { * true) or input2 (if false). * * 1: An input tensor of the same shape as input0. * * 2: An input tensor of the same shape and type as input1. - * For a {@link OperandType::TENSOR_QUANT8_ASYMM} tensor, + * For a {@link OperandType::TENSOR_QUANT8_ASYMM} + * and {@link OperandType::TENSOR_QUANT8_ASYMM_SIGNED} tensor, * the scales and zeroPoint can be different from input1 scale and zeroPoint. * * Outputs: * * 0: A tensor of the same type and shape as input1 and input2. * For a {@link OperandType::TENSOR_QUANT8_ASYMM} tensor, * the scale and zeroPoint can be different from inputs' scale and zeroPoint. - * */ SELECT = @1.2::OperationType:SELECT, -- cgit v1.2.3