diff options
author | Manuel Bottini <manuel.bottini@arm.com> | 2019-12-10 15:28:40 +0000 |
---|---|---|
committer | Georgios Pinitas <georgios.pinitas@arm.com> | 2020-01-09 11:38:00 +0000 |
commit | 8481d833783589e70191c6388c93685b4fc4a0b8 (patch) | |
tree | 98e171bf013ad86bfe021bcc5c5a03e8634094d1 /src/core/CL/cl_kernels/roi_align_layer_quantized.cl | |
parent | a35980546c00ae1647ce033b061530607a5ad1e4 (diff) | |
download | ComputeLibrary-8481d833783589e70191c6388c93685b4fc4a0b8.tar.gz |
COMPMID-2753: Add support for QASYMM8_SIGNED in CL kernels/functions
Change-Id: I7ed2d43f33458ba0571323f6fa9dc2e45fcd672a
Signed-off-by: Manuel Bottini <manuel.bottini@arm.com>
Reviewed-on: https://review.mlplatform.org/c/2516
Comments-Addressed: Arm Jenkins <bsgcomp@arm.com>
Reviewed-by: Michele Di Giorgio <michele.digiorgio@arm.com>
Tested-by: Arm Jenkins <bsgcomp@arm.com>
Reviewed-by: Georgios Pinitas <georgios.pinitas@arm.com>
Diffstat (limited to 'src/core/CL/cl_kernels/roi_align_layer_quantized.cl')
-rw-r--r-- | src/core/CL/cl_kernels/roi_align_layer_quantized.cl | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/src/core/CL/cl_kernels/roi_align_layer_quantized.cl b/src/core/CL/cl_kernels/roi_align_layer_quantized.cl index 030731b7d3..8093623904 100644 --- a/src/core/CL/cl_kernels/roi_align_layer_quantized.cl +++ b/src/core/CL/cl_kernels/roi_align_layer_quantized.cl @@ -1,5 +1,5 @@ /* - * Copyright (c) 2019 ARM Limited. + * Copyright (c) 2019-2020 ARM Limited. * * SPDX-License-Identifier: MIT * @@ -86,16 +86,17 @@ inline DATA_TYPE roi_align_1x1(const Tensor3D *input, float region_start_x, const DATA_TYPE data3 = *(__global DATA_TYPE *)tensor3D_offset(input, x_low, y_high, pz); const DATA_TYPE data4 = *(__global DATA_TYPE *)tensor3D_offset(input, x_high, y_high, pz); #endif // defined(NHWC) - const float data1_f32 = dequantize_qasymm8(data1, OFFSET_IN, SCALE_IN); - const float data2_f32 = dequantize_qasymm8(data2, OFFSET_IN, SCALE_IN); - const float data3_f32 = dequantize_qasymm8(data3, OFFSET_IN, SCALE_IN); - const float data4_f32 = dequantize_qasymm8(data4, OFFSET_IN, SCALE_IN); + + const float data1_f32 = DEQUANTIZE(data1, OFFSET_IN, SCALE_IN, DATA_TYPE, 1); + const float data2_f32 = DEQUANTIZE(data2, OFFSET_IN, SCALE_IN, DATA_TYPE, 1); + const float data3_f32 = DEQUANTIZE(data3, OFFSET_IN, SCALE_IN, DATA_TYPE, 1); + const float data4_f32 = DEQUANTIZE(data4, OFFSET_IN, SCALE_IN, DATA_TYPE, 1); sum += w1 * data1_f32 + w2 * data2_f32 + w3 * data3_f32 + w4 * data4_f32; } } const float res_f32 = sum / (grid_size_x * grid_size_y); - return quantize_qasymm8(res_f32, OFFSET_OUT, SCALE_OUT); + return QUANTIZE(res_f32, OFFSET_OUT, SCALE_OUT, DATA_TYPE, 1); } /** Performs a roi align function. |