aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthew Bentham <Matthew.Bentham@arm.com>2023-05-30 13:35:34 +0000
committerMatthew Bentham <matthew.bentham@arm.com>2023-06-15 11:22:29 +0000
commitf1aeab9cfb6e9a2a5a16ed79bf341ad11c555233 (patch)
tree1dad30483ae919a0645e5ccec5d51a29da16a1b4
parentbec9b032ddcff449c7ad40febbcab24c23ee58a0 (diff)
downloadComputeLibrary-f1aeab9cfb6e9a2a5a16ed79bf341ad11c555233.tar.gz
Break up arm_compute/core/Types.h a bit
Split some of the larger types with inlined code into their own header files, so that the implementation of them needn't be included everywhere. Change-Id: Id3ec2d42efbd33cedb55705a5a24e1b90c8b7a01 Signed-off-by: Matthew Bentham <Matthew.Bentham@arm.com> Reviewed-on: https://eu-gerrit-1.euhpc.arm.com/c/VisualCompute/ComputeLibrary/+/524782 Tested-by: bsgcomp <bsgcomp@arm.com> Reviewed-by: Gunes Bayir <gunes.bayir@arm.com> Comments-Addressed: bsgcomp <bsgcomp@arm.com> Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/9757 Tested-by: Arm Jenkins <bsgcomp@arm.com> Reviewed-by: Pablo Marquez Tello <pablo.tello@arm.com> Reviewed-by: Jakub Sujak <jakub.sujak@arm.com> Comments-Addressed: Arm Jenkins <bsgcomp@arm.com> Benchmark: Arm Jenkins <bsgcomp@arm.com>
-rw-r--r--arm_compute/core/ActivationLayerInfo.h111
-rw-r--r--arm_compute/core/ConvolutionInfo.h45
-rw-r--r--arm_compute/core/FullyConnectedLayerInfo.h71
-rw-r--r--arm_compute/core/GEMMInfo.h314
-rw-r--r--arm_compute/core/KernelDescriptors.h1
-rw-r--r--arm_compute/core/MatMulInfo.h91
-rw-r--r--arm_compute/core/PixelValue.h3
-rw-r--r--arm_compute/core/Types.h481
-rw-r--r--arm_compute/core/Utils.h7
-rw-r--r--arm_compute/core/experimental/PostOps.h5
-rw-r--r--arm_compute/core/utils/misc/ShapeCalculator.h1
-rw-r--r--arm_compute/graph/Types.h6
-rw-r--r--arm_compute/runtime/CL/functions/CLBatchNormalizationLayer.h3
-rw-r--r--arm_compute/runtime/CL/functions/CLConvolutionLayer.h3
-rw-r--r--arm_compute/runtime/CL/functions/CLDepthwiseConvolutionLayer.h3
-rw-r--r--arm_compute/runtime/CL/functions/CLDirectConvolutionLayer.h3
-rw-r--r--arm_compute/runtime/CL/functions/CLElementwiseOperations.h3
-rw-r--r--arm_compute/runtime/CL/functions/CLFullyConnectedLayer.h3
-rw-r--r--arm_compute/runtime/CL/functions/CLGEMM.h1
-rw-r--r--arm_compute/runtime/CL/functions/CLGEMMConvolutionLayer.h3
-rw-r--r--arm_compute/runtime/CL/functions/CLGEMMLowpMatrixMultiplyCore.h5
-rw-r--r--arm_compute/runtime/CL/functions/CLIndirectConvolutionLayer.h3
-rw-r--r--arm_compute/runtime/CL/functions/CLPixelWiseMultiplication.h4
-rw-r--r--arm_compute/runtime/CL/functions/CLWinogradConvolutionLayer.h3
-rw-r--r--arm_compute/runtime/FunctionDescriptors.h3
-rw-r--r--arm_compute/runtime/NEON/functions/NEActivationLayer.h3
-rw-r--r--arm_compute/runtime/NEON/functions/NEAddMulAdd.h1
-rw-r--r--arm_compute/runtime/NEON/functions/NEArithmeticAddition.h3
-rw-r--r--arm_compute/runtime/NEON/functions/NEArithmeticSubtraction.h3
-rw-r--r--arm_compute/runtime/NEON/functions/NEConvolutionLayer.h3
-rw-r--r--arm_compute/runtime/NEON/functions/NEDirectConvolutionLayer.h3
-rw-r--r--arm_compute/runtime/NEON/functions/NEElementwiseOperations.h3
-rw-r--r--arm_compute/runtime/NEON/functions/NEFullyConnectedLayer.h1
-rw-r--r--arm_compute/runtime/NEON/functions/NEGEMM.h1
-rw-r--r--arm_compute/runtime/NEON/functions/NEGEMMConvolutionLayer.h3
-rw-r--r--arm_compute/runtime/NEON/functions/NEGEMMLowpMatrixMultiplyCore.h3
-rw-r--r--arm_compute/runtime/NEON/functions/NEPixelWiseMultiplication.h4
-rw-r--r--arm_compute/runtime/NEON/functions/NEWinogradConvolutionLayer.h3
-rw-r--r--src/common/utils/LegacySupport.cpp4
-rw-r--r--src/core/CL/kernels/CLBatchNormalizationLayerKernel.h3
-rw-r--r--src/core/CL/kernels/CLDepthwiseConvolutionLayerNativeKernel.h3
-rw-r--r--src/core/NEON/kernels/NEBatchNormalizationLayerKernel.h3
-rw-r--r--src/core/NEON/kernels/batchnormalization/impl/SVE/fp16.cpp3
-rw-r--r--src/core/NEON/kernels/batchnormalization/impl/SVE/fp32.cpp3
-rw-r--r--src/core/NEON/kernels/detail/NEActivationFunctionDetail.h3
-rw-r--r--src/core/Utils.cpp9
-rw-r--r--src/core/utils/AssemblyUtils.cpp4
-rw-r--r--src/core/utils/AssemblyUtils.h4
-rw-r--r--src/core/utils/quantization/AsymmHelpers.cpp1
-rw-r--r--src/cpu/kernels/CpuActivationKernel.h3
-rw-r--r--src/cpu/kernels/CpuAddMulAddKernel.h1
-rw-r--r--src/cpu/kernels/CpuConcatenateWidthKernel.cpp10
-rw-r--r--src/cpu/kernels/CpuDepthwiseConv2dNativeKernel.h1
-rw-r--r--src/cpu/kernels/CpuKernelSelectionTypes.h4
-rw-r--r--src/cpu/kernels/activation/generic/neon/impl.h3
-rw-r--r--src/cpu/kernels/activation/generic/neon/lut.cpp1
-rw-r--r--src/cpu/kernels/activation/generic/neon/qasymm8.cpp1
-rw-r--r--src/cpu/kernels/activation/generic/neon/qasymm8_signed.cpp1
-rw-r--r--src/cpu/kernels/activation/generic/neon/qsymm16.cpp3
-rw-r--r--src/cpu/kernels/activation/generic/sve/fp16.cpp3
-rw-r--r--src/cpu/kernels/activation/generic/sve/fp32.cpp3
-rw-r--r--src/cpu/kernels/activation/generic/sve2/lut.cpp1
-rw-r--r--src/cpu/kernels/activation/generic/sve2/qasymm8.cpp3
-rw-r--r--src/cpu/kernels/activation/generic/sve2/qasymm8_signed.cpp3
-rw-r--r--src/cpu/kernels/activation/generic/sve2/qsymm16.cpp3
-rw-r--r--src/cpu/kernels/addmuladd/generic/neon/fp16.cpp1
-rw-r--r--src/cpu/kernels/addmuladd/generic/neon/fp32.cpp1
-rw-r--r--src/cpu/kernels/addmuladd/generic/neon/qasymm8.cpp1
-rw-r--r--src/cpu/kernels/addmuladd/generic/neon/qasymm8_signed.cpp1
-rw-r--r--src/cpu/kernels/depthwiseconv2d/generic/neon/impl.cpp3
-rw-r--r--src/cpu/kernels/depthwiseconv2d/generic/neon/impl.h4
-rw-r--r--src/cpu/kernels/internal/CpuDepthwiseConv2dAssemblyWrapperKernel.h4
-rw-r--r--src/cpu/operators/CpuAdd.h3
-rw-r--r--src/cpu/operators/CpuConv2d.h3
-rw-r--r--src/cpu/operators/CpuDepthwiseConv2dAssemblyDispatch.h4
-rw-r--r--src/cpu/operators/CpuFullyConnected.h1
-rw-r--r--src/cpu/operators/CpuGemm.h1
-rw-r--r--src/cpu/operators/CpuGemmConv2d.h3
-rw-r--r--src/cpu/operators/CpuGemmLowpMatrixMultiplyCore.h3
-rw-r--r--src/cpu/operators/CpuMul.h5
-rw-r--r--src/cpu/operators/CpuSub.h5
-rw-r--r--src/cpu/operators/internal/CpuGemmAssemblyDispatch.h1
-rw-r--r--src/dynamic_fusion/sketch/gpu/template_writer/cl/ClTemplateActivation.h1
-rw-r--r--src/gpu/cl/kernels/ClActivationKernel.cpp3
-rw-r--r--src/gpu/cl/kernels/ClElementwiseKernel.h3
-rw-r--r--src/gpu/cl/kernels/ClMulKernel.h3
-rw-r--r--src/gpu/cl/operators/ClAdd.h3
-rw-r--r--src/gpu/cl/operators/ClDirectConv2d.h5
-rw-r--r--src/gpu/cl/operators/ClElementwiseOperations.h3
-rw-r--r--src/gpu/cl/operators/ClFullyConnected.h1
-rw-r--r--src/gpu/cl/operators/ClGemm.h1
-rw-r--r--src/gpu/cl/operators/ClGemmLowpMatrixMultiplyCore.h5
-rw-r--r--src/gpu/cl/operators/ClIndirectConv2d.h3
-rw-r--r--src/gpu/cl/operators/ClMatMul.h2
-rw-r--r--src/gpu/cl/operators/ClMul.h7
-rw-r--r--src/gpu/cl/operators/ClSub.h3
-rw-r--r--src/runtime/CL/functions/CLActivationLayer.cpp3
-rw-r--r--src/runtime/CL/functions/CLGEMMDeconvolutionLayer.cpp3
-rw-r--r--src/runtime/heuristics/matmul_native/IClMatMulNativeKernelConfig.h1
-rw-r--r--tests/IAccessor.h3
-rw-r--r--tests/validation/Helpers.h1
-rw-r--r--utils/TypePrinter.h4
102 files changed, 847 insertions, 549 deletions
diff --git a/arm_compute/core/ActivationLayerInfo.h b/arm_compute/core/ActivationLayerInfo.h
new file mode 100644
index 0000000000..d9dc0a0702
--- /dev/null
+++ b/arm_compute/core/ActivationLayerInfo.h
@@ -0,0 +1,111 @@
+/*
+ * Copyright (c) 2016-2023 Arm Limited.
+ *
+ * SPDX-License-Identifier: MIT
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to
+ * deal in the Software without restriction, including without limitation the
+ * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
+ * sell copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in all
+ * copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ */
+#ifndef ARM_COMPUTE_ACTIVATIONLAYERINFO_H
+#define ARM_COMPUTE_ACTIVATIONLAYERINFO_H
+
+#include "arm_compute/core/Coordinates.h"
+#include "arm_compute/core/QuantizationInfo.h"
+#include "arm_compute/core/Size2D.h"
+#include "arm_compute/core/Size3D.h"
+#include "arm_compute/core/Strides.h"
+#include "arm_compute/core/TensorShape.h"
+#include "arm_compute/core/Types.h"
+#include "arm_compute/core/experimental/IPostOp.h"
+#include "arm_compute/core/utils/misc/Macros.h"
+#include "support/Bfloat16.h"
+#include "support/Half.h"
+
+#include <cmath>
+#include <cstddef>
+#include <cstdint>
+#include <map>
+#include <string>
+#include <utility>
+
+namespace arm_compute
+{
+/** Activation Layer Information class */
+class ActivationLayerInfo
+{
+public:
+ typedef arm_compute::ActivationFunction ActivationFunction;
+
+ /** Lookup table */
+ using LookupTable256 = std::array<qasymm8_t, 256>;
+
+ ActivationLayerInfo() = default;
+ /** Default Constructor
+ *
+ * @param[in] f The activation function to use.
+ * @param[in] a (Optional) The alpha parameter used by some activation functions
+ * (@ref ActivationFunction::BOUNDED_RELU, @ref ActivationFunction::LU_BOUNDED_RELU, @ref ActivationFunction::LINEAR, @ref ActivationFunction::TANH).
+ * @param[in] b (Optional) The beta parameter used by some activation functions (@ref ActivationFunction::LINEAR, @ref ActivationFunction::LU_BOUNDED_RELU, @ref ActivationFunction::TANH).
+ */
+ ActivationLayerInfo(ActivationFunction f, float a = 0.0f, float b = 0.0f)
+ : _act(f), _a(a), _b(b), _enabled(true)
+ {
+ }
+ /** Get the type of activation function */
+ ActivationFunction activation() const
+ {
+ return _act;
+ }
+ /** Get the alpha value */
+ float a() const
+ {
+ return _a;
+ }
+ /** Get the beta value */
+ float b() const
+ {
+ return _b;
+ }
+ /** Check if initialised */
+ bool enabled() const
+ {
+ return _enabled;
+ }
+
+#ifdef __aarch64__
+ const LookupTable256 &lut() const
+ {
+ return _lut;
+ }
+ void setLookupTable256(LookupTable256 &lut)
+ {
+ _lut = std::move(lut);
+ }
+#endif // __aarch64__
+private:
+ ActivationFunction _act = { ActivationLayerInfo::ActivationFunction::IDENTITY };
+ float _a = {};
+ float _b = {};
+ bool _enabled = { false };
+
+#ifdef __aarch64__
+ LookupTable256 _lut = {};
+#endif // __aarch64__
+};
+} // namespace arm_compute
+#endif /* ARM_COMPUTE_ACTIVATIONLAYERINFO_H */
diff --git a/arm_compute/core/ConvolutionInfo.h b/arm_compute/core/ConvolutionInfo.h
new file mode 100644
index 0000000000..1b5e5d197b
--- /dev/null
+++ b/arm_compute/core/ConvolutionInfo.h
@@ -0,0 +1,45 @@
+/*
+ * Copyright (c) 2016-2023 Arm Limited.
+ *
+ * SPDX-License-Identifier: MIT
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to
+ * deal in the Software without restriction, including without limitation the
+ * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
+ * sell copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in all
+ * copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ */
+#ifndef ARM_COMPUTE_CONVOLUTIONINFO_H
+#define ARM_COMPUTE_CONVOLUTIONINFO_H
+
+#include "arm_compute/core/ActivationLayerInfo.h"
+#include "arm_compute/core/Types.h"
+
+namespace arm_compute
+{
+struct ConvolutionInfo
+{
+ ConvolutionInfo() = default;
+ ConvolutionInfo(const PadStrideInfo &pad_stride_info, unsigned int depth_multiplier, const ActivationLayerInfo &act_info, const Size2D &dilation)
+ : pad_stride_info(pad_stride_info), depth_multiplier(depth_multiplier), act_info(act_info), dilation(dilation)
+ {
+ }
+ PadStrideInfo pad_stride_info{}; /**< Convolution info (Pads, strides,...) */
+ unsigned int depth_multiplier{ 1 }; /**< Multiplier to apply to input's depth to retrieve the output depth. Defaults to 1 */
+ ActivationLayerInfo act_info{}; /**< Fused activation to apply after convolution. */
+ Size2D dilation{ Size2D(1, 1) }; /**< Dilation, in elements, across x and y. Defaults to (1, 1). */
+};
+} // namespace arm_compute
+#endif /* ARM_COMPUTE_CONVOLUTIONINFO_H */
diff --git a/arm_compute/core/FullyConnectedLayerInfo.h b/arm_compute/core/FullyConnectedLayerInfo.h
new file mode 100644
index 0000000000..f699cb2792
--- /dev/null
+++ b/arm_compute/core/FullyConnectedLayerInfo.h
@@ -0,0 +1,71 @@
+/*
+ * Copyright (c) 2016-2023 Arm Limited.
+ *
+ * SPDX-License-Identifier: MIT
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to
+ * deal in the Software without restriction, including without limitation the
+ * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
+ * sell copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in all
+ * copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ */
+#ifndef ARM_COMPUTE_FULLYCONNECTEDLAYERINFO_H
+#define ARM_COMPUTE_FULLYCONNECTEDLAYERINFO_H
+
+#include "arm_compute/core/ActivationLayerInfo.h"
+#include "arm_compute/core/Types.h"
+
+namespace arm_compute
+{
+/** Fully connected layer info */
+struct FullyConnectedLayerInfo
+{
+ /* Fused-activation parameters */
+ ActivationLayerInfo activation_info{}; /**< Fused activation to apply after the matrix multiplication. */
+ /* Information about weights */
+ DataLayout weights_trained_layout{ DataLayout::NCHW }; /**< Layout that the weights have been trained with. */
+ bool transpose_weights{ true }; /**< Transpose weights if true. */
+ bool are_weights_reshaped{ false }; /**< @deprecated Reshape the weights tensor if false. */
+ bool retain_internal_weights{ false }; /**< Retain internal reshaped weights. */
+ bool enable_fast_math{ false }; /**< Enable fast math computation. */
+ /* Other parameters */
+ bool fp_mixed_precision{ false }; /**< Use wider accumulators (32 bit instead of 16 for FP16) to improve accuracy. */
+
+ /** Sets the weights trained data layout
+ *
+ * @param[in] layout Data layout that the weights were trained with
+ *
+ * @return Updated object
+ */
+ FullyConnectedLayerInfo &set_weights_trained_layout(DataLayout layout)
+ {
+ weights_trained_layout = layout;
+ return *this;
+ }
+ /** Sets the transpose weights flag
+ *
+ * @param[in] should_transpose_weights Boolean flag indicating if weights should be transposed
+ *
+ * @return Updated object
+ */
+ FullyConnectedLayerInfo &set_transpose_weights(bool should_transpose_weights)
+ {
+ transpose_weights = should_transpose_weights;
+ return *this;
+ }
+};
+
+} // namespace arm_compute
+#endif /* ARM_COMPUTE_FULLYCONNECTEDLAYERINFO_H */
diff --git a/arm_compute/core/GEMMInfo.h b/arm_compute/core/GEMMInfo.h
new file mode 100644
index 0000000000..4c8e94a315
--- /dev/null
+++ b/arm_compute/core/GEMMInfo.h
@@ -0,0 +1,314 @@
+/*
+ * Copyright (c) 2016-2023 Arm Limited.
+ *
+ * SPDX-License-Identifier: MIT
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to
+ * deal in the Software without restriction, including without limitation the
+ * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
+ * sell copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in all
+ * copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ */
+#ifndef ARM_COMPUTE_GEMMINFO_H
+#define ARM_COMPUTE_GEMMINFO_H
+
+#include "arm_compute/core/ActivationLayerInfo.h"
+#include "arm_compute/core/Types.h"
+
+namespace arm_compute
+{
+/** GEMM information class. This class stores the necessary information to compute GEMM functions
+ *
+ * This object also contains the information about how matrix A and matrix B have been reshaped
+ *
+ */
+class GEMMInfo
+{
+public:
+ /** Default constructor */
+ GEMMInfo() noexcept
+ : _is_a_reshaped(false),
+ _is_b_reshaped(false),
+ _reshape_b_only_on_first_run(true),
+ _depth_output_gemm3d(0),
+ _reinterpret_input_as_3d(false),
+ _retain_internal_weights(false),
+ _gemmlowp_output_stage(),
+ _fast_math(false),
+ _fp_mixed_precision(false),
+ _broadcast_bias(false),
+ _pretranspose_A(false),
+ _pretranspose_B(false),
+ _activation_info(),
+ _post_ops(),
+ _fixed_format(false),
+ _weight_format(arm_compute::WeightFormat::UNSPECIFIED)
+ {
+ }
+ /** Constructor
+ *
+ * @param[in] is_a_reshaped True if the matrix A has been reshaped
+ * @param[in] is_b_reshaped True if the matrix B has been reshaped
+ * @param[in] reshape_b_only_on_first_run Reshape matrix B only for the first run
+ * @param[in] depth_output_gemm3d (Optional) Depth (third dimension) of the output tensor to be used with the GEMM3D kernel
+ * If 0 the output will not be reinterpreted as 3D. Default 0
+ * @param[in] reinterpret_input_as_3d (Optional) Reinterpret the input as 3D tensor. (i.e. this flag should be set to true when GEMM is used
+ * to perform 1x1 convolutions with the NHWC data layout)
+ * @param[in] retain_internal_weights (Optional) Retain the weights tensor from previous run
+ * @param[in] gemmlowp_output_stage (Optional) GEMMLowp Output stage info
+ * @param[in] fp_mixed_precision (Optional) Use wider accumulators (32 bit instead of 16 for FP16) to improve accuracy.
+ * @param[in] fast_math (Optional) Use a data type of shorter width to improve performance
+ * @param[in] broadcast_bias (Optional) Broadcast the shape of the bias tensor from a vector to a matrix.
+ * @param[in] activation_info (Optional) Activation to apply after the matrix multiplication
+ * @param[in] post_ops (Optional) A sequence of post operations that are performed after the main operation.
+ * @param[in] fixed_format (Optional) Specify the selection of fixed format kernels for variable weights support in GEMM. These kernels expect the weights tensor to be in amemory format that is fixed by the kernel itself. For more information, see arm_compute::WeightFormat.
+ * @param[in] weight_format (Optional) arm_gemm:WeightFormat enumeration requested by the user. Default is arm_compute::WeightFormat::UNSPECIFIED.
+ */
+ GEMMInfo(bool is_a_reshaped, bool is_b_reshaped, bool reshape_b_only_on_first_run, int depth_output_gemm3d = 0, bool reinterpret_input_as_3d = false, bool retain_internal_weights = false,
+ GEMMLowpOutputStageInfo gemmlowp_output_stage = GEMMLowpOutputStageInfo(), bool fp_mixed_precision = false, bool fast_math = false, bool broadcast_bias = false,
+ const ActivationLayerInfo &activation_info = ActivationLayerInfo(), const experimental::PostOpList<ITensorInfo *> &post_ops = experimental::PostOpList<ITensorInfo *>(),
+ bool fixed_format = false, arm_compute::WeightFormat weight_format = arm_compute::WeightFormat::UNSPECIFIED) noexcept
+ : _is_a_reshaped(is_a_reshaped),
+ _is_b_reshaped(is_b_reshaped),
+ _reshape_b_only_on_first_run(reshape_b_only_on_first_run),
+ _depth_output_gemm3d(depth_output_gemm3d),
+ _reinterpret_input_as_3d(reinterpret_input_as_3d),
+ _retain_internal_weights(retain_internal_weights),
+ _gemmlowp_output_stage(gemmlowp_output_stage),
+ _fast_math(fast_math),
+ _fp_mixed_precision(fp_mixed_precision),
+ _broadcast_bias(broadcast_bias),
+ _pretranspose_A(false),
+ _pretranspose_B(false),
+ _activation_info(activation_info),
+ _post_ops(post_ops),
+ _fixed_format(fixed_format),
+ _weight_format(weight_format)
+ {
+ }
+ /** Flag which specifies if the matrix A has been reshaped
+ *
+ * @return True if the matrix A has been reshaped
+ */
+ bool is_a_reshaped() const
+ {
+ return _is_a_reshaped;
+ };
+ /** Flag which specifies if the matrix B has been reshaped
+ *
+ * @return True if the matrix B has been reshaped
+ */
+ bool is_b_reshaped() const
+ {
+ return _is_b_reshaped;
+ };
+ /** Flag which specifies if the reshape of matrix B should executed only for the first
+ *
+ * @note This flag could be set to TRUE when GEMM is used to accelerate convolution layer
+ *
+ * @return True if the reshaped of matrix B happens only for the first run
+ */
+ bool reshape_b_only_on_first_run() const
+ {
+ return _reshape_b_only_on_first_run;
+ };
+ /** Depth of the output when GEMM output is reinterpreted as 3D tensor
+ *
+ * @return the depth of the output tensor
+ */
+ int depth_output_gemm3d() const
+ {
+ return _depth_output_gemm3d;
+ };
+ /** Flag which specifies if the input tensor has to be reinterpreted as 3D
+ *
+ * @return True if the input tensor has to be reinterpreted as 3D tensor
+ */
+ bool reinterpret_input_as_3d() const
+ {
+ return _reinterpret_input_as_3d;
+ };
+ /** Flag which specifies if the weights tensor has to be retained from previous run
+ *
+ * @return True if the weights tensor has to be retained
+ */
+ bool retain_internal_weights() const
+ {
+ return _retain_internal_weights;
+ };
+ /** GEMMLowp output stage
+ *
+ * @return the GEMMLowp output stage info
+ */
+ GEMMLowpOutputStageInfo gemmlowp_output_stage() const
+ {
+ return _gemmlowp_output_stage;
+ };
+ /** Sets GEMMLowp output stage
+ *
+ * @param[in] output_stage Output stage to set
+ */
+ void set_gemmlowp_output_stage(GEMMLowpOutputStageInfo &output_stage)
+ {
+ _gemmlowp_output_stage = output_stage;
+ };
+ /** Flag which specifies if a wider accumulator should be used.
+ *
+ * @return True if a wider accumulator has to be used
+ */
+ bool fp_mixed_precision() const
+ {
+ return _fp_mixed_precision;
+ };
+ /** Flag which specifies if a shorter accumulator to be used.
+ *
+ * @return True if a shorter accumulator has to be used
+ */
+ bool fast_math() const
+ {
+ return _fast_math;
+ };
+ /** Set fast math flag
+ *
+ * @param[in] fast_math Flag to set
+ */
+ void set_fast_math(bool fast_math)
+ {
+ _fast_math = fast_math;
+ }
+ /** Flag which specifies whether to broadcast the shape of the bias tensor.
+ *
+ * @return True if the shape of the bias tensor is to be broadcasted.
+ */
+ bool broadcast_bias() const
+ {
+ return _broadcast_bias;
+ };
+ /** Flag which specifies whether A should be pre-transposed if supported.
+ *
+ * @return True if A should be pre-transposed else false.
+ */
+ bool pretranspose_A() const
+ {
+ return _pretranspose_A;
+ };
+ /** Set pre-transpose A flag
+ *
+ * @param[in] flag Flag to set
+ */
+ void set_pretranspose_A(bool flag)
+ {
+ _pretranspose_A = flag;
+ }
+ /** Flag which specifies whether b should be pre-transposed if supported.
+ *
+ * @return True if b should be pre-transposed else false.
+ */
+ bool pretranspose_B() const
+ {
+ return _pretranspose_B;
+ };
+ /** Set pre-transpose b flag
+ *
+ * @param[in] flag Flag to set
+ */
+ void set_pretranspose_B(bool flag)
+ {
+ _pretranspose_B = flag;
+ }
+ /** Activation layer to apply after the matrix multiplication
+ *
+ * @return ActivationLayerInfo object
+ */
+ ActivationLayerInfo activation_info() const
+ {
+ return _activation_info;
+ }
+ /** Set activation layer info
+ *
+ * @param[in] activation_info ActivationLayerInfo object to set
+ */
+ void set_activation_info(const ActivationLayerInfo &activation_info)
+ {
+ _activation_info = activation_info;
+ }
+ /** Post operations to apply after the matrix multiplication
+ *
+ * @return experimental::PostOpList object
+ */
+ const experimental::PostOpList<ITensorInfo *> &post_ops() const
+ {
+ return _post_ops;
+ }
+ /** Set post ops
+ *
+ * @param[in] post_ops experimental::PostOpList object to set
+ */
+ void set_post_ops(const experimental::PostOpList<ITensorInfo *> &post_ops)
+ {
+ _post_ops = post_ops;
+ }
+ /** Flag which specifies if the GEMM operation is running fixed-format kernels.
+ *
+ * @return True if the GEMM operation is running fixed-format kernel else false.
+ */
+ bool fixed_format() const
+ {
+ return _fixed_format;
+ }
+
+ /** Set fixed-format flag
+ *
+ * @param[in] fixed_format sets whether or not to use fixed-format kernels
+ */
+ void set_fixed_format(bool fixed_format)
+ {
+ _fixed_format = fixed_format;
+ }
+
+ arm_compute::WeightFormat weight_format() const
+ {
+ return _weight_format;
+ }
+
+ /** Set weight format to be used
+ *
+ * @param[in] weight_format arm_compute::WeightFormat enumeration
+ */
+ void set_weight_format(arm_compute::WeightFormat weight_format)
+ {
+ _weight_format = weight_format;
+ }
+
+private:
+ bool _is_a_reshaped;
+ bool _is_b_reshaped;
+ bool _reshape_b_only_on_first_run;
+ int _depth_output_gemm3d;
+ bool _reinterpret_input_as_3d;
+ bool _retain_internal_weights;
+ GEMMLowpOutputStageInfo _gemmlowp_output_stage;
+ bool _fast_math;
+ bool _fp_mixed_precision;
+ bool _broadcast_bias;
+ bool _pretranspose_A;
+ bool _pretranspose_B;
+ ActivationLayerInfo _activation_info;
+ experimental::PostOpList<ITensorInfo *> _post_ops;
+ bool _fixed_format;
+ arm_compute::WeightFormat _weight_format;
+};
+} //namespace arm_compute
+#endif /* ARM_COMPUTE_GEMMINFO_H */
diff --git a/arm_compute/core/KernelDescriptors.h b/arm_compute/core/KernelDescriptors.h
index f637351e26..1ce37d31c1 100644
--- a/arm_compute/core/KernelDescriptors.h
+++ b/arm_compute/core/KernelDescriptors.h
@@ -26,6 +26,7 @@
#include "arm_compute/core/PixelValue.h"
#include "arm_compute/core/Types.h"
+#include "arm_compute/core/ActivationLayerInfo.h"
#include "arm_compute/core/experimental/IPostOp.h"
namespace arm_compute
diff --git a/arm_compute/core/MatMulInfo.h b/arm_compute/core/MatMulInfo.h
new file mode 100644
index 0000000000..62d782215b
--- /dev/null
+++ b/arm_compute/core/MatMulInfo.h
@@ -0,0 +1,91 @@
+/*
+ * Copyright (c) 2016-2023 Arm Limited.
+ *
+ * SPDX-License-Identifier: MIT
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to
+ * deal in the Software without restriction, including without limitation the
+ * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
+ * sell copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in all
+ * copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ */
+#ifndef ARM_COMPUTE_MATMULINFO_H
+#define ARM_COMPUTE_MATMULINFO_H
+
+#include "arm_compute/core/Coordinates.h"
+#include "arm_compute/core/Size2D.h"
+#include "arm_compute/core/Size3D.h"
+#include "arm_compute/core/Strides.h"
+#include "arm_compute/core/TensorShape.h"
+#include "arm_compute/core/experimental/IPostOp.h"
+#include "arm_compute/core/utils/misc/Macros.h"
+#include "support/Bfloat16.h"
+#include "support/Half.h"
+
+#include <cmath>
+#include <cstddef>
+#include <cstdint>
+#include <map>
+#include <string>
+#include <utility>
+
+namespace arm_compute
+{
+/** Class for holding information related to matrix multiplication function
+ */
+class MatMulInfo
+{
+public:
+ /* Get Adjoint LHS flag value */
+ bool adj_lhs() const
+ {
+ return _adj_lhs;
+ }
+ /* Get Adjoint RHS flag value */
+ bool adj_rhs() const
+ {
+ return _adj_rhs;
+ }
+ /* Get Fused Activation Layer Info */
+ ActivationLayerInfo fused_activation() const
+ {
+ return _fused_act;
+ }
+ /* Set Adjoint LHS flag */
+ MatMulInfo &adj_lhs(bool adj_lhs)
+ {
+ _adj_lhs = adj_lhs;
+ return *this;
+ }
+ /* Set Adjoint RHS flag */
+ MatMulInfo &adj_rhs(bool adj_rhs)
+ {
+ _adj_rhs = adj_rhs;
+ return *this;
+ }
+ /* Set Fused Activation Layer Info */
+ MatMulInfo &fused_activation(const ActivationLayerInfo &act_info)
+ {
+ _fused_act = act_info;
+ return *this;
+ }
+
+private:
+ bool _adj_lhs{ false };
+ bool _adj_rhs{ false };
+ ActivationLayerInfo _fused_act{}; // disabled by default
+};
+} // namespace arm_compute
+#endif /* ARM_COMPUTE_MATMULINFO_H */
diff --git a/arm_compute/core/PixelValue.h b/arm_compute/core/PixelValue.h
index 0e3d26c515..790f58a793 100644
--- a/arm_compute/core/PixelValue.h
+++ b/arm_compute/core/PixelValue.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2016-2021 Arm Limited.
+ * Copyright (c) 2016-2021, 2023 Arm Limited.
*
* SPDX-License-Identifier: MIT
*
@@ -25,6 +25,7 @@
#define ARM_COMPUTE_PIXELVALUE_H
#include "arm_compute/core/Types.h"
+#include "arm_compute/core/QuantizationInfo.h"
#include <cstdint>
diff --git a/arm_compute/core/Types.h b/arm_compute/core/Types.h
index 2613d46d14..8c971d77da 100644
--- a/arm_compute/core/Types.h
+++ b/arm_compute/core/Types.h
@@ -25,7 +25,6 @@
#define ARM_COMPUTE_TYPES_H
#include "arm_compute/core/Coordinates.h"
-#include "arm_compute/core/QuantizationInfo.h"
#include "arm_compute/core/Size2D.h"
#include "arm_compute/core/Size3D.h"
#include "arm_compute/core/Strides.h"
@@ -52,6 +51,27 @@ using PermutationVector = Strides;
/** Bidirectional strides */
using BiStrides = Coordinates;
+/** Available activation functions */
+enum class ActivationFunction
+{
+ LOGISTIC, /**< Logistic ( \f$ f(x) = \frac{1}{1 + e^{-x}} \f$ ) */
+ TANH, /**< Hyperbolic tangent ( \f$ f(x) = a \cdot tanh(b \cdot x) \f$ ) */
+ RELU, /**< Rectifier ( \f$ f(x) = max(0,x) \f$ ) */
+ BOUNDED_RELU, /**< Upper Bounded Rectifier ( \f$ f(x) = min(a, max(0,x)) \f$ ) */
+ LU_BOUNDED_RELU, /**< Lower and Upper Bounded Rectifier ( \f$ f(x) = min(a, max(b,x)) \f$ ) */
+ LEAKY_RELU, /**< Leaky Rectifier ( \f$ f(x) = \begin{cases} \alpha x & \quad \text{if } x \text{ < 0}\\ x & \quad \text{if } x \geq \text{ 0 } \end{cases} \f$ ) */
+ SOFT_RELU, /**< Soft Rectifier ( \f$ f(x)= log(1+e^x) \f$ ) */
+ ELU, /**< Exponential Linear Unit ( \f$ f(x) = \begin{cases} \alpha (exp(x) - 1) & \quad \text{if } x \text{ < 0}\\ x & \quad \text{if } x \geq \text{ 0 } \end{cases} \f$ ) */
+ ABS, /**< Absolute ( \f$ f(x)= |x| \f$ ) */
+ SQUARE, /**< Square ( \f$ f(x)= x^2 \f$ )*/
+ SQRT, /**< Square root ( \f$ f(x) = \sqrt{x} \f$ )*/
+ LINEAR, /**< Linear ( \f$ f(x)= ax + b \f$ ) */
+ IDENTITY, /**< Identity ( \f$ f(x)= x \f$ ) */
+ HARD_SWISH, /**< Hard-swish ( \f$ f(x) = (x \text{ReLU6}(x+3))/6 = x \min(\max(0,x+3),6)/6 \f$ ) */
+ SWISH, /**< Swish ( \f$ f(x) = \frac{x}{1 + e^{-ax}} = x \text{logistic}(ax) \f$ ) */
+ GELU /**< GELU ( \f$ f(x) = x * 1/2 * 1 + erf(x / \sqrt{2}) \f$ ) */
+};
+
/** Image colour formats */
enum class Format
{
@@ -1655,126 +1675,6 @@ private:
float _bbox_xform_clip;
};
-/** Activation Layer Information class */
-class ActivationLayerInfo
-{
-public:
- /** Available activation functions */
- enum class ActivationFunction
- {
- LOGISTIC, /**< Logistic ( \f$ f(x) = \frac{1}{1 + e^{-x}} \f$ ) */
- TANH, /**< Hyperbolic tangent ( \f$ f(x) = a \cdot tanh(b \cdot x) \f$ ) */
- RELU, /**< Rectifier ( \f$ f(x) = max(0,x) \f$ ) */
- BOUNDED_RELU, /**< Upper Bounded Rectifier ( \f$ f(x) = min(a, max(0,x)) \f$ ) */
- LU_BOUNDED_RELU, /**< Lower and Upper Bounded Rectifier ( \f$ f(x) = min(a, max(b,x)) \f$ ) */
- LEAKY_RELU, /**< Leaky Rectifier ( \f$ f(x) = \begin{cases} \alpha x & \quad \text{if } x \text{ < 0}\\ x & \quad \text{if } x \geq \text{ 0 } \end{cases} \f$ ) */
- SOFT_RELU, /**< Soft Rectifier ( \f$ f(x)= log(1+e^x) \f$ ) */
- ELU, /**< Exponential Linear Unit ( \f$ f(x) = \begin{cases} \alpha (exp(x) - 1) & \quad \text{if } x \text{ < 0}\\ x & \quad \text{if } x \geq \text{ 0 } \end{cases} \f$ ) */
- ABS, /**< Absolute ( \f$ f(x)= |x| \f$ ) */
- SQUARE, /**< Square ( \f$ f(x)= x^2 \f$ )*/
- SQRT, /**< Square root ( \f$ f(x) = \sqrt{x} \f$ )*/
- LINEAR, /**< Linear ( \f$ f(x)= ax + b \f$ ) */
- IDENTITY, /**< Identity ( \f$ f(x)= x \f$ ) */
- HARD_SWISH, /**< Hard-swish ( \f$ f(x) = (x \text{ReLU6}(x+3))/6 = x \min(\max(0,x+3),6)/6 \f$ ) */
- SWISH, /**< Swish ( \f$ f(x) = \frac{x}{1 + e^{-ax}} = x \text{logistic}(ax) \f$ ) */
- GELU /**< GELU ( \f$ f(x) = x * 1/2 * 1 + erf(x / \sqrt{2}) \f$ ) */
- };
-
- /** Lookup table */
- using LookupTable256 = std::array<qasymm8_t, 256>;
-
- ActivationLayerInfo() = default;
- /** Default Constructor
- *
- * @param[in] f The activation function to use.
- * @param[in] a (Optional) The alpha parameter used by some activation functions
- * (@ref ActivationFunction::BOUNDED_RELU, @ref ActivationFunction::LU_BOUNDED_RELU, @ref ActivationFunction::LINEAR, @ref ActivationFunction::TANH).
- * @param[in] b (Optional) The beta parameter used by some activation functions (@ref ActivationFunction::LINEAR, @ref ActivationFunction::LU_BOUNDED_RELU, @ref ActivationFunction::TANH).
- */
- ActivationLayerInfo(ActivationFunction f, float a = 0.0f, float b = 0.0f)
- : _act(f), _a(a), _b(b), _enabled(true)
- {
- }
- /** Get the type of activation function */
- ActivationFunction activation() const
- {
- return _act;
- }
- /** Get the alpha value */
- float a() const
- {
- return _a;
- }
- /** Get the beta value */
- float b() const
- {
- return _b;
- }
- /** Check if initialised */
- bool enabled() const
- {
- return _enabled;
- }
-
-#ifdef __aarch64__
- const LookupTable256 &lut() const
- {
- return _lut;
- }
- void setLookupTable256(LookupTable256 &lut)
- {
- _lut = std::move(lut);
- }
-#endif // __aarch64__
-private:
- ActivationFunction _act = { ActivationLayerInfo::ActivationFunction::IDENTITY };
- float _a = {};
- float _b = {};
- bool _enabled = { false };
-
-#ifdef __aarch64__
- LookupTable256 _lut = {};
-#endif // __aarch64__
-};
-
-/** Fully connected layer info */
-struct FullyConnectedLayerInfo
-{
- /* Fused-activation parameters */
- ActivationLayerInfo activation_info{}; /**< Fused activation to apply after the matrix multiplication. */
- /* Information about weights */
- DataLayout weights_trained_layout{ DataLayout::NCHW }; /**< Layout that the weights have been trained with. */
- bool transpose_weights{ true }; /**< Transpose weights if true. */
- bool are_weights_reshaped{ false }; /**< @deprecated Reshape the weights tensor if false. */
- bool retain_internal_weights{ false }; /**< Retain internal reshaped weights. */
- bool enable_fast_math{ false }; /**< Enable fast math computation. */
- /* Other parameters */
- bool fp_mixed_precision{ false }; /**< Use wider accumulators (32 bit instead of 16 for FP16) to improve accuracy. */
-
- /** Sets the weights trained data layout
- *
- * @param[in] layout Data layout that the weights were trained with
- *
- * @return Updated object
- */
- FullyConnectedLayerInfo &set_weights_trained_layout(DataLayout layout)
- {
- weights_trained_layout = layout;
- return *this;
- }
- /** Sets the transpose weights flag
- *
- * @param[in] should_transpose_weights Boolean flag indicating if weights should be transposed
- *
- * @return Updated object
- */
- FullyConnectedLayerInfo &set_transpose_weights(bool should_transpose_weights)
- {
- transpose_weights = should_transpose_weights;
- return *this;
- }
-};
-
/** Normalization Layer Information class */
class NormalizationLayerInfo
{
@@ -2193,19 +2093,6 @@ private:
bool _broadcast_bias;
};
-struct ConvolutionInfo
-{
- ConvolutionInfo() = default;
- ConvolutionInfo(const PadStrideInfo &pad_stride_info, unsigned int depth_multiplier, const ActivationLayerInfo &act_info, const Size2D &dilation)
- : pad_stride_info(pad_stride_info), depth_multiplier(depth_multiplier), act_info(act_info), dilation(dilation)
- {
- }
- PadStrideInfo pad_stride_info{}; /**< Convolution info (Pads, strides,...) */
- unsigned int depth_multiplier{ 1 }; /**< Multiplier to apply to input's depth to retrieve the output depth. Defaults to 1 */
- ActivationLayerInfo act_info{}; /**< Fused activation to apply after convolution. */
- Size2D dilation{ Size2D(1, 1) }; /**< Dilation, in elements, across x and y. Defaults to (1, 1). */
-};
-
/** GEMMLowp output stage type */
enum class GEMMLowpOutputStageType
{
@@ -2263,287 +2150,6 @@ struct GEMMRHSMatrixInfo
};
class ITensorInfo;
-/** GEMM information class. This class stores the necessary information to compute GEMM functions
- *
- * This object also contains the information about how matrix A and matrix B have been reshaped
- *
- */
-class GEMMInfo
-{
-public:
- /** Default constructor */
- GEMMInfo() noexcept
- : _is_a_reshaped(false),
- _is_b_reshaped(false),
- _reshape_b_only_on_first_run(true),
- _depth_output_gemm3d(0),
- _reinterpret_input_as_3d(false),
- _retain_internal_weights(false),
- _gemmlowp_output_stage(),
- _fast_math(false),
- _fp_mixed_precision(false),
- _broadcast_bias(false),
- _pretranspose_A(false),
- _pretranspose_B(false),
- _activation_info(),
- _post_ops(),
- _fixed_format(false),
- _weight_format(arm_compute::WeightFormat::UNSPECIFIED)
- {
- }
- /** Constructor
- *
- * @param[in] is_a_reshaped True if the matrix A has been reshaped
- * @param[in] is_b_reshaped True if the matrix B has been reshaped
- * @param[in] reshape_b_only_on_first_run Reshape matrix B only for the first run
- * @param[in] depth_output_gemm3d (Optional) Depth (third dimension) of the output tensor to be used with the GEMM3D kernel
- * If 0 the output will not be reinterpreted as 3D. Default 0
- * @param[in] reinterpret_input_as_3d (Optional) Reinterpret the input as 3D tensor. (i.e. this flag should be set to true when GEMM is used
- * to perform 1x1 convolutions with the NHWC data layout)
- * @param[in] retain_internal_weights (Optional) Retain the weights tensor from previous run
- * @param[in] gemmlowp_output_stage (Optional) GEMMLowp Output stage info
- * @param[in] fp_mixed_precision (Optional) Use wider accumulators (32 bit instead of 16 for FP16) to improve accuracy.
- * @param[in] fast_math (Optional) Use a data type of shorter width to improve performance
- * @param[in] broadcast_bias (Optional) Broadcast the shape of the bias tensor from a vector to a matrix.
- * @param[in] activation_info (Optional) Activation to apply after the matrix multiplication
- * @param[in] post_ops (Optional) A sequence of post operations that are performed after the main operation.
- * @param[in] fixed_format (Optional) Specify the selection of fixed format kernels for variable weights support in GEMM. These kernels expect the weights tensor to be in amemory format that is fixed by the kernel itself. For more information, see arm_compute::WeightFormat.
- * @param[in] weight_format (Optional) arm_gemm:WeightFormat enumeration requested by the user. Default is arm_compute::WeightFormat::UNSPECIFIED.
- */
- GEMMInfo(bool is_a_reshaped, bool is_b_reshaped, bool reshape_b_only_on_first_run, int depth_output_gemm3d = 0, bool reinterpret_input_as_3d = false, bool retain_internal_weights = false,
- GEMMLowpOutputStageInfo gemmlowp_output_stage = GEMMLowpOutputStageInfo(), bool fp_mixed_precision = false, bool fast_math = false, bool broadcast_bias = false,
- const ActivationLayerInfo &activation_info = ActivationLayerInfo(), const experimental::PostOpList<ITensorInfo *> &post_ops = experimental::PostOpList<ITensorInfo *>(),
- bool fixed_format = false, arm_compute::WeightFormat weight_format = arm_compute::WeightFormat::UNSPECIFIED) noexcept
- : _is_a_reshaped(is_a_reshaped),
- _is_b_reshaped(is_b_reshaped),
- _reshape_b_only_on_first_run(reshape_b_only_on_first_run),
- _depth_output_gemm3d(depth_output_gemm3d),
- _reinterpret_input_as_3d(reinterpret_input_as_3d),
- _retain_internal_weights(retain_internal_weights),
- _gemmlowp_output_stage(gemmlowp_output_stage),
- _fast_math(fast_math),
- _fp_mixed_precision(fp_mixed_precision),
- _broadcast_bias(broadcast_bias),
- _pretranspose_A(false),
- _pretranspose_B(false),
- _activation_info(activation_info),
- _post_ops(post_ops),
- _fixed_format(fixed_format),
- _weight_format(weight_format)
- {
- }
- /** Flag which specifies if the matrix A has been reshaped
- *
- * @return True if the matrix A has been reshaped
- */
- bool is_a_reshaped() const
- {
- return _is_a_reshaped;
- };
- /** Flag which specifies if the matrix B has been reshaped
- *
- * @return True if the matrix B has been reshaped
- */
- bool is_b_reshaped() const
- {
- return _is_b_reshaped;
- };
- /** Flag which specifies if the reshape of matrix B should executed only for the first
- *
- * @note This flag could be set to TRUE when GEMM is used to accelerate convolution layer
- *
- * @return True if the reshaped of matrix B happens only for the first run
- */
- bool reshape_b_only_on_first_run() const
- {
- return _reshape_b_only_on_first_run;
- };
- /** Depth of the output when GEMM output is reinterpreted as 3D tensor
- *
- * @return the depth of the output tensor
- */
- int depth_output_gemm3d() const
- {
- return _depth_output_gemm3d;
- };
- /** Flag which specifies if the input tensor has to be reinterpreted as 3D
- *
- * @return True if the input tensor has to be reinterpreted as 3D tensor
- */
- bool reinterpret_input_as_3d() const
- {
- return _reinterpret_input_as_3d;
- };
- /** Flag which specifies if the weights tensor has to be retained from previous run
- *
- * @return True if the weights tensor has to be retained
- */
- bool retain_internal_weights() const
- {
- return _retain_internal_weights;
- };
- /** GEMMLowp output stage
- *
- * @return the GEMMLowp output stage info
- */
- GEMMLowpOutputStageInfo gemmlowp_output_stage() const
- {
- return _gemmlowp_output_stage;
- };
- /** Sets GEMMLowp output stage
- *
- * @param[in] output_stage Output stage to set
- */
- void set_gemmlowp_output_stage(GEMMLowpOutputStageInfo &output_stage)
- {
- _gemmlowp_output_stage = output_stage;
- };
- /** Flag which specifies if a wider accumulator should be used.
- *
- * @return True if a wider accumulator has to be used
- */
- bool fp_mixed_precision() const
- {
- return _fp_mixed_precision;
- };
- /** Flag which specifies if a shorter accumulator to be used.
- *
- * @return True if a shorter accumulator has to be used
- */
- bool fast_math() const
- {
- return _fast_math;
- };
- /** Set fast math flag
- *
- * @param[in] fast_math Flag to set
- */
- void set_fast_math(bool fast_math)
- {
- _fast_math = fast_math;
- }
- /** Flag which specifies whether to broadcast the shape of the bias tensor.
- *
- * @return True if the shape of the bias tensor is to be broadcasted.
- */
- bool broadcast_bias() const
- {
- return _broadcast_bias;
- };
- /** Flag which specifies whether A should be pre-transposed if supported.
- *
- * @return True if A should be pre-transposed else false.
- */
- bool pretranspose_A() const
- {
- return _pretranspose_A;
- };
- /** Set pre-transpose A flag
- *
- * @param[in] flag Flag to set
- */
- void set_pretranspose_A(bool flag)
- {
- _pretranspose_A = flag;
- }
- /** Flag which specifies whether b should be pre-transposed if supported.
- *
- * @return True if b should be pre-transposed else false.
- */
- bool pretranspose_B() const
- {
- return _pretranspose_B;
- };
- /** Set pre-transpose b flag
- *
- * @param[in] flag Flag to set
- */
- void set_pretranspose_B(bool flag)
- {
- _pretranspose_B = flag;
- }
- /** Activation layer to apply after the matrix multiplication
- *
- * @return ActivationLayerInfo object
- */
- ActivationLayerInfo activation_info() const
- {
- return _activation_info;
- }
- /** Set activation layer info
- *
- * @param[in] activation_info ActivationLayerInfo object to set
- */
- void set_activation_info(const ActivationLayerInfo &activation_info)
- {
- _activation_info = activation_info;
- }
- /** Post operations to apply after the matrix multiplication
- *
- * @return experimental::PostOpList object
- */
- const experimental::PostOpList<ITensorInfo *> &post_ops() const
- {
- return _post_ops;
- }
- /** Set post ops
- *
- * @param[in] post_ops experimental::PostOpList object to set
- */
- void set_post_ops(const experimental::PostOpList<ITensorInfo *> &post_ops)
- {
- _post_ops = post_ops;
- }
- /** Flag which specifies if the GEMM operation is running fixed-format kernels.
- *
- * @return True if the GEMM operation is running fixed-format kernel else false.
- */
- bool fixed_format() const
- {
- return _fixed_format;
- }
-
- /** Set fixed-format flag
- *
- * @param[in] fixed_format sets whether or not to use fixed-format kernels
- */
- void set_fixed_format(bool fixed_format)
- {
- _fixed_format = fixed_format;
- }
-
- arm_compute::WeightFormat weight_format() const
- {
- return _weight_format;
- }
-
- /** Set weight format to be used
- *
- * @param[in] weight_format arm_compute::WeightFormat enumeration
- */
- void set_weight_format(arm_compute::WeightFormat weight_format)
- {
- _weight_format = weight_format;
- }
-
-private:
- bool _is_a_reshaped;
- bool _is_b_reshaped;
- bool _reshape_b_only_on_first_run;
- int _depth_output_gemm3d;
- bool _reinterpret_input_as_3d;
- bool _retain_internal_weights;
- GEMMLowpOutputStageInfo _gemmlowp_output_stage;
- bool _fast_math;
- bool _fp_mixed_precision;
- bool _broadcast_bias;
- bool _pretranspose_A;
- bool _pretranspose_B;
- ActivationLayerInfo _activation_info;
- experimental::PostOpList<ITensorInfo *> _post_ops;
- bool _fixed_format;
- arm_compute::WeightFormat _weight_format;
-};
/** Winograd information */
struct WinogradInfo
@@ -2625,51 +2231,6 @@ struct IOFormatInfo
bool align_columns;
};
-/** Class for holding information related to matrix multiplication function
- */
-class MatMulInfo
-{
-public:
- /* Get Adjoint LHS flag value */
- bool adj_lhs() const
- {
- return _adj_lhs;
- }
- /* Get Adjoint RHS flag value */
- bool adj_rhs() const
- {
- return _adj_rhs;
- }
- /* Get Fused Activation Layer Info */
- ActivationLayerInfo fused_activation() const
- {
- return _fused_act;
- }
- /* Set Adjoint LHS flag */
- MatMulInfo &adj_lhs(bool adj_lhs)
- {
- _adj_lhs = adj_lhs;
- return *this;
- }
- /* Set Adjoint RHS flag */
- MatMulInfo &adj_rhs(bool adj_rhs)
- {
- _adj_rhs = adj_rhs;
- return *this;
- }
- /* Set Fused Activation Layer Info */
- MatMulInfo &fused_activation(const ActivationLayerInfo &act_info)
- {
- _fused_act = act_info;
- return *this;
- }
-
-private:
- bool _adj_lhs{ false };
- bool _adj_rhs{ false };
- ActivationLayerInfo _fused_act{}; // disabled by default
-};
-
/** Class for holding information related to cropping */
using CropInfo = Padding2D;
} // namespace arm_compute
diff --git a/arm_compute/core/Utils.h b/arm_compute/core/Utils.h
index a47cfbdec6..4e374e6a32 100644
--- a/arm_compute/core/Utils.h
+++ b/arm_compute/core/Utils.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2016-2022 Arm Limited.
+ * Copyright (c) 2016-2023 Arm Limited.
*
* SPDX-License-Identifier: MIT
*
@@ -46,6 +46,7 @@ namespace arm_compute
{
class ITensor;
class ITensorInfo;
+class ActivationLayerInfo;
/** Calculate the rounded up quotient of val / m.
*
@@ -837,7 +838,7 @@ QuantizationInfo get_softmax_output_quantization_info(DataType input_type, bool
*
* @return The pair with minimum and maximum values
*/
-std::pair<int32_t, int32_t> get_quantized_activation_min_max(ActivationLayerInfo act_info, DataType data_type, UniformQuantizationInfo oq_info);
+std::pair<int32_t, int32_t> get_quantized_activation_min_max(const ActivationLayerInfo& act_info, DataType data_type, UniformQuantizationInfo oq_info);
/** Convert a tensor format into a string.
*
@@ -874,7 +875,7 @@ const std::string &string_from_data_type(DataType dt);
*
* @return The string describing the activation function.
*/
-const std::string &string_from_activation_func(ActivationLayerInfo::ActivationFunction act);
+const std::string &string_from_activation_func(const ActivationFunction& act);
/** Translates a given interpolation policy to a string.
*
* @param[in] policy @ref InterpolationPolicy to be translated to string.
diff --git a/arm_compute/core/experimental/PostOps.h b/arm_compute/core/experimental/PostOps.h
index 4ea90fc348..c70df841b8 100644
--- a/arm_compute/core/experimental/PostOps.h
+++ b/arm_compute/core/experimental/PostOps.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2021 Arm Limited.
+ * Copyright (c) 2021, 2023 Arm Limited.
*
* SPDX-License-Identifier: MIT
*
@@ -26,6 +26,7 @@
#include "arm_compute/core/experimental/IPostOp.h"
+#include "arm_compute/core/ActivationLayerInfo.h"
#include "arm_compute/core/Types.h"
#include <vector>
@@ -159,4 +160,4 @@ public:
};
} // namespace experimental
} // namespace arm_compute
-#endif //ARM_COMPUTE_EXPERIMENTAL_POSTOPS \ No newline at end of file
+#endif //ARM_COMPUTE_EXPERIMENTAL_POSTOPS
diff --git a/arm_compute/core/utils/misc/ShapeCalculator.h b/arm_compute/core/utils/misc/ShapeCalculator.h
index 3461d6a341..2a4aa4d7db 100644
--- a/arm_compute/core/utils/misc/ShapeCalculator.h
+++ b/arm_compute/core/utils/misc/ShapeCalculator.h
@@ -24,6 +24,7 @@
#ifndef ACL_ARM_COMPUTE_CORE_UTILS_MISC_SHAPECALCULATOR
#define ACL_ARM_COMPUTE_CORE_UTILS_MISC_SHAPECALCULATOR
+#include "arm_compute/core/ConvolutionInfo.h"
#include "arm_compute/core/Helpers.h"
#include "arm_compute/core/ITensorInfo.h"
#include "arm_compute/core/KernelDescriptors.h"
diff --git a/arm_compute/graph/Types.h b/arm_compute/graph/Types.h
index ff33d5037b..644f12b6a4 100644
--- a/arm_compute/graph/Types.h
+++ b/arm_compute/graph/Types.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2018-2021 Arm Limited.
+ * Copyright (c) 2018-2021, 2023 Arm Limited.
*
* SPDX-License-Identifier: MIT
*
@@ -27,6 +27,10 @@
#include "arm_compute/core/Error.h"
#include "arm_compute/core/PixelValue.h"
#include "arm_compute/core/Types.h"
+#include "arm_compute/core/ActivationLayerInfo.h"
+#include "arm_compute/core/ConvolutionInfo.h"
+#include "arm_compute/core/FullyConnectedLayerInfo.h"
+#include "arm_compute/core/GEMMInfo.h"
#include "arm_compute/runtime/CL/CLTunerTypes.h"
#include "arm_compute/runtime/CL/CLTypes.h"
diff --git a/arm_compute/runtime/CL/functions/CLBatchNormalizationLayer.h b/arm_compute/runtime/CL/functions/CLBatchNormalizationLayer.h
index fcfeb5ea3b..2acdfc37ab 100644
--- a/arm_compute/runtime/CL/functions/CLBatchNormalizationLayer.h
+++ b/arm_compute/runtime/CL/functions/CLBatchNormalizationLayer.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2017-2021 Arm Limited.
+ * Copyright (c) 2017-2021, 2023 Arm Limited.
*
* SPDX-License-Identifier: MIT
*
@@ -26,6 +26,7 @@
#include "arm_compute/runtime/IFunction.h"
+#include "arm_compute/core/ActivationLayerInfo.h"
#include "arm_compute/core/Types.h"
#include <memory>
diff --git a/arm_compute/runtime/CL/functions/CLConvolutionLayer.h b/arm_compute/runtime/CL/functions/CLConvolutionLayer.h
index 38a4019609..4b8c550442 100644
--- a/arm_compute/runtime/CL/functions/CLConvolutionLayer.h
+++ b/arm_compute/runtime/CL/functions/CLConvolutionLayer.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2017-2021 Arm Limited.
+ * Copyright (c) 2017-2021, 2023 Arm Limited.
*
* SPDX-License-Identifier: MIT
*
@@ -24,6 +24,7 @@
#ifndef ARM_COMPUTE_CLCONVOLUTIONLAYER_H
#define ARM_COMPUTE_CLCONVOLUTIONLAYER_H
+#include "arm_compute/core/ActivationLayerInfo.h"
#include "arm_compute/core/CL/CLCompileContext.h"
#include "arm_compute/core/Types.h"
#include "arm_compute/core/experimental/IPostOp.h"
diff --git a/arm_compute/runtime/CL/functions/CLDepthwiseConvolutionLayer.h b/arm_compute/runtime/CL/functions/CLDepthwiseConvolutionLayer.h
index 01ddae12bb..9613caa10a 100644
--- a/arm_compute/runtime/CL/functions/CLDepthwiseConvolutionLayer.h
+++ b/arm_compute/runtime/CL/functions/CLDepthwiseConvolutionLayer.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2017-2021 Arm Limited.
+ * Copyright (c) 2017-2021, 2023 Arm Limited.
*
* SPDX-License-Identifier: MIT
*
@@ -24,6 +24,7 @@
#ifndef ARM_COMPUTE_CLDEPTHWISECONVOLUTION_H
#define ARM_COMPUTE_CLDEPTHWISECONVOLUTION_H
+#include "arm_compute/core/ActivationLayerInfo.h"
#include "arm_compute/core/Types.h"
#include "arm_compute/runtime/CL/CLTensor.h"
#include "arm_compute/runtime/CL/functions/CLPermute.h"
diff --git a/arm_compute/runtime/CL/functions/CLDirectConvolutionLayer.h b/arm_compute/runtime/CL/functions/CLDirectConvolutionLayer.h
index 3fd0c63782..bc6f34f2a9 100644
--- a/arm_compute/runtime/CL/functions/CLDirectConvolutionLayer.h
+++ b/arm_compute/runtime/CL/functions/CLDirectConvolutionLayer.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2017-2021 Arm Limited.
+ * Copyright (c) 2017-2021, 2023 Arm Limited.
*
* SPDX-License-Identifier: MIT
*
@@ -24,6 +24,7 @@
#ifndef ARM_COMPUTE_CLDIRECTCONVOLUTIONLAYER_H
#define ARM_COMPUTE_CLDIRECTCONVOLUTIONLAYER_H
+#include "arm_compute/core/ActivationLayerInfo.h"
#include "arm_compute/core/Types.h"
#include "arm_compute/runtime/CL/functions/CLActivationLayer.h"
#include "arm_compute/runtime/IFunction.h"
diff --git a/arm_compute/runtime/CL/functions/CLElementwiseOperations.h b/arm_compute/runtime/CL/functions/CLElementwiseOperations.h
index 555e84a251..ecebac435a 100644
--- a/arm_compute/runtime/CL/functions/CLElementwiseOperations.h
+++ b/arm_compute/runtime/CL/functions/CLElementwiseOperations.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2018-2021 Arm Limited.
+ * Copyright (c) 2018-2021, 2023 Arm Limited.
*
* SPDX-License-Identifier: MIT
*
@@ -24,6 +24,7 @@
#ifndef ARM_COMPUTE_CLELEMENTWISEOPERATIONS_H
#define ARM_COMPUTE_CLELEMENTWISEOPERATIONS_H
+#include "arm_compute/core/ActivationLayerInfo.h"
#include "arm_compute/runtime/CL/ICLOperator.h"
#include "arm_compute/runtime/IFunction.h"
diff --git a/arm_compute/runtime/CL/functions/CLFullyConnectedLayer.h b/arm_compute/runtime/CL/functions/CLFullyConnectedLayer.h
index 2947b4890c..19243e473a 100644
--- a/arm_compute/runtime/CL/functions/CLFullyConnectedLayer.h
+++ b/arm_compute/runtime/CL/functions/CLFullyConnectedLayer.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2017-2021 Arm Limited.
+ * Copyright (c) 2017-2021, 2023 Arm Limited.
*
* SPDX-License-Identifier: MIT
*
@@ -24,6 +24,7 @@
#ifndef ARM_COMPUTE_CLFULLYCONNECTEDLAYER_H
#define ARM_COMPUTE_CLFULLYCONNECTEDLAYER_H
+#include "arm_compute/core/FullyConnectedLayerInfo.h"
#include "arm_compute/runtime/IFunction.h"
#include "arm_compute/runtime/CL/CLTensor.h"
diff --git a/arm_compute/runtime/CL/functions/CLGEMM.h b/arm_compute/runtime/CL/functions/CLGEMM.h
index b267bf1cf2..b72ffa0357 100644
--- a/arm_compute/runtime/CL/functions/CLGEMM.h
+++ b/arm_compute/runtime/CL/functions/CLGEMM.h
@@ -24,6 +24,7 @@
#ifndef ARM_COMPUTE_CLGEMM_H
#define ARM_COMPUTE_CLGEMM_H
+#include "arm_compute/core/GEMMInfo.h"
#include "arm_compute/runtime/CL/CLTensor.h"
#include "arm_compute/runtime/CL/CLTypes.h"
#include "arm_compute/runtime/IFunction.h"
diff --git a/arm_compute/runtime/CL/functions/CLGEMMConvolutionLayer.h b/arm_compute/runtime/CL/functions/CLGEMMConvolutionLayer.h
index 9918a61cab..f07fbb4cc9 100644
--- a/arm_compute/runtime/CL/functions/CLGEMMConvolutionLayer.h
+++ b/arm_compute/runtime/CL/functions/CLGEMMConvolutionLayer.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2017-2021 Arm Limited.
+ * Copyright (c) 2017-2021, 2023 Arm Limited.
*
* SPDX-License-Identifier: MIT
*
@@ -24,6 +24,7 @@
#ifndef ARM_COMPUTE_CLGEMMCONVOLUTIONLAYER_H
#define ARM_COMPUTE_CLGEMMCONVOLUTIONLAYER_H
+#include "arm_compute/core/ActivationLayerInfo.h"
#include "arm_compute/core/experimental/IPostOp.h"
#include "arm_compute/runtime/CL/CLTensor.h"
#include "arm_compute/runtime/CL/CLTypes.h"
diff --git a/arm_compute/runtime/CL/functions/CLGEMMLowpMatrixMultiplyCore.h b/arm_compute/runtime/CL/functions/CLGEMMLowpMatrixMultiplyCore.h
index a8ee9e5b56..1532060293 100644
--- a/arm_compute/runtime/CL/functions/CLGEMMLowpMatrixMultiplyCore.h
+++ b/arm_compute/runtime/CL/functions/CLGEMMLowpMatrixMultiplyCore.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2017-2021 Arm Limited.
+ * Copyright (c) 2017-2021, 2023 Arm Limited.
*
* SPDX-License-Identifier: MIT
*
@@ -24,6 +24,7 @@
#ifndef ARM_COMPUTE_CLGEMMLOWPMATRIXMULTIPLYCORE_H
#define ARM_COMPUTE_CLGEMMLOWPMATRIXMULTIPLYCORE_H
+#include "arm_compute/core/GEMMInfo.h"
#include "arm_compute/runtime/CL/CLTensor.h"
#include "arm_compute/runtime/IFunction.h"
#include "arm_compute/runtime/MemoryGroup.h"
@@ -132,4 +133,4 @@ private:
std::unique_ptr<Impl> _impl;
};
} // namespace arm_compute
-#endif /*ARM_COMPUTE_CLGEMMLOWPMATRIXMULTIPLYCORE_H */ \ No newline at end of file
+#endif /*ARM_COMPUTE_CLGEMMLOWPMATRIXMULTIPLYCORE_H */
diff --git a/arm_compute/runtime/CL/functions/CLIndirectConvolutionLayer.h b/arm_compute/runtime/CL/functions/CLIndirectConvolutionLayer.h
index 8185f8df78..11677fb83a 100644
--- a/arm_compute/runtime/CL/functions/CLIndirectConvolutionLayer.h
+++ b/arm_compute/runtime/CL/functions/CLIndirectConvolutionLayer.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2022 Arm Limited.
+ * Copyright (c) 2022-2023 Arm Limited.
*
* SPDX-License-Identifier: MIT
*
@@ -24,6 +24,7 @@
#ifndef ARM_COMPUTE_CLINDIRECTCONVOLUTIONLAYER_H
#define ARM_COMPUTE_CLINDIRECTCONVOLUTIONLAYER_H
+#include "arm_compute/core/ActivationLayerInfo.h"
#include "arm_compute/core/Types.h"
#include "arm_compute/runtime/IFunction.h"
diff --git a/arm_compute/runtime/CL/functions/CLPixelWiseMultiplication.h b/arm_compute/runtime/CL/functions/CLPixelWiseMultiplication.h
index d352c6e282..f9081cfe25 100644
--- a/arm_compute/runtime/CL/functions/CLPixelWiseMultiplication.h
+++ b/arm_compute/runtime/CL/functions/CLPixelWiseMultiplication.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2016-2021 Arm Limited.
+ * Copyright (c) 2016-2021, 2023 Arm Limited.
*
* SPDX-License-Identifier: MIT
*
@@ -24,6 +24,8 @@
#ifndef ARM_COMPUTE_CLPIXELWISEMULTIPLICATION_H
#define ARM_COMPUTE_CLPIXELWISEMULTIPLICATION_H
+#include "arm_compute/core/ActivationLayerInfo.h"
+#include "arm_compute/core/Rounding.h"
#include "arm_compute/runtime/CL/ICLOperator.h"
#include "arm_compute/runtime/IFunction.h"
diff --git a/arm_compute/runtime/CL/functions/CLWinogradConvolutionLayer.h b/arm_compute/runtime/CL/functions/CLWinogradConvolutionLayer.h
index 4b351267e3..74ffe46690 100644
--- a/arm_compute/runtime/CL/functions/CLWinogradConvolutionLayer.h
+++ b/arm_compute/runtime/CL/functions/CLWinogradConvolutionLayer.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2018-2021 Arm Limited.
+ * Copyright (c) 2018-2021, 2023 Arm Limited.
*
* SPDX-License-Identifier: MIT
*
@@ -24,6 +24,7 @@
#ifndef ARM_COMPUTE_CLWINOGRADCONVOLUTIONLAYER_H
#define ARM_COMPUTE_CLWINOGRADCONVOLUTIONLAYER_H
+#include "arm_compute/core/ActivationLayerInfo.h"
#include "arm_compute/core/Types.h"
#include "arm_compute/runtime/IFunction.h"
#include "arm_compute/runtime/IMemoryManager.h"
diff --git a/arm_compute/runtime/FunctionDescriptors.h b/arm_compute/runtime/FunctionDescriptors.h
index af79820bc3..241359519f 100644
--- a/arm_compute/runtime/FunctionDescriptors.h
+++ b/arm_compute/runtime/FunctionDescriptors.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2019-2022 Arm Limited.
+ * Copyright (c) 2019-2023 Arm Limited.
*
* SPDX-License-Identifier: MIT
*
@@ -24,6 +24,7 @@
#ifndef ARM_COMPUTE_RUNTIME_FUNCTION_DESCRIPTORS_H
#define ARM_COMPUTE_RUNTIME_FUNCTION_DESCRIPTORS_H
+#include "arm_compute/core/ActivationLayerInfo.h"
#include "arm_compute/core/Types.h"
#include <utility>
diff --git a/arm_compute/runtime/NEON/functions/NEActivationLayer.h b/arm_compute/runtime/NEON/functions/NEActivationLayer.h
index b39a8d7701..7a1e532cf7 100644
--- a/arm_compute/runtime/NEON/functions/NEActivationLayer.h
+++ b/arm_compute/runtime/NEON/functions/NEActivationLayer.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2017-2021 Arm Limited.
+ * Copyright (c) 2017-2021, 2023 Arm Limited.
*
* SPDX-License-Identifier: MIT
*
@@ -26,6 +26,7 @@
#include "arm_compute/runtime/IFunction.h"
+#include "arm_compute/core/ActivationLayerInfo.h"
#include "arm_compute/core/Types.h"
#include "arm_compute/runtime/IRuntimeContext.h"
diff --git a/arm_compute/runtime/NEON/functions/NEAddMulAdd.h b/arm_compute/runtime/NEON/functions/NEAddMulAdd.h
index 28185f338f..e5e85542f8 100644
--- a/arm_compute/runtime/NEON/functions/NEAddMulAdd.h
+++ b/arm_compute/runtime/NEON/functions/NEAddMulAdd.h
@@ -34,6 +34,7 @@ namespace arm_compute
{
class ITensor;
class ITensorInfo;
+class ActivationLayerInfo;
/** Function to compute Add+Mul+Add fused operation */
class NEAddMulAdd : public IFunction
diff --git a/arm_compute/runtime/NEON/functions/NEArithmeticAddition.h b/arm_compute/runtime/NEON/functions/NEArithmeticAddition.h
index b9012b02a9..e55c6d94fc 100644
--- a/arm_compute/runtime/NEON/functions/NEArithmeticAddition.h
+++ b/arm_compute/runtime/NEON/functions/NEArithmeticAddition.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2016-2021 Arm Limited.
+ * Copyright (c) 2016-2021, 2023 Arm Limited.
*
* SPDX-License-Identifier: MIT
*
@@ -24,6 +24,7 @@
#ifndef ARM_COMPUTE_NEARITHMETICADDITION_H
#define ARM_COMPUTE_NEARITHMETICADDITION_H
+#include "arm_compute/core/ActivationLayerInfo.h"
#include "arm_compute/core/Types.h"
#include "arm_compute/runtime/IFunction.h"
#include <memory>
diff --git a/arm_compute/runtime/NEON/functions/NEArithmeticSubtraction.h b/arm_compute/runtime/NEON/functions/NEArithmeticSubtraction.h
index 0b4db61d29..483d81bdf6 100644
--- a/arm_compute/runtime/NEON/functions/NEArithmeticSubtraction.h
+++ b/arm_compute/runtime/NEON/functions/NEArithmeticSubtraction.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2016-2021 Arm Limited.
+ * Copyright (c) 2016-2021, 2023 Arm Limited.
*
* SPDX-License-Identifier: MIT
*
@@ -24,6 +24,7 @@
#ifndef ARM_COMPUTE_NEARITHMETICSUBTRACTION_H
#define ARM_COMPUTE_NEARITHMETICSUBTRACTION_H
+#include "arm_compute/core/ActivationLayerInfo.h"
#include "arm_compute/core/Types.h"
#include "arm_compute/runtime/IFunction.h"
#include "arm_compute/runtime/NEON/INEOperator.h"
diff --git a/arm_compute/runtime/NEON/functions/NEConvolutionLayer.h b/arm_compute/runtime/NEON/functions/NEConvolutionLayer.h
index 974b320043..8b9b157918 100644
--- a/arm_compute/runtime/NEON/functions/NEConvolutionLayer.h
+++ b/arm_compute/runtime/NEON/functions/NEConvolutionLayer.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2018-2021 Arm Limited.
+ * Copyright (c) 2018-2021, 2023 Arm Limited.
*
* SPDX-License-Identifier: MIT
*
@@ -26,6 +26,7 @@
#include "arm_compute/runtime/IFunction.h"
+#include "arm_compute/core/ActivationLayerInfo.h"
#include "arm_compute/core/ITensorInfo.h"
#include "arm_compute/core/Types.h"
#include "arm_compute/runtime/MemoryGroup.h"
diff --git a/arm_compute/runtime/NEON/functions/NEDirectConvolutionLayer.h b/arm_compute/runtime/NEON/functions/NEDirectConvolutionLayer.h
index 70352fdfaa..02eb3ac7d1 100644
--- a/arm_compute/runtime/NEON/functions/NEDirectConvolutionLayer.h
+++ b/arm_compute/runtime/NEON/functions/NEDirectConvolutionLayer.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2017-2021 Arm Limited.
+ * Copyright (c) 2017-2021, 2023 Arm Limited.
*
* SPDX-License-Identifier: MIT
*
@@ -24,6 +24,7 @@
#ifndef ARM_COMPUTE_NEDIRECTCONVOLUTIONLAYER_H
#define ARM_COMPUTE_NEDIRECTCONVOLUTIONLAYER_H
+#include "arm_compute/core/ActivationLayerInfo.h"
#include "arm_compute/core/Types.h"
#include "arm_compute/runtime/IFunction.h"
#include "arm_compute/runtime/IMemoryManager.h"
diff --git a/arm_compute/runtime/NEON/functions/NEElementwiseOperations.h b/arm_compute/runtime/NEON/functions/NEElementwiseOperations.h
index 95274bdb0c..c91ae203bb 100644
--- a/arm_compute/runtime/NEON/functions/NEElementwiseOperations.h
+++ b/arm_compute/runtime/NEON/functions/NEElementwiseOperations.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2018-2021 Arm Limited.
+ * Copyright (c) 2018-2021, 2023 Arm Limited.
*
* SPDX-License-Identifier: MIT
*
@@ -24,6 +24,7 @@
#ifndef ARM_COMPUTE_NEELEMENTWISEOPERATIONS_H
#define ARM_COMPUTE_NEELEMENTWISEOPERATIONS_H
+#include "arm_compute/core/ActivationLayerInfo.h"
#include "arm_compute/core/Types.h"
#include "arm_compute/runtime/IFunction.h"
#include "arm_compute/runtime/NEON/INEOperator.h"
diff --git a/arm_compute/runtime/NEON/functions/NEFullyConnectedLayer.h b/arm_compute/runtime/NEON/functions/NEFullyConnectedLayer.h
index 6a4de2e311..d0367b79fd 100644
--- a/arm_compute/runtime/NEON/functions/NEFullyConnectedLayer.h
+++ b/arm_compute/runtime/NEON/functions/NEFullyConnectedLayer.h
@@ -24,6 +24,7 @@
#ifndef ARM_COMPUTE_NEFULLYCONNECTEDLAYER_H
#define ARM_COMPUTE_NEFULLYCONNECTEDLAYER_H
+#include "arm_compute/core/FullyConnectedLayerInfo.h"
#include "arm_compute/runtime/IFunction.h"
#include "arm_compute/runtime/IMemoryManager.h"
#include "arm_compute/runtime/IWeightsManager.h"
diff --git a/arm_compute/runtime/NEON/functions/NEGEMM.h b/arm_compute/runtime/NEON/functions/NEGEMM.h
index db15923165..2ad3746718 100644
--- a/arm_compute/runtime/NEON/functions/NEGEMM.h
+++ b/arm_compute/runtime/NEON/functions/NEGEMM.h
@@ -24,6 +24,7 @@
#ifndef ARM_COMPUTE_NEGEMM_H
#define ARM_COMPUTE_NEGEMM_H
+#include "arm_compute/core/GEMMInfo.h"
#include "arm_compute/runtime/IFunction.h"
#include "arm_compute/runtime/IMemoryManager.h"
#include "arm_compute/runtime/IWeightsManager.h"
diff --git a/arm_compute/runtime/NEON/functions/NEGEMMConvolutionLayer.h b/arm_compute/runtime/NEON/functions/NEGEMMConvolutionLayer.h
index a28266265d..1aca1df8eb 100644
--- a/arm_compute/runtime/NEON/functions/NEGEMMConvolutionLayer.h
+++ b/arm_compute/runtime/NEON/functions/NEGEMMConvolutionLayer.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2017-2022 Arm Limited.
+ * Copyright (c) 2017-2023 Arm Limited.
*
* SPDX-License-Identifier: MIT
*
@@ -26,6 +26,7 @@
#include "arm_compute/runtime/IFunction.h"
+#include "arm_compute/core/ActivationLayerInfo.h"
#include "arm_compute/core/Types.h"
#include "arm_compute/runtime/IFunction.h"
#include "arm_compute/runtime/IMemoryManager.h"
diff --git a/arm_compute/runtime/NEON/functions/NEGEMMLowpMatrixMultiplyCore.h b/arm_compute/runtime/NEON/functions/NEGEMMLowpMatrixMultiplyCore.h
index 896ef60d6f..ccd2fb5a49 100644
--- a/arm_compute/runtime/NEON/functions/NEGEMMLowpMatrixMultiplyCore.h
+++ b/arm_compute/runtime/NEON/functions/NEGEMMLowpMatrixMultiplyCore.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2017-2021 Arm Limited.
+ * Copyright (c) 2017-2021, 2023 Arm Limited.
*
* SPDX-License-Identifier: MIT
*
@@ -24,6 +24,7 @@
#ifndef ARM_COMPUTE_NEGEMMLOWPMATRIXMULTIPLYCORE_H
#define ARM_COMPUTE_NEGEMMLOWPMATRIXMULTIPLYCORE_H
+#include "arm_compute/core/GEMMInfo.h"
#include "arm_compute/core/Types.h"
#include "arm_compute/runtime/IFunction.h"
#include "arm_compute/runtime/IMemoryManager.h"
diff --git a/arm_compute/runtime/NEON/functions/NEPixelWiseMultiplication.h b/arm_compute/runtime/NEON/functions/NEPixelWiseMultiplication.h
index 4684c2d4b8..d09899c3bb 100644
--- a/arm_compute/runtime/NEON/functions/NEPixelWiseMultiplication.h
+++ b/arm_compute/runtime/NEON/functions/NEPixelWiseMultiplication.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2016-2021 Arm Limited.
+ * Copyright (c) 2016-2021, 2023 Arm Limited.
*
* SPDX-License-Identifier: MIT
*
@@ -24,7 +24,9 @@
#ifndef ARM_COMPUTE_NEPIXELWISEMULTIPLICATION_H
#define ARM_COMPUTE_NEPIXELWISEMULTIPLICATION_H
+#include "arm_compute/core/ActivationLayerInfo.h"
#include "arm_compute/core/Types.h"
+#include "arm_compute/core/Rounding.h"
#include "arm_compute/runtime/IFunction.h"
#include <memory>
diff --git a/arm_compute/runtime/NEON/functions/NEWinogradConvolutionLayer.h b/arm_compute/runtime/NEON/functions/NEWinogradConvolutionLayer.h
index 85b4d047ef..b3d3f9e30a 100644
--- a/arm_compute/runtime/NEON/functions/NEWinogradConvolutionLayer.h
+++ b/arm_compute/runtime/NEON/functions/NEWinogradConvolutionLayer.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2017-2022 Arm Limited.
+ * Copyright (c) 2017-2023 Arm Limited.
*
* SPDX-License-Identifier: MIT
*
@@ -26,6 +26,7 @@
#include "arm_compute/runtime/IFunction.h"
+#include "arm_compute/core/ActivationLayerInfo.h"
#include "arm_compute/core/Types.h"
#include "arm_compute/runtime/Tensor.h"
diff --git a/src/common/utils/LegacySupport.cpp b/src/common/utils/LegacySupport.cpp
index 6623825124..f8e8a6ea3c 100644
--- a/src/common/utils/LegacySupport.cpp
+++ b/src/common/utils/LegacySupport.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2021 Arm Limited.
+ * Copyright (c) 2021, 2023 Arm Limited.
*
* SPDX-License-Identifier: MIT
*
@@ -23,6 +23,8 @@
*/
#include "src/common/utils/LegacySupport.h"
+#include "arm_compute/core/ActivationLayerInfo.h"
+
namespace arm_compute
{
namespace detail
diff --git a/src/core/CL/kernels/CLBatchNormalizationLayerKernel.h b/src/core/CL/kernels/CLBatchNormalizationLayerKernel.h
index 743f4a9594..59ea8278ea 100644
--- a/src/core/CL/kernels/CLBatchNormalizationLayerKernel.h
+++ b/src/core/CL/kernels/CLBatchNormalizationLayerKernel.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2017-2020 Arm Limited.
+ * Copyright (c) 2017-2020, 2023 Arm Limited.
*
* SPDX-License-Identifier: MIT
*
@@ -24,6 +24,7 @@
#ifndef ARM_COMPUTE_CLBATCHNORMALIZATIONLAYERKERNEL_H
#define ARM_COMPUTE_CLBATCHNORMALIZATIONLAYERKERNEL_H
+#include "arm_compute/core/ActivationLayerInfo.h"
#include "src/core/CL/ICLKernel.h"
namespace arm_compute
diff --git a/src/core/CL/kernels/CLDepthwiseConvolutionLayerNativeKernel.h b/src/core/CL/kernels/CLDepthwiseConvolutionLayerNativeKernel.h
index 5352f685ea..08e9c67f2c 100644
--- a/src/core/CL/kernels/CLDepthwiseConvolutionLayerNativeKernel.h
+++ b/src/core/CL/kernels/CLDepthwiseConvolutionLayerNativeKernel.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2019-2022 Arm Limited.
+ * Copyright (c) 2019-2023 Arm Limited.
*
* SPDX-License-Identifier: MIT
*
@@ -26,6 +26,7 @@
#include "src/core/CL/ICLKernel.h"
+#include "arm_compute/core/ConvolutionInfo.h"
#include "arm_compute/core/KernelDescriptors.h"
namespace arm_compute
diff --git a/src/core/NEON/kernels/NEBatchNormalizationLayerKernel.h b/src/core/NEON/kernels/NEBatchNormalizationLayerKernel.h
index 9312073ce8..f06884f8c9 100644
--- a/src/core/NEON/kernels/NEBatchNormalizationLayerKernel.h
+++ b/src/core/NEON/kernels/NEBatchNormalizationLayerKernel.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2017-2020 Arm Limited.
+ * Copyright (c) 2017-2020, 2023 Arm Limited.
*
* SPDX-License-Identifier: MIT
*
@@ -24,6 +24,7 @@
#ifndef ARM_COMPUTE_NEBATCHNORMALIZATIONLAYERKERNEL_H
#define ARM_COMPUTE_NEBATCHNORMALIZATIONLAYERKERNEL_H
+#include "arm_compute/core/ActivationLayerInfo.h"
#include "src/core/NEON/INEKernel.h"
namespace arm_compute
diff --git a/src/core/NEON/kernels/batchnormalization/impl/SVE/fp16.cpp b/src/core/NEON/kernels/batchnormalization/impl/SVE/fp16.cpp
index c7cfd7457d..f7b75f07e1 100644
--- a/src/core/NEON/kernels/batchnormalization/impl/SVE/fp16.cpp
+++ b/src/core/NEON/kernels/batchnormalization/impl/SVE/fp16.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2020-2021 Arm Limited.
+ * Copyright (c) 2020-2021,2023 Arm Limited.
*
* SPDX-License-Identifier: MIT
*
@@ -21,6 +21,7 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
+#include "arm_compute/core/ActivationLayerInfo.h"
#include "arm_compute/core/Helpers.h"
#include "arm_compute/core/ITensorPack.h"
#include "arm_compute/core/Window.h"
diff --git a/src/core/NEON/kernels/batchnormalization/impl/SVE/fp32.cpp b/src/core/NEON/kernels/batchnormalization/impl/SVE/fp32.cpp
index b8a540158b..22089b1d07 100644
--- a/src/core/NEON/kernels/batchnormalization/impl/SVE/fp32.cpp
+++ b/src/core/NEON/kernels/batchnormalization/impl/SVE/fp32.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2020-2021 Arm Limited.
+ * Copyright (c) 2020-2021,2023 Arm Limited.
*
* SPDX-License-Identifier: MIT
*
@@ -21,6 +21,7 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
+#include "arm_compute/core/ActivationLayerInfo.h"
#include "arm_compute/core/Helpers.h"
#include "arm_compute/core/ITensorPack.h"
#include "arm_compute/core/Window.h"
diff --git a/src/core/NEON/kernels/detail/NEActivationFunctionDetail.h b/src/core/NEON/kernels/detail/NEActivationFunctionDetail.h
index 25d682d8ae..d03b6e9978 100644
--- a/src/core/NEON/kernels/detail/NEActivationFunctionDetail.h
+++ b/src/core/NEON/kernels/detail/NEActivationFunctionDetail.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2018-2021 Arm Limited.
+ * Copyright (c) 2018-2021, 2023 Arm Limited.
*
* SPDX-License-Identifier: MIT
*
@@ -24,6 +24,7 @@
#ifndef ARM_COMPUTE_DETAIL_NEACTIVATION_FUNCTION_DETAIL_H
#define ARM_COMPUTE_DETAIL_NEACTIVATION_FUNCTION_DETAIL_H
+#include "arm_compute/core/ActivationLayerInfo.h"
#include "src/core/NEON/wrapper/wrapper.h"
namespace arm_compute
diff --git a/src/core/Utils.cpp b/src/core/Utils.cpp
index d05a044fc8..392603d5e6 100644
--- a/src/core/Utils.cpp
+++ b/src/core/Utils.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2016-2022 Arm Limited.
+ * Copyright (c) 2016-2023 Arm Limited.
*
* SPDX-License-Identifier: MIT
*
@@ -24,6 +24,7 @@
#include "arm_compute/core/Helpers.h"
+#include "arm_compute/core/ActivationLayerInfo.h"
#include "arm_compute/core/Utils.h"
#include <algorithm>
@@ -160,7 +161,7 @@ const std::string &string_from_data_type(DataType dt)
return dt_map[dt];
}
-const std::string &string_from_activation_func(ActivationLayerInfo::ActivationFunction act)
+const std::string &string_from_activation_func(const ActivationLayerInfo::ActivationFunction& act)
{
static std::map<ActivationLayerInfo::ActivationFunction, const std::string> act_map =
{
@@ -555,7 +556,7 @@ QuantizationInfo get_softmax_output_quantization_info(DataType input_type, bool
return QuantizationInfo(1.f / 256, 0);
}
-std::pair<int32_t, int32_t> get_quantized_activation_min_max(ActivationLayerInfo act_info, DataType data_type, UniformQuantizationInfo oq_info)
+std::pair<int32_t, int32_t> get_quantized_activation_min_max(const ActivationLayerInfo& act_info, DataType data_type, UniformQuantizationInfo oq_info)
{
const bool is_qasymm8_signed = is_data_type_quantized_asymmetric_signed(data_type);
const auto a = act_info.a();
@@ -687,4 +688,4 @@ int max_consecutive_elements_display_width(std::ostream &s, DataType dt, const u
}
#endif /* ARM_COMPUTE_ASSERTS_ENABLED */
-} // namespace arm_compute \ No newline at end of file
+} // namespace arm_compute
diff --git a/src/core/utils/AssemblyUtils.cpp b/src/core/utils/AssemblyUtils.cpp
index 45e7ff78be..0efc6ac552 100644
--- a/src/core/utils/AssemblyUtils.cpp
+++ b/src/core/utils/AssemblyUtils.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2021-2022 Arm Limited.
+ * Copyright (c) 2021-2023 Arm Limited.
*
* SPDX-License-Identifier: MIT
*
@@ -23,6 +23,8 @@
*/
#include "src/core/utils/AssemblyUtils.h"
+#include "arm_compute/core/ActivationLayerInfo.h"
+
namespace arm_compute
{
namespace assembly_utils
diff --git a/src/core/utils/AssemblyUtils.h b/src/core/utils/AssemblyUtils.h
index 7514175ed6..60bad3b618 100644
--- a/src/core/utils/AssemblyUtils.h
+++ b/src/core/utils/AssemblyUtils.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2021-2022 Arm Limited.
+ * Copyright (c) 2021-2023 Arm Limited.
*
* SPDX-License-Identifier: MIT
*
@@ -30,6 +30,8 @@
namespace arm_compute
{
+class ActivationLayerInfo;
+
namespace assembly_utils
{
/** Performs a mapping between Compute Library ActivationLayerInfo and the assembly Activation structure.
diff --git a/src/core/utils/quantization/AsymmHelpers.cpp b/src/core/utils/quantization/AsymmHelpers.cpp
index f5b69c7a44..0dec56c451 100644
--- a/src/core/utils/quantization/AsymmHelpers.cpp
+++ b/src/core/utils/quantization/AsymmHelpers.cpp
@@ -21,6 +21,7 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
+#include "arm_compute/core/ActivationLayerInfo.h"
#include "arm_compute/core/utils/quantization/AsymmHelpers.h"
#include "arm_compute/core/Helpers.h"
#include "support/ToolchainSupport.h"
diff --git a/src/cpu/kernels/CpuActivationKernel.h b/src/cpu/kernels/CpuActivationKernel.h
index fe2d783059..72ba4421e0 100644
--- a/src/cpu/kernels/CpuActivationKernel.h
+++ b/src/cpu/kernels/CpuActivationKernel.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2017-2022 Arm Limited.
+ * Copyright (c) 2017-2023 Arm Limited.
*
* SPDX-License-Identifier: MIT
*
@@ -24,6 +24,7 @@
#ifndef ARM_COMPUTE_CPU_ACTIVATION_KERNEL_H
#define ARM_COMPUTE_CPU_ACTIVATION_KERNEL_H
+#include "arm_compute/core/ActivationLayerInfo.h"
#include "src/core/common/Macros.h"
#include "src/cpu/ICpuKernel.h"
diff --git a/src/cpu/kernels/CpuAddMulAddKernel.h b/src/cpu/kernels/CpuAddMulAddKernel.h
index 595b580060..1a300f19cc 100644
--- a/src/cpu/kernels/CpuAddMulAddKernel.h
+++ b/src/cpu/kernels/CpuAddMulAddKernel.h
@@ -25,6 +25,7 @@
#ifndef SRC_CPU_KERNELS_CPUADDMULADDKERNEL
#define SRC_CPU_KERNELS_CPUADDMULADDKERNEL
+#include "arm_compute/core/ActivationLayerInfo.h"
#include "src/core/common/Macros.h"
#include "src/cpu/ICpuKernel.h"
diff --git a/src/cpu/kernels/CpuConcatenateWidthKernel.cpp b/src/cpu/kernels/CpuConcatenateWidthKernel.cpp
index 90813ff7b4..f00b37a01b 100644
--- a/src/cpu/kernels/CpuConcatenateWidthKernel.cpp
+++ b/src/cpu/kernels/CpuConcatenateWidthKernel.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2018-2021 Arm Limited.
+ * Copyright (c) 2018-2021, 2023 Arm Limited.
*
* SPDX-License-Identifier: MIT
*
@@ -24,18 +24,12 @@
#include "src/cpu/kernels/CpuConcatenateWidthKernel.h"
#include "arm_compute/core/Error.h"
+#include "arm_compute/core/Steps.h"
#include "arm_compute/core/Helpers.h"
-#include "arm_compute/core/ITensor.h"
-#include "arm_compute/core/TensorInfo.h"
-#include "arm_compute/core/Utils.h"
#include "arm_compute/core/Validate.h"
-#include "arm_compute/core/Window.h"
#include "src/core/NEON/NEAsymm.h"
-#include "src/core/NEON/wrapper/wrapper.h"
-#include "src/core/helpers/AutoConfiguration.h"
#include "src/core/helpers/WindowHelpers.h"
-#include <cstdint>
namespace arm_compute
{
diff --git a/src/cpu/kernels/CpuDepthwiseConv2dNativeKernel.h b/src/cpu/kernels/CpuDepthwiseConv2dNativeKernel.h
index 8bc4d83c20..8bb70e847f 100644
--- a/src/cpu/kernels/CpuDepthwiseConv2dNativeKernel.h
+++ b/src/cpu/kernels/CpuDepthwiseConv2dNativeKernel.h
@@ -24,6 +24,7 @@
#ifndef ARM_COMPUTE_CPU_DEPTHWISE_CONV2D_NATIVE_KERNEL_H
#define ARM_COMPUTE_CPU_DEPTHWISE_CONV2D_NATIVE_KERNEL_H
+#include "arm_compute/core/ConvolutionInfo.h"
#include "arm_compute/core/utils/misc/Traits.h"
#include "src/core/common/Macros.h"
#include "src/cpu/ICpuKernel.h"
diff --git a/src/cpu/kernels/CpuKernelSelectionTypes.h b/src/cpu/kernels/CpuKernelSelectionTypes.h
index edcbff0742..39adc9af7c 100644
--- a/src/cpu/kernels/CpuKernelSelectionTypes.h
+++ b/src/cpu/kernels/CpuKernelSelectionTypes.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2021-2022 Arm Limited.
+ * Copyright (c) 2021-2023 Arm Limited.
*
* SPDX-License-Identifier: MIT
*
@@ -81,7 +81,7 @@ struct ActivationDataTypeISASelectorData
DataType dt;
const CPUModel &cpumodel;
const cpuinfo::CpuIsaInfo &isa;
- ActivationLayerInfo::ActivationFunction f;
+ const ActivationFunction f;
};
struct CpuAddKernelDataTypeISASelectorData
diff --git a/src/cpu/kernels/activation/generic/neon/impl.h b/src/cpu/kernels/activation/generic/neon/impl.h
index 4f392866b5..cac326da0a 100644
--- a/src/cpu/kernels/activation/generic/neon/impl.h
+++ b/src/cpu/kernels/activation/generic/neon/impl.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2020-2022 Arm Limited.
+ * Copyright (c) 2020-2023 Arm Limited.
*
* SPDX-License-Identifier: MIT
*
@@ -21,6 +21,7 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
+#include "arm_compute/core/ActivationLayerInfo.h"
#include "arm_compute/core/Helpers.h"
#include "arm_compute/core/Window.h"
#include "src/core/NEON/wrapper/wrapper.h"
diff --git a/src/cpu/kernels/activation/generic/neon/lut.cpp b/src/cpu/kernels/activation/generic/neon/lut.cpp
index b44347550e..231629241b 100644
--- a/src/cpu/kernels/activation/generic/neon/lut.cpp
+++ b/src/cpu/kernels/activation/generic/neon/lut.cpp
@@ -22,6 +22,7 @@
* SOFTWARE.
*/
+#include "arm_compute/core/ActivationLayerInfo.h"
#include "arm_compute/core/Helpers.h"
#include "src/cpu/kernels/lut/list.h"
diff --git a/src/cpu/kernels/activation/generic/neon/qasymm8.cpp b/src/cpu/kernels/activation/generic/neon/qasymm8.cpp
index f5555574cb..c61facc9b0 100644
--- a/src/cpu/kernels/activation/generic/neon/qasymm8.cpp
+++ b/src/cpu/kernels/activation/generic/neon/qasymm8.cpp
@@ -22,6 +22,7 @@
* SOFTWARE.
*/
+#include "arm_compute/core/ActivationLayerInfo.h"
#include "arm_compute/core/Helpers.h"
#include "arm_compute/core/Window.h"
#include "src/core/NEON/NEAsymm.h"
diff --git a/src/cpu/kernels/activation/generic/neon/qasymm8_signed.cpp b/src/cpu/kernels/activation/generic/neon/qasymm8_signed.cpp
index d75d0071a2..80df76d32a 100644
--- a/src/cpu/kernels/activation/generic/neon/qasymm8_signed.cpp
+++ b/src/cpu/kernels/activation/generic/neon/qasymm8_signed.cpp
@@ -21,6 +21,7 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
+#include "arm_compute/core/ActivationLayerInfo.h"
#include "arm_compute/core/Helpers.h"
#include "arm_compute/core/Window.h"
#include "src/core/NEON/NEAsymm.h"
diff --git a/src/cpu/kernels/activation/generic/neon/qsymm16.cpp b/src/cpu/kernels/activation/generic/neon/qsymm16.cpp
index ba14745938..331c30a496 100644
--- a/src/cpu/kernels/activation/generic/neon/qsymm16.cpp
+++ b/src/cpu/kernels/activation/generic/neon/qsymm16.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2020-2022 Arm Limited.
+ * Copyright (c) 2020-2023 Arm Limited.
*
* SPDX-License-Identifier: MIT
*
@@ -21,6 +21,7 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
+#include "arm_compute/core/ActivationLayerInfo.h"
#include "arm_compute/core/Helpers.h"
#include "arm_compute/core/ITensorPack.h"
#include "arm_compute/core/Window.h"
diff --git a/src/cpu/kernels/activation/generic/sve/fp16.cpp b/src/cpu/kernels/activation/generic/sve/fp16.cpp
index 6e9648b5bf..190cf13dcb 100644
--- a/src/cpu/kernels/activation/generic/sve/fp16.cpp
+++ b/src/cpu/kernels/activation/generic/sve/fp16.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2020-2022 Arm Limited.
+ * Copyright (c) 2020-2023 Arm Limited.
*
* SPDX-License-Identifier: MIT
*
@@ -24,6 +24,7 @@
#if defined(__ARM_FEATURE_FP16_VECTOR_ARITHMETIC) && defined(ENABLE_FP16_KERNELS)
+#include "arm_compute/core/ActivationLayerInfo.h"
#include "arm_compute/core/Helpers.h"
#include "arm_compute/core/ITensorPack.h"
#include "arm_compute/core/Window.h"
diff --git a/src/cpu/kernels/activation/generic/sve/fp32.cpp b/src/cpu/kernels/activation/generic/sve/fp32.cpp
index 8d5d627d70..d38b79170f 100644
--- a/src/cpu/kernels/activation/generic/sve/fp32.cpp
+++ b/src/cpu/kernels/activation/generic/sve/fp32.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2020-2022 Arm Limited.
+ * Copyright (c) 2020-2023 Arm Limited.
*
* SPDX-License-Identifier: MIT
*
@@ -22,6 +22,7 @@
* SOFTWARE.
*/
+#include "arm_compute/core/ActivationLayerInfo.h"
#include "arm_compute/core/Helpers.h"
#include "arm_compute/core/ITensorPack.h"
#include "arm_compute/core/Window.h"
diff --git a/src/cpu/kernels/activation/generic/sve2/lut.cpp b/src/cpu/kernels/activation/generic/sve2/lut.cpp
index 9dbeb305ff..2876caa020 100644
--- a/src/cpu/kernels/activation/generic/sve2/lut.cpp
+++ b/src/cpu/kernels/activation/generic/sve2/lut.cpp
@@ -22,6 +22,7 @@
* SOFTWARE.
*/
+#include "arm_compute/core/ActivationLayerInfo.h"
#include "arm_compute/core/Helpers.h"
#include "src/cpu/kernels/lut/list.h"
diff --git a/src/cpu/kernels/activation/generic/sve2/qasymm8.cpp b/src/cpu/kernels/activation/generic/sve2/qasymm8.cpp
index 928a414fb0..1295d799b2 100644
--- a/src/cpu/kernels/activation/generic/sve2/qasymm8.cpp
+++ b/src/cpu/kernels/activation/generic/sve2/qasymm8.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2020-2022 Arm Limited.
+ * Copyright (c) 2020-2023 Arm Limited.
*
* SPDX-License-Identifier: MIT
*
@@ -22,6 +22,7 @@
* SOFTWARE.
*/
+#include "arm_compute/core/ActivationLayerInfo.h"
#include "arm_compute/core/Helpers.h"
#include "arm_compute/core/Window.h"
diff --git a/src/cpu/kernels/activation/generic/sve2/qasymm8_signed.cpp b/src/cpu/kernels/activation/generic/sve2/qasymm8_signed.cpp
index da4f5e222c..aca4e7ebc0 100644
--- a/src/cpu/kernels/activation/generic/sve2/qasymm8_signed.cpp
+++ b/src/cpu/kernels/activation/generic/sve2/qasymm8_signed.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2020-2022 Arm Limited.
+ * Copyright (c) 2020-2023 Arm Limited.
*
* SPDX-License-Identifier: MIT
*
@@ -21,6 +21,7 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
+#include "arm_compute/core/ActivationLayerInfo.h"
#include "arm_compute/core/Helpers.h"
#include "arm_compute/core/Window.h"
#include "src/core/NEON/wrapper/wrapper.h"
diff --git a/src/cpu/kernels/activation/generic/sve2/qsymm16.cpp b/src/cpu/kernels/activation/generic/sve2/qsymm16.cpp
index 1d6f68273a..3265604e03 100644
--- a/src/cpu/kernels/activation/generic/sve2/qsymm16.cpp
+++ b/src/cpu/kernels/activation/generic/sve2/qsymm16.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2020-2022 Arm Limited.
+ * Copyright (c) 2020-2023 Arm Limited.
*
* SPDX-License-Identifier: MIT
*
@@ -21,6 +21,7 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
+#include "arm_compute/core/ActivationLayerInfo.h"
#include "arm_compute/core/Helpers.h"
#include "arm_compute/core/ITensorPack.h"
#include "arm_compute/core/Window.h"
diff --git a/src/cpu/kernels/addmuladd/generic/neon/fp16.cpp b/src/cpu/kernels/addmuladd/generic/neon/fp16.cpp
index 2a7e602b79..6fce1cd9c4 100644
--- a/src/cpu/kernels/addmuladd/generic/neon/fp16.cpp
+++ b/src/cpu/kernels/addmuladd/generic/neon/fp16.cpp
@@ -22,6 +22,7 @@
* SOFTWARE.
*/
+#include "arm_compute/core/ActivationLayerInfo.h"
#include "arm_compute/core/Helpers.h"
#include "arm_compute/core/ITensor.h"
#include "arm_compute/core/Types.h"
diff --git a/src/cpu/kernels/addmuladd/generic/neon/fp32.cpp b/src/cpu/kernels/addmuladd/generic/neon/fp32.cpp
index a102682f8b..1daa8c33b4 100644
--- a/src/cpu/kernels/addmuladd/generic/neon/fp32.cpp
+++ b/src/cpu/kernels/addmuladd/generic/neon/fp32.cpp
@@ -22,6 +22,7 @@
* SOFTWARE.
*/
+#include "arm_compute/core/ActivationLayerInfo.h"
#include "arm_compute/core/Helpers.h"
#include "arm_compute/core/ITensor.h"
#include "arm_compute/core/Types.h"
diff --git a/src/cpu/kernels/addmuladd/generic/neon/qasymm8.cpp b/src/cpu/kernels/addmuladd/generic/neon/qasymm8.cpp
index 2c0ad70f8f..dc77d0c450 100644
--- a/src/cpu/kernels/addmuladd/generic/neon/qasymm8.cpp
+++ b/src/cpu/kernels/addmuladd/generic/neon/qasymm8.cpp
@@ -22,6 +22,7 @@
* SOFTWARE.
*/
+#include "arm_compute/core/ActivationLayerInfo.h"
#include "arm_compute/core/Helpers.h"
#include "arm_compute/core/ITensor.h"
#include "arm_compute/core/QuantizationInfo.h"
diff --git a/src/cpu/kernels/addmuladd/generic/neon/qasymm8_signed.cpp b/src/cpu/kernels/addmuladd/generic/neon/qasymm8_signed.cpp
index 3bde83cc26..1e8c2070be 100644
--- a/src/cpu/kernels/addmuladd/generic/neon/qasymm8_signed.cpp
+++ b/src/cpu/kernels/addmuladd/generic/neon/qasymm8_signed.cpp
@@ -22,6 +22,7 @@
* SOFTWARE.
*/
+#include "arm_compute/core/ActivationLayerInfo.h"
#include "arm_compute/core/Helpers.h"
#include "arm_compute/core/ITensor.h"
#include "arm_compute/core/QuantizationInfo.h"
diff --git a/src/cpu/kernels/depthwiseconv2d/generic/neon/impl.cpp b/src/cpu/kernels/depthwiseconv2d/generic/neon/impl.cpp
index 350e25ed94..da67371398 100644
--- a/src/cpu/kernels/depthwiseconv2d/generic/neon/impl.cpp
+++ b/src/cpu/kernels/depthwiseconv2d/generic/neon/impl.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2019-2022 Arm Limited.
+ * Copyright (c) 2019-2023 Arm Limited.
*
* SPDX-License-Identifier: MIT
*
@@ -21,6 +21,7 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
+#include "arm_compute/core/ConvolutionInfo.h"
#include "src/cpu/kernels/depthwiseconv2d/generic/neon/impl.h"
#include "arm_compute/core/utils/quantization/AsymmHelpers.h"
#include "src/core/NEON/wrapper/wrapper.h"
diff --git a/src/cpu/kernels/depthwiseconv2d/generic/neon/impl.h b/src/cpu/kernels/depthwiseconv2d/generic/neon/impl.h
index a7ba286541..1f01ce43d9 100644
--- a/src/cpu/kernels/depthwiseconv2d/generic/neon/impl.h
+++ b/src/cpu/kernels/depthwiseconv2d/generic/neon/impl.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2022 Arm Limited.
+ * Copyright (c) 2022-2023 Arm Limited.
*
* SPDX-License-Identifier: MIT
*
@@ -26,6 +26,8 @@
#include "arm_compute/core/Helpers.h"
namespace arm_compute
{
+struct ConvolutionInfo;
+
namespace cpu
{
template <typename T, typename TW>
diff --git a/src/cpu/kernels/internal/CpuDepthwiseConv2dAssemblyWrapperKernel.h b/src/cpu/kernels/internal/CpuDepthwiseConv2dAssemblyWrapperKernel.h
index a32a7a3ec8..16d3b21fe2 100644
--- a/src/cpu/kernels/internal/CpuDepthwiseConv2dAssemblyWrapperKernel.h
+++ b/src/cpu/kernels/internal/CpuDepthwiseConv2dAssemblyWrapperKernel.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2019-2022 Arm Limited.
+ * Copyright (c) 2019-2023 Arm Limited.
*
* SPDX-License-Identifier: MIT
*
@@ -40,6 +40,8 @@ class IDepthwiseCommon;
namespace arm_compute
{
+struct ConvolutionInfo;
+
namespace cpu
{
namespace kernels
diff --git a/src/cpu/operators/CpuAdd.h b/src/cpu/operators/CpuAdd.h
index 4ad6d7fe65..17bac81460 100644
--- a/src/cpu/operators/CpuAdd.h
+++ b/src/cpu/operators/CpuAdd.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2021-2022 Arm Limited.
+ * Copyright (c) 2021-2023 Arm Limited.
*
* SPDX-License-Identifier: MIT
*
@@ -24,6 +24,7 @@
#ifndef ARM_COMPUTE_CPU_ADD_H
#define ARM_COMPUTE_CPU_ADD_H
+#include "arm_compute/core/ActivationLayerInfo.h"
#include "src/cpu/ICpuOperator.h"
namespace arm_compute
diff --git a/src/cpu/operators/CpuConv2d.h b/src/cpu/operators/CpuConv2d.h
index daf068f361..7fefe63403 100644
--- a/src/cpu/operators/CpuConv2d.h
+++ b/src/cpu/operators/CpuConv2d.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2017-2021 Arm Limited.
+ * Copyright (c) 2017-2021, 2023 Arm Limited.
*
* SPDX-License-Identifier: MIT
*
@@ -21,6 +21,7 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
+#include "arm_compute/core/ActivationLayerInfo.h"
#include "src/core/common/Macros.h"
#include "src/cpu/ICpuOperator.h"
diff --git a/src/cpu/operators/CpuDepthwiseConv2dAssemblyDispatch.h b/src/cpu/operators/CpuDepthwiseConv2dAssemblyDispatch.h
index af202ced5b..baa301b724 100644
--- a/src/cpu/operators/CpuDepthwiseConv2dAssemblyDispatch.h
+++ b/src/cpu/operators/CpuDepthwiseConv2dAssemblyDispatch.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2019-2021 Arm Limited.
+ * Copyright (c) 2019-2021, 2023 Arm Limited.
*
* SPDX-License-Identifier: MIT
*
@@ -29,6 +29,8 @@
namespace arm_compute
{
+struct ConvolutionInfo;
+
namespace cpu
{
/** Depthwise convolution assembly kernel glue */
diff --git a/src/cpu/operators/CpuFullyConnected.h b/src/cpu/operators/CpuFullyConnected.h
index a5a464f67a..db8d71d89e 100644
--- a/src/cpu/operators/CpuFullyConnected.h
+++ b/src/cpu/operators/CpuFullyConnected.h
@@ -26,6 +26,7 @@
#include "src/cpu/ICpuOperator.h"
+#include "arm_compute/core/FullyConnectedLayerInfo.h"
#include "arm_compute/core/TensorInfo.h"
#include <memory>
diff --git a/src/cpu/operators/CpuGemm.h b/src/cpu/operators/CpuGemm.h
index bc8adaec32..20d516cbcb 100644
--- a/src/cpu/operators/CpuGemm.h
+++ b/src/cpu/operators/CpuGemm.h
@@ -26,6 +26,7 @@
#include "src/cpu/ICpuOperator.h"
+#include "arm_compute/core/GEMMInfo.h"
#include "arm_compute/core/ITensorPack.h"
#include "arm_compute/core/TensorInfo.h"
#include "arm_compute/core/Types.h"
diff --git a/src/cpu/operators/CpuGemmConv2d.h b/src/cpu/operators/CpuGemmConv2d.h
index 08b76a6c46..1739ea6103 100644
--- a/src/cpu/operators/CpuGemmConv2d.h
+++ b/src/cpu/operators/CpuGemmConv2d.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2021-2022 Arm Limited.
+ * Copyright (c) 2021-2023 Arm Limited.
*
* SPDX-License-Identifier: MIT
*
@@ -24,6 +24,7 @@
#ifndef ARM_COMPUTE_CPU_GEMM_CONV2D_H
#define ARM_COMPUTE_CPU_GEMM_CONV2D_H
+#include "arm_compute/core/ActivationLayerInfo.h"
#include "arm_compute/core/TensorInfo.h"
#include "arm_compute/core/Types.h"
#include "src/cpu/ICpuOperator.h"
diff --git a/src/cpu/operators/CpuGemmLowpMatrixMultiplyCore.h b/src/cpu/operators/CpuGemmLowpMatrixMultiplyCore.h
index a7f62aeaa9..5914d11ded 100644
--- a/src/cpu/operators/CpuGemmLowpMatrixMultiplyCore.h
+++ b/src/cpu/operators/CpuGemmLowpMatrixMultiplyCore.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2021 Arm Limited.
+ * Copyright (c) 2021, 2023 Arm Limited.
*
* SPDX-License-Identifier: MIT
*
@@ -24,6 +24,7 @@
#ifndef ARM_COMPUTE_CPU_GEMMLOWP_MATRIXMULTIPLY_CORE_H
#define ARM_COMPUTE_CPU_GEMMLOWP_MATRIXMULTIPLY_CORE_H
+#include "arm_compute/core/GEMMInfo.h"
#include "arm_compute/core/TensorInfo.h"
#include "src/core/common/Macros.h"
#include "src/cpu/ICpuOperator.h"
diff --git a/src/cpu/operators/CpuMul.h b/src/cpu/operators/CpuMul.h
index 576a357d42..01c81bcb7b 100644
--- a/src/cpu/operators/CpuMul.h
+++ b/src/cpu/operators/CpuMul.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2016-2021 Arm Limited.
+ * Copyright (c) 2016-2021, 2023 Arm Limited.
*
* SPDX-License-Identifier: MIT
*
@@ -24,6 +24,7 @@
#ifndef ARM_COMPUTE_CPU_MUL_H
#define ARM_COMPUTE_CPU_MUL_H
+#include "arm_compute/core/ActivationLayerInfo.h"
#include "arm_compute/core/ITensorInfo.h"
#include "src/cpu/ICpuOperator.h"
@@ -102,4 +103,4 @@ public:
};
} // namespace cpu
} // namespace arm_compute
-#endif /* ARM_COMPUTE_CPU_MUL_H */ \ No newline at end of file
+#endif /* ARM_COMPUTE_CPU_MUL_H */
diff --git a/src/cpu/operators/CpuSub.h b/src/cpu/operators/CpuSub.h
index d463d1e063..ceae3e9c11 100644
--- a/src/cpu/operators/CpuSub.h
+++ b/src/cpu/operators/CpuSub.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2021-2022 Arm Limited.
+ * Copyright (c) 2021-2023 Arm Limited.
*
* SPDX-License-Identifier: MIT
*
@@ -24,6 +24,7 @@
#ifndef ARM_COMPUTE_CPU_SUB_H
#define ARM_COMPUTE_CPU_SUB_H
+#include "arm_compute/core/ActivationLayerInfo.h"
#include "src/cpu/ICpuOperator.h"
namespace arm_compute
@@ -66,4 +67,4 @@ public:
};
} // namespace cpu
} // namespace arm_compute
-#endif /* ARM_COMPUTE_CPU_SUB_H */ \ No newline at end of file
+#endif /* ARM_COMPUTE_CPU_SUB_H */
diff --git a/src/cpu/operators/internal/CpuGemmAssemblyDispatch.h b/src/cpu/operators/internal/CpuGemmAssemblyDispatch.h
index 588c45294a..66c3223a4e 100644
--- a/src/cpu/operators/internal/CpuGemmAssemblyDispatch.h
+++ b/src/cpu/operators/internal/CpuGemmAssemblyDispatch.h
@@ -24,6 +24,7 @@
#ifndef ARM_COMPUTE_CPU_INTERNAL_CPU_GEMM_ASSEMBLY_DISPATCH_H
#define ARM_COMPUTE_CPU_INTERNAL_CPU_GEMM_ASSEMBLY_DISPATCH_H
+#include "arm_compute/core/ActivationLayerInfo.h"
#include "src/core/common/Macros.h"
#include "src/cpu/ICpuOperator.h"
diff --git a/src/dynamic_fusion/sketch/gpu/template_writer/cl/ClTemplateActivation.h b/src/dynamic_fusion/sketch/gpu/template_writer/cl/ClTemplateActivation.h
index 22f8d428ab..29f0711cc4 100644
--- a/src/dynamic_fusion/sketch/gpu/template_writer/cl/ClTemplateActivation.h
+++ b/src/dynamic_fusion/sketch/gpu/template_writer/cl/ClTemplateActivation.h
@@ -25,6 +25,7 @@
#define SRC_DYNAMIC_FUSION_SKETCH_GPU_TEMPLATE_WRITER_CL_CLTEMPLATEACTIVATION
#include "arm_compute/core/experimental/Types.h"
+#include "arm_compute/core/ActivationLayerInfo.h"
#include "src/dynamic_fusion/sketch/gpu/components/cl/ClComponentActivation.h"
#include "src/dynamic_fusion/sketch/gpu/template_writer/GpuKernelVariableTable.h"
#include "src/dynamic_fusion/sketch/gpu/template_writer/IGpuTemplateComponentWriter.h"
diff --git a/src/gpu/cl/kernels/ClActivationKernel.cpp b/src/gpu/cl/kernels/ClActivationKernel.cpp
index 13d55b3f5a..2e4642c89b 100644
--- a/src/gpu/cl/kernels/ClActivationKernel.cpp
+++ b/src/gpu/cl/kernels/ClActivationKernel.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2016-2021 Arm Limited.
+ * Copyright (c) 2016-2021, 2023 Arm Limited.
*
* SPDX-License-Identifier: MIT
*
@@ -23,6 +23,7 @@
*/
#include "src/gpu/cl/kernels/ClActivationKernel.h"
+#include "arm_compute/core/ActivationLayerInfo.h"
#include "arm_compute/core/CL/CLHelpers.h"
#include "arm_compute/core/CL/ICLTensor.h"
#include "arm_compute/core/TensorInfo.h"
diff --git a/src/gpu/cl/kernels/ClElementwiseKernel.h b/src/gpu/cl/kernels/ClElementwiseKernel.h
index 3783e1571c..927b9c7f46 100644
--- a/src/gpu/cl/kernels/ClElementwiseKernel.h
+++ b/src/gpu/cl/kernels/ClElementwiseKernel.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2018-2021 Arm Limited.
+ * Copyright (c) 2018-2021, 2023 Arm Limited.
*
* SPDX-License-Identifier: MIT
*
@@ -24,6 +24,7 @@
#ifndef ARM_COMPUTE_CL_ELEMENTWISE_KERNEL_H
#define ARM_COMPUTE_CL_ELEMENTWISE_KERNEL_H
+#include "arm_compute/core/ActivationLayerInfo.h"
#include "src/core/KernelTypes.h"
#include "src/core/common/Macros.h"
#include "src/gpu/cl/ClCompileContext.h"
diff --git a/src/gpu/cl/kernels/ClMulKernel.h b/src/gpu/cl/kernels/ClMulKernel.h
index 41c862eb03..4210a9103d 100644
--- a/src/gpu/cl/kernels/ClMulKernel.h
+++ b/src/gpu/cl/kernels/ClMulKernel.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2016-2021 Arm Limited.
+ * Copyright (c) 2016-2021, 2023 Arm Limited.
*
* SPDX-License-Identifier: MIT
*
@@ -24,6 +24,7 @@
#ifndef ARM_COMPUTE_CL_MUL_KERNEL_H
#define ARM_COMPUTE_CL_MUL_KERNEL_H
+#include "arm_compute/core/ActivationLayerInfo.h"
#include "src/core/common/Macros.h"
#include "src/gpu/cl/ClCompileContext.h"
#include "src/gpu/cl/IClKernel.h"
diff --git a/src/gpu/cl/operators/ClAdd.h b/src/gpu/cl/operators/ClAdd.h
index d99f983ed0..67aa8f08fa 100644
--- a/src/gpu/cl/operators/ClAdd.h
+++ b/src/gpu/cl/operators/ClAdd.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2021 Arm Limited.
+ * Copyright (c) 2021, 2023 Arm Limited.
*
* SPDX-License-Identifier: MIT
*
@@ -24,6 +24,7 @@
#ifndef ARM_COMPUTE_CL_ADD_H
#define ARM_COMPUTE_CL_ADD_H
+#include "arm_compute/core/ActivationLayerInfo.h"
#include "src/gpu/cl/ClCompileContext.h"
#include "src/gpu/cl/IClOperator.h"
diff --git a/src/gpu/cl/operators/ClDirectConv2d.h b/src/gpu/cl/operators/ClDirectConv2d.h
index 85365b76ff..fc2568eae2 100644
--- a/src/gpu/cl/operators/ClDirectConv2d.h
+++ b/src/gpu/cl/operators/ClDirectConv2d.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2021 Arm Limited.
+ * Copyright (c) 2021, 2023 Arm Limited.
*
* SPDX-License-Identifier: MIT
*
@@ -24,6 +24,7 @@
#ifndef ARM_COMPUTE_CL_DIRECT_CONV2D_H
#define ARM_COMPUTE_CL_DIRECT_CONV2D_H
+#include "arm_compute/core/ActivationLayerInfo.h"
#include "src/gpu/cl/ClCompileContext.h"
#include "src/gpu/cl/IClKernel.h"
#include "src/gpu/cl/IClOperator.h"
@@ -79,4 +80,4 @@ private:
};
} // namespace opencl
} // namespace arm_compute
-#endif /* ARM_COMPUTE_CL_DIRECT_CONV2D_H */ \ No newline at end of file
+#endif /* ARM_COMPUTE_CL_DIRECT_CONV2D_H */
diff --git a/src/gpu/cl/operators/ClElementwiseOperations.h b/src/gpu/cl/operators/ClElementwiseOperations.h
index 304b250d66..7a8570c94a 100644
--- a/src/gpu/cl/operators/ClElementwiseOperations.h
+++ b/src/gpu/cl/operators/ClElementwiseOperations.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2021 Arm Limited.
+ * Copyright (c) 2021, 2023 Arm Limited.
*
* SPDX-License-Identifier: MIT
*
@@ -24,6 +24,7 @@
#ifndef ARM_COMPUTE_CL_ELEMENTWISE_OPERATIONS_H
#define ARM_COMPUTE_CL_ELEMENTWISE_OPERATIONS_H
+#include "arm_compute/core/ActivationLayerInfo.h"
#include "src/gpu/cl/ClCompileContext.h"
#include "src/gpu/cl/IClOperator.h"
diff --git a/src/gpu/cl/operators/ClFullyConnected.h b/src/gpu/cl/operators/ClFullyConnected.h
index d08d5db8a4..11a59b2359 100644
--- a/src/gpu/cl/operators/ClFullyConnected.h
+++ b/src/gpu/cl/operators/ClFullyConnected.h
@@ -24,6 +24,7 @@
#ifndef ARM_COMPUTE_CL_FULLY_CONNECTED_H
#define ARM_COMPUTE_CL_FULLY_CONNECTED_H
+#include "arm_compute/core/FullyConnectedLayerInfo.h"
#include "arm_compute/core/TensorInfo.h"
#include "src/gpu/cl/ClCompileContext.h"
diff --git a/src/gpu/cl/operators/ClGemm.h b/src/gpu/cl/operators/ClGemm.h
index ea8a058fd5..3d88a9ca84 100644
--- a/src/gpu/cl/operators/ClGemm.h
+++ b/src/gpu/cl/operators/ClGemm.h
@@ -25,6 +25,7 @@
#define ARM_COMPUTE_CL_GEMM_H
#include "arm_compute/core/TensorInfo.h"
+#include "arm_compute/core/GEMMInfo.h"
#include "arm_compute/runtime/CL/CLTensor.h"
#include "arm_compute/runtime/CL/CLTypes.h"
diff --git a/src/gpu/cl/operators/ClGemmLowpMatrixMultiplyCore.h b/src/gpu/cl/operators/ClGemmLowpMatrixMultiplyCore.h
index 6fa4352bf8..3051f3079b 100644
--- a/src/gpu/cl/operators/ClGemmLowpMatrixMultiplyCore.h
+++ b/src/gpu/cl/operators/ClGemmLowpMatrixMultiplyCore.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2017-2022 Arm Limited.
+ * Copyright (c) 2017-2023 Arm Limited.
*
* SPDX-License-Identifier: MIT
*
@@ -24,6 +24,7 @@
#ifndef ARM_COMPUTE_CL_GEMMLOWP_MATRIXMULTIPLY_CORE_H
#define ARM_COMPUTE_CL_GEMMLOWP_MATRIXMULTIPLY_CORE_H
+#include "arm_compute/core/GEMMInfo.h"
#include "arm_compute/core/TensorInfo.h"
#include "arm_compute/runtime/CL/CLTypes.h"
@@ -154,4 +155,4 @@ private:
};
} // namespace opencl
} // namespace arm_compute
-#endif /* ARM_COMPUTE_CL_GEMMLOWP_MATRIXMULTIPLY_CORE_H */ \ No newline at end of file
+#endif /* ARM_COMPUTE_CL_GEMMLOWP_MATRIXMULTIPLY_CORE_H */
diff --git a/src/gpu/cl/operators/ClIndirectConv2d.h b/src/gpu/cl/operators/ClIndirectConv2d.h
index 917a67f421..0c121182d4 100644
--- a/src/gpu/cl/operators/ClIndirectConv2d.h
+++ b/src/gpu/cl/operators/ClIndirectConv2d.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2022 Arm Limited.
+ * Copyright (c) 2022-2023 Arm Limited.
*
* SPDX-License-Identifier: MIT
*
@@ -24,6 +24,7 @@
#ifndef ARM_COMPUTE_CL_INDIRECT_CONV2D_H
#define ARM_COMPUTE_CL_INDIRECT_CONV2D_H
+#include "arm_compute/core/ActivationLayerInfo.h"
#include "arm_compute/core/TensorInfo.h"
#include "arm_compute/runtime/CL/CLTensor.h"
#include "arm_compute/runtime/CL/CLTypes.h"
diff --git a/src/gpu/cl/operators/ClMatMul.h b/src/gpu/cl/operators/ClMatMul.h
index 3d9863266e..6aba801301 100644
--- a/src/gpu/cl/operators/ClMatMul.h
+++ b/src/gpu/cl/operators/ClMatMul.h
@@ -24,6 +24,8 @@
#ifndef ACL_ARM_COMPUTE_SRC_GPU_CL_OPERATORS_CLMATMUL
#define ACL_ARM_COMPUTE_SRC_GPU_CL_OPERATORS_CLMATMUL
+#include "arm_compute/core/ActivationLayerInfo.h"
+#include "arm_compute/core/MatMulInfo.h"
#include "src/gpu/cl/IClOperator.h"
#include "src/gpu/cl/kernels/ClMatMulNativeKernel.h"
#include "src/gpu/cl/kernels/ClMatMulLowpNativeKernel.h"
diff --git a/src/gpu/cl/operators/ClMul.h b/src/gpu/cl/operators/ClMul.h
index 6a158c910d..24eeeb8909 100644
--- a/src/gpu/cl/operators/ClMul.h
+++ b/src/gpu/cl/operators/ClMul.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2021 Arm Limited.
+ * Copyright (c) 2021, 2023 Arm Limited.
*
* SPDX-License-Identifier: MIT
*
@@ -24,6 +24,9 @@
#ifndef ARM_COMPUTE_CL_MUL_H
#define ARM_COMPUTE_CL_MUL_H
+#include "arm_compute/core/ActivationLayerInfo.h"
+#include "arm_compute/core/Types.h"
+
#include "src/gpu/cl/ClCompileContext.h"
#include "src/gpu/cl/IClOperator.h"
@@ -100,4 +103,4 @@ public:
};
} // namespace opencl
} // namespace arm_compute
-#endif /* ARM_COMPUTE_CL_MUL_H */ \ No newline at end of file
+#endif /* ARM_COMPUTE_CL_MUL_H */
diff --git a/src/gpu/cl/operators/ClSub.h b/src/gpu/cl/operators/ClSub.h
index 902adbf39d..a84c61cdb1 100644
--- a/src/gpu/cl/operators/ClSub.h
+++ b/src/gpu/cl/operators/ClSub.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2021 Arm Limited.
+ * Copyright (c) 2021, 2023 Arm Limited.
*
* SPDX-License-Identifier: MIT
*
@@ -24,6 +24,7 @@
#ifndef ARM_COMPUTE_CL_SUB_H
#define ARM_COMPUTE_CL_SUB_H
+#include "arm_compute/core/ActivationLayerInfo.h"
#include "src/gpu/cl/ClCompileContext.h"
#include "src/gpu/cl/IClOperator.h"
diff --git a/src/runtime/CL/functions/CLActivationLayer.cpp b/src/runtime/CL/functions/CLActivationLayer.cpp
index bf69868663..0bfc20d83a 100644
--- a/src/runtime/CL/functions/CLActivationLayer.cpp
+++ b/src/runtime/CL/functions/CLActivationLayer.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2016-2021 Arm Limited.
+ * Copyright (c) 2016-2021, 2023 Arm Limited.
*
* SPDX-License-Identifier: MIT
*
@@ -23,6 +23,7 @@
*/
#include "arm_compute/runtime/CL/functions/CLActivationLayer.h"
+#include "arm_compute/core/ActivationLayerInfo.h"
#include "arm_compute/core/CL/ICLTensor.h"
#include "arm_compute/core/Types.h"
#include "arm_compute/core/Validate.h"
diff --git a/src/runtime/CL/functions/CLGEMMDeconvolutionLayer.cpp b/src/runtime/CL/functions/CLGEMMDeconvolutionLayer.cpp
index 8af83e2280..dd1112fb4b 100644
--- a/src/runtime/CL/functions/CLGEMMDeconvolutionLayer.cpp
+++ b/src/runtime/CL/functions/CLGEMMDeconvolutionLayer.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2019-2021 Arm Limited.
+ * Copyright (c) 2019-2021, 2023 Arm Limited.
*
* SPDX-License-Identifier: MIT
*
@@ -23,6 +23,7 @@
*/
#include "arm_compute/runtime/CL/functions/CLGEMMDeconvolutionLayer.h"
+#include "arm_compute/core/ActivationLayerInfo.h"
#include "arm_compute/core/Helpers.h"
#include "arm_compute/core/Validate.h"
#include "arm_compute/core/utils/misc/ShapeCalculator.h"
diff --git a/src/runtime/heuristics/matmul_native/IClMatMulNativeKernelConfig.h b/src/runtime/heuristics/matmul_native/IClMatMulNativeKernelConfig.h
index ee9b03e63b..203f68c253 100644
--- a/src/runtime/heuristics/matmul_native/IClMatMulNativeKernelConfig.h
+++ b/src/runtime/heuristics/matmul_native/IClMatMulNativeKernelConfig.h
@@ -26,6 +26,7 @@
#include "arm_compute/core/GPUTarget.h"
#include "arm_compute/core/KernelDescriptors.h"
+#include "arm_compute/core/MatMulInfo.h"
#include "arm_compute/core/Types.h"
#include "src/core/common/Macros.h"
diff --git a/tests/IAccessor.h b/tests/IAccessor.h
index c54c00e99e..75faee19ce 100644
--- a/tests/IAccessor.h
+++ b/tests/IAccessor.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2017-2019 Arm Limited.
+ * Copyright (c) 2017-2019, 2023 Arm Limited.
*
* SPDX-License-Identifier: MIT
*
@@ -26,6 +26,7 @@
#include "arm_compute/core/Coordinates.h"
#include "arm_compute/core/Types.h"
+#include "arm_compute/core/QuantizationInfo.h"
namespace arm_compute
{
diff --git a/tests/validation/Helpers.h b/tests/validation/Helpers.h
index 3449239e45..2cbfaa0043 100644
--- a/tests/validation/Helpers.h
+++ b/tests/validation/Helpers.h
@@ -24,6 +24,7 @@
#ifndef ACL_TESTS_VALIDATION_HELPERS
#define ACL_TESTS_VALIDATION_HELPERS
+#include "arm_compute/core/ActivationLayerInfo.h"
#include "arm_compute/core/Types.h"
#include "arm_compute/core/Utils.h"
#include "support/Half.h"
diff --git a/utils/TypePrinter.h b/utils/TypePrinter.h
index 0327cd1b35..be5880de86 100644
--- a/utils/TypePrinter.h
+++ b/utils/TypePrinter.h
@@ -28,14 +28,18 @@
#include "arm_compute/core/CL/ICLTensor.h"
#endif /* ARM_COMPUTE_OPENCL_ENABLED */
+#include "arm_compute/core/ConvolutionInfo.h"
#include "arm_compute/core/Dimensions.h"
#include "arm_compute/core/Error.h"
+#include "arm_compute/core/FullyConnectedLayerInfo.h"
+#include "arm_compute/core/GEMMInfo.h"
#include "arm_compute/core/GPUTarget.h"
#include "arm_compute/core/KernelDescriptors.h"
#include "arm_compute/core/Size2D.h"
#include "arm_compute/core/Strides.h"
#include "arm_compute/core/TensorInfo.h"
#include "arm_compute/core/Types.h"
+#include "arm_compute/core/MatMulInfo.h"
#include "arm_compute/core/experimental/IPostOp.h"
#include "arm_compute/core/experimental/PostOps.h"
#include "arm_compute/dynamic_fusion/sketch/attributes/CastAttributes.h"