From 7485d5a62685cb745ab50e970adb722cb71557ac Mon Sep 17 00:00:00 2001 From: Vidhya Sudhan Loganathan Date: Wed, 4 Jul 2018 09:34:00 +0100 Subject: COMPMID-970 : Remove QS8 / QS16 support Removed fixed point related code. Change-Id: I487acf138dace3b0450e0d72ca7071eaec254566 Reviewed-on: https://eu-gerrit-1.euhpc.arm.com/137678 Tested-by: Jenkins Reviewed-by: Anthony Barbier --- src/core/GLES_COMPUTE/kernels/GCActivationLayerKernel.cpp | 3 +-- .../GLES_COMPUTE/kernels/GCBatchNormalizationLayerKernel.cpp | 6 +----- .../kernels/GCDepthwiseConvolutionLayer3x3Kernel.cpp | 3 +-- .../GLES_COMPUTE/kernels/GCDirectConvolutionLayerKernel.cpp | 3 +-- src/core/GLES_COMPUTE/kernels/GCGEMMInterleave4x4Kernel.cpp | 2 +- src/core/GLES_COMPUTE/kernels/GCGEMMMatrixMultiplyKernel.cpp | 1 - src/core/GLES_COMPUTE/kernels/GCGEMMTranspose1xWKernel.cpp | 2 +- src/core/GLES_COMPUTE/kernels/GCIm2ColKernel.cpp | 3 +-- src/core/GLES_COMPUTE/kernels/GCPoolingLayerKernel.cpp | 10 +++------- src/core/GLES_COMPUTE/kernels/GCSoftmaxLayerKernel.cpp | 11 +++++------ src/core/GLES_COMPUTE/kernels/GCTransposeKernel.cpp | 2 +- 11 files changed, 16 insertions(+), 30 deletions(-) (limited to 'src/core/GLES_COMPUTE/kernels') diff --git a/src/core/GLES_COMPUTE/kernels/GCActivationLayerKernel.cpp b/src/core/GLES_COMPUTE/kernels/GCActivationLayerKernel.cpp index 828782338c..874c3368a5 100644 --- a/src/core/GLES_COMPUTE/kernels/GCActivationLayerKernel.cpp +++ b/src/core/GLES_COMPUTE/kernels/GCActivationLayerKernel.cpp @@ -55,11 +55,10 @@ void GCActivationLayerKernel::configure(IGCTensor *input, IGCTensor *output, Act if(output != nullptr) { // Output auto inizialitation if not yet initialized - auto_init_if_empty(*output->info(), input->info()->tensor_shape(), 1, input->info()->data_type(), input->info()->fixed_point_position()); + auto_init_if_empty(*output->info(), input->info()->tensor_shape(), 1, input->info()->data_type()); ARM_COMPUTE_ERROR_ON_MISMATCHING_SHAPES(input, output); ARM_COMPUTE_ERROR_ON_MISMATCHING_DATA_TYPES(input, output); - ARM_COMPUTE_ERROR_ON_MISMATCHING_FIXED_POINT(input, output); _output = output; } diff --git a/src/core/GLES_COMPUTE/kernels/GCBatchNormalizationLayerKernel.cpp b/src/core/GLES_COMPUTE/kernels/GCBatchNormalizationLayerKernel.cpp index 9a592dfe00..c745f3ff3c 100644 --- a/src/core/GLES_COMPUTE/kernels/GCBatchNormalizationLayerKernel.cpp +++ b/src/core/GLES_COMPUTE/kernels/GCBatchNormalizationLayerKernel.cpp @@ -48,27 +48,23 @@ Status validate_arguments(const ITensorInfo *input, const ITensorInfo *output, ARM_COMPUTE_ERROR_ON_DATA_TYPE_CHANNEL_NOT_IN(input, 1, DataType::F16, DataType::F32); ARM_COMPUTE_ERROR_ON_MISMATCHING_DATA_TYPES(input, mean, var); - ARM_COMPUTE_ERROR_ON_MISMATCHING_FIXED_POINT(input, mean, var); ARM_COMPUTE_ERROR_ON_MISMATCHING_SHAPES(mean, var); if(output->total_size() != 0) { ARM_COMPUTE_ERROR_ON_MISMATCHING_SHAPES(input, output); ARM_COMPUTE_ERROR_ON_MISMATCHING_DATA_TYPES(input, output); - ARM_COMPUTE_ERROR_ON_MISMATCHING_FIXED_POINT(input, output); } if(beta != nullptr) { ARM_COMPUTE_RETURN_ERROR_ON_MISMATCHING_SHAPES(mean, beta); ARM_COMPUTE_RETURN_ERROR_ON_MISMATCHING_DATA_TYPES(input, beta); - ARM_COMPUTE_RETURN_ERROR_ON_MISMATCHING_FIXED_POINT(input, beta); } if(gamma != nullptr) { ARM_COMPUTE_RETURN_ERROR_ON_MISMATCHING_SHAPES(mean, gamma); ARM_COMPUTE_RETURN_ERROR_ON_MISMATCHING_DATA_TYPES(input, gamma); - ARM_COMPUTE_RETURN_ERROR_ON_MISMATCHING_FIXED_POINT(input, gamma); } if(act_info.enabled()) { @@ -86,7 +82,7 @@ std::pair validate_and_configure_window(ITensorInfo *input, ITen ITensorInfo *beta, ITensorInfo *gamma) { // Output tensor auto initialization if not yet initialized - auto_init_if_empty(*output, input->tensor_shape(), 1, input->data_type(), input->fixed_point_position()); + auto_init_if_empty(*output, input->tensor_shape(), 1, input->data_type()); unsigned int num_elems_processed_per_iteration = 1; if(input->data_type() == DataType::F16) diff --git a/src/core/GLES_COMPUTE/kernels/GCDepthwiseConvolutionLayer3x3Kernel.cpp b/src/core/GLES_COMPUTE/kernels/GCDepthwiseConvolutionLayer3x3Kernel.cpp index c2374096a2..a0d1876315 100644 --- a/src/core/GLES_COMPUTE/kernels/GCDepthwiseConvolutionLayer3x3Kernel.cpp +++ b/src/core/GLES_COMPUTE/kernels/GCDepthwiseConvolutionLayer3x3Kernel.cpp @@ -69,8 +69,7 @@ void GCDepthwiseConvolutionLayer3x3Kernel::configure(const IGCTensor *input, con auto_init_if_empty(*output->info(), output_shape, 1, - input->info()->data_type(), - input->info()->fixed_point_position()); + input->info()->data_type()); ARM_COMPUTE_ERROR_ON_MISMATCHING_DIMENSIONS(output->info()->tensor_shape(), output_shape); ARM_COMPUTE_ERROR_ON(output->info()->dimension(2) != weights->info()->dimension(2)); diff --git a/src/core/GLES_COMPUTE/kernels/GCDirectConvolutionLayerKernel.cpp b/src/core/GLES_COMPUTE/kernels/GCDirectConvolutionLayerKernel.cpp index 67a1530431..ecff233382 100644 --- a/src/core/GLES_COMPUTE/kernels/GCDirectConvolutionLayerKernel.cpp +++ b/src/core/GLES_COMPUTE/kernels/GCDirectConvolutionLayerKernel.cpp @@ -80,12 +80,11 @@ void GCDirectConvolutionLayerKernel::configure(const IGCTensor *inp output_shape.set(2, weights->info()->dimension(3)); // Output auto inizialitation if not yet initialized - auto_init_if_empty(*output->info(), output_shape, 1, input->info()->data_type(), input->info()->fixed_point_position()); + auto_init_if_empty(*output->info(), output_shape, 1, input->info()->data_type()); ARM_COMPUTE_ERROR_ON_MISMATCHING_DATA_TYPES(input, weights, output); ARM_COMPUTE_ERROR_ON_MISMATCHING_DIMENSIONS(output->info()->tensor_shape(), output_shape); ARM_COMPUTE_ERROR_ON_MISMATCHING_DATA_TYPES(input, output); - ARM_COMPUTE_ERROR_ON_MISMATCHING_FIXED_POINT(input, output); ARM_COMPUTE_ERROR_ON(!conv_info.padding_is_symmetric()); _conv_stride_x = std::get<0>(conv_info.stride()); diff --git a/src/core/GLES_COMPUTE/kernels/GCGEMMInterleave4x4Kernel.cpp b/src/core/GLES_COMPUTE/kernels/GCGEMMInterleave4x4Kernel.cpp index 171fbad702..efd5747985 100644 --- a/src/core/GLES_COMPUTE/kernels/GCGEMMInterleave4x4Kernel.cpp +++ b/src/core/GLES_COMPUTE/kernels/GCGEMMInterleave4x4Kernel.cpp @@ -51,7 +51,7 @@ void GCGEMMInterleave4x4Kernel::configure(const IGCTensor *input, IGCTensor *out output_shape.set(1, std::ceil(input->info()->dimension(1) / 4.0f)); // Output auto inizialitation if not yet initialized - auto_init_if_empty(*output->info(), output_shape, 1, input->info()->data_type(), input->info()->fixed_point_position()); + auto_init_if_empty(*output->info(), output_shape, 1, input->info()->data_type()); ARM_COMPUTE_ERROR_ON_MISMATCHING_DIMENSIONS(output->info()->tensor_shape(), output_shape); ARM_COMPUTE_ERROR_ON_MISMATCHING_DATA_TYPES(input, output); diff --git a/src/core/GLES_COMPUTE/kernels/GCGEMMMatrixMultiplyKernel.cpp b/src/core/GLES_COMPUTE/kernels/GCGEMMMatrixMultiplyKernel.cpp index d576c30f80..8ead05abfb 100644 --- a/src/core/GLES_COMPUTE/kernels/GCGEMMMatrixMultiplyKernel.cpp +++ b/src/core/GLES_COMPUTE/kernels/GCGEMMMatrixMultiplyKernel.cpp @@ -97,7 +97,6 @@ inline Status validate_arguments(const ITensorInfo *input0, const ITensorInfo *i ARM_COMPUTE_RETURN_ERROR_ON(output->dimension(0) != static_cast(n)); ARM_COMPUTE_RETURN_ERROR_ON(output->dimension(1) != static_cast(m)); ARM_COMPUTE_RETURN_ERROR_ON_MISMATCHING_DATA_TYPES(input0, output); - ARM_COMPUTE_RETURN_ERROR_ON_MISMATCHING_FIXED_POINT(input0, output); } } diff --git a/src/core/GLES_COMPUTE/kernels/GCGEMMTranspose1xWKernel.cpp b/src/core/GLES_COMPUTE/kernels/GCGEMMTranspose1xWKernel.cpp index 5d9f9c2d3e..dfbd0216b4 100644 --- a/src/core/GLES_COMPUTE/kernels/GCGEMMTranspose1xWKernel.cpp +++ b/src/core/GLES_COMPUTE/kernels/GCGEMMTranspose1xWKernel.cpp @@ -49,7 +49,7 @@ void GCGEMMTranspose1xWKernel::configure(const IGCTensor *input, IGCTensor *outp output_shape.set(1, static_cast(std::ceil((input->info()->dimension(0) / static_cast(transpose_w))))); // Output tensor auto inizialitation if not yet initialized - auto_init_if_empty(*output->info(), output_shape, 1, input->info()->data_type(), input->info()->fixed_point_position()); + auto_init_if_empty(*output->info(), output_shape, 1, input->info()->data_type()); ARM_COMPUTE_ERROR_ON_MISMATCHING_DATA_TYPES(input, output); ARM_COMPUTE_ERROR_ON_MISMATCHING_DIMENSIONS(output->info()->tensor_shape(), output_shape); diff --git a/src/core/GLES_COMPUTE/kernels/GCIm2ColKernel.cpp b/src/core/GLES_COMPUTE/kernels/GCIm2ColKernel.cpp index 6c896168ed..21971903eb 100644 --- a/src/core/GLES_COMPUTE/kernels/GCIm2ColKernel.cpp +++ b/src/core/GLES_COMPUTE/kernels/GCIm2ColKernel.cpp @@ -53,7 +53,6 @@ Status validate_arguments(const ITensorInfo *input, const ITensorInfo *output) if(output->total_size() != 0) { ARM_COMPUTE_RETURN_ERROR_ON_MISMATCHING_DATA_TYPES(input, output); - ARM_COMPUTE_RETURN_ERROR_ON_MISMATCHING_FIXED_POINT(input, output); } return Status{}; @@ -253,7 +252,7 @@ void GCIm2ColKernel::run_generic(const Window &window) if(_input->info()->data_type() == DataType::F16) { (dynamic_cast(_input->info()))->init(_input->info()->tensor_shape(), _input->info()->num_channels(), _input->info()->data_type(), _input->info()->strides_in_bytes(), 0, - _input->info()->total_size(), _input->info()->fixed_point_position()); + _input->info()->total_size()); } _kernel.use(); diff --git a/src/core/GLES_COMPUTE/kernels/GCPoolingLayerKernel.cpp b/src/core/GLES_COMPUTE/kernels/GCPoolingLayerKernel.cpp index 3a0944cd48..f225ebde6b 100644 --- a/src/core/GLES_COMPUTE/kernels/GCPoolingLayerKernel.cpp +++ b/src/core/GLES_COMPUTE/kernels/GCPoolingLayerKernel.cpp @@ -75,7 +75,6 @@ Status validate_arguments(const ITensorInfo *input, const ITensorInfo *output, c if(output->total_size() != 0) { ARM_COMPUTE_RETURN_ERROR_ON_MISMATCHING_DATA_TYPES(input, output); - ARM_COMPUTE_RETURN_ERROR_ON_MISMATCHING_FIXED_POINT(input, output); unsigned int pooled_w = 0; unsigned int pooled_h = 0; @@ -118,8 +117,7 @@ std::tuple validate_and_configure_window(ITenso auto_init(input, output, pooled_w, pooled_h); - BorderSize border_size = BorderSize(pool_pad_y, pool_pad_x); - const DataType data_type = input->data_type(); + BorderSize border_size = BorderSize(pool_pad_y, pool_pad_x); const int input_width = input->dimension(0); const int input_height = input->dimension(1); @@ -131,7 +129,7 @@ std::tuple validate_and_configure_window(ITenso { // Check if we have pool3x3 with stride_x less equal than 3. In these cases, run an optimized OpenGLES kernel where // each thread computes 4 output elements - const bool is_pool3x3_stride_le3 = (pool_size == 3) && (pool_stride_x <= 3) && !is_data_type_fixed_point(data_type); + const bool is_pool3x3_stride_le3 = (pool_size == 3) && (pool_stride_x <= 3); int num_elems_read_per_iteration = pool_size; @@ -261,8 +259,6 @@ void GCPoolingLayerKernel::configure(const IGCTensor *input, IGCTensor *output, _output = output; _pool_info = pool_info; - const DataType data_type = input->info()->data_type(); - // Set build options std::set build_opts; build_opts.emplace("#define LOCAL_SIZE_X " + support::cpp11::to_string(1)); @@ -293,7 +289,7 @@ void GCPoolingLayerKernel::configure(const IGCTensor *input, IGCTensor *output, { // Check if we have pool3x3 with stride_x less equal than 3. In these cases, run an optimized OpenGLES kernel where // each thread computes 4 output elements - const bool is_pool3x3_stride_le3 = (pool_size == 3) && (pool_stride_x <= 3) && !is_data_type_fixed_point(data_type); + const bool is_pool3x3_stride_le3 = (pool_size == 3) && (pool_stride_x <= 3); std::string kernel_name = "pooling_layer_" + support::cpp11::to_string(pool_size); if(is_pool3x3_stride_le3) diff --git a/src/core/GLES_COMPUTE/kernels/GCSoftmaxLayerKernel.cpp b/src/core/GLES_COMPUTE/kernels/GCSoftmaxLayerKernel.cpp index 040a66358f..7ae2fc9fa5 100644 --- a/src/core/GLES_COMPUTE/kernels/GCSoftmaxLayerKernel.cpp +++ b/src/core/GLES_COMPUTE/kernels/GCSoftmaxLayerKernel.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017 ARM Limited. + * Copyright (c) 2017-2018 ARM Limited. * * SPDX-License-Identifier: MIT * @@ -49,7 +49,7 @@ void GCLogits1DMaxKernel::configure(const IGCTensor *input, IGCTensor *output) output_shape.set(0, 1); // Output auto initialization if not yet initialized - auto_init_if_empty(*output->info(), output_shape, 1, input->info()->data_type(), input->info()->fixed_point_position()); + auto_init_if_empty(*output->info(), output_shape, 1, input->info()->data_type()); ARM_COMPUTE_ERROR_ON_MISMATCHING_DATA_TYPES(input, output); ARM_COMPUTE_ERROR_ON_MISMATCHING_DIMENSIONS(output->info()->tensor_shape(), output_shape); @@ -110,8 +110,8 @@ void GCLogits1DShiftExpSumKernel::configure(const IGCTensor *input, const IGCTen ARM_COMPUTE_ERROR_ON_NULLPTR(max, sum, output); // Output auto initialization if not yet initialized - auto_init_if_empty(*sum->info(), max->info()->tensor_shape(), 1, input->info()->data_type(), input->info()->fixed_point_position()); - auto_init_if_empty(*output->info(), input->info()->tensor_shape(), 1, input->info()->data_type(), input->info()->fixed_point_position()); + auto_init_if_empty(*sum->info(), max->info()->tensor_shape(), 1, input->info()->data_type()); + auto_init_if_empty(*output->info(), input->info()->tensor_shape(), 1, input->info()->data_type()); ARM_COMPUTE_ERROR_ON_MISMATCHING_DATA_TYPES(input, output, max, sum); ARM_COMPUTE_ERROR_ON_MISMATCHING_SHAPES(input, output); @@ -204,10 +204,9 @@ void GCLogits1DNormKernel::configure(const IGCTensor *input, const IGCTensor *su ARM_COMPUTE_ERROR_ON_NULLPTR(sum, output); // Output auto initialization if not yet initialized - auto_init_if_empty(*output->info(), input->info()->tensor_shape(), 1, input->info()->data_type(), input->info()->fixed_point_position()); + auto_init_if_empty(*output->info(), input->info()->tensor_shape(), 1, input->info()->data_type()); ARM_COMPUTE_ERROR_ON_MISMATCHING_DATA_TYPES(input, sum, output); - ARM_COMPUTE_ERROR_ON_MISMATCHING_FIXED_POINT_POSITION(input, sum, output); ARM_COMPUTE_ERROR_ON_MISMATCHING_SHAPES(input, output); _input = input; diff --git a/src/core/GLES_COMPUTE/kernels/GCTransposeKernel.cpp b/src/core/GLES_COMPUTE/kernels/GCTransposeKernel.cpp index bda08e4238..7248891abe 100644 --- a/src/core/GLES_COMPUTE/kernels/GCTransposeKernel.cpp +++ b/src/core/GLES_COMPUTE/kernels/GCTransposeKernel.cpp @@ -49,7 +49,7 @@ void GCTransposeKernel::configure(const IGCTensor *input, IGCTensor *output) output_shape.set(1, h_out); // Output tensor auto inizialitation if not yet initialized - auto_init_if_empty(*output->info(), output_shape, 1, input->info()->data_type(), input->info()->fixed_point_position()); + auto_init_if_empty(*output->info(), output_shape, 1, input->info()->data_type()); ARM_COMPUTE_ERROR_ON_MISMATCHING_DIMENSIONS(output->info()->tensor_shape(), output_shape); ARM_COMPUTE_ERROR_ON_MISMATCHING_DATA_TYPES(input, output); -- cgit v1.2.1