From d58cec032556abb103cdf7564ab29762d5c4c051 Mon Sep 17 00:00:00 2001 From: Moritz Pflanzer Date: Tue, 18 Jul 2017 15:44:21 +0100 Subject: COMPMID-415: Cleanup accessors Change-Id: Id19c8c1ea76f6e6679a4ac770e804f8012a2b5a6 Reviewed-on: http://mpd-gerrit.cambridge.arm.com/80937 Tested-by: Kaizen Reviewed-by: Anthony Barbier --- tests/CL/CLAccessor.h | 12 +- tests/CL/CLLutAccessor.h | 4 - tests/IAccessor.h | 8 +- tests/NEON/Accessor.h | 120 ++++++++++++++++++++ tests/NEON/Helper.h | 3 - tests/NEON/LutAccessor.h | 86 ++++++++++++++ tests/NEON/NEAccessor.h | 124 --------------------- tests/NEON/NELutAccessor.h | 90 --------------- tests/benchmark_new/CL/ActivationLayer.cpp | 2 +- tests/benchmark_new/CL/ConvolutionLayer.cpp | 2 +- tests/benchmark_new/CL/FullyConnectedLayer.cpp | 2 +- tests/benchmark_new/CL/NormalizationLayer.cpp | 2 +- tests/benchmark_new/CL/PoolingLayer.cpp | 2 +- tests/benchmark_new/CL/SYSTEM/AlexNet.cpp | 2 +- tests/benchmark_new/CL/SYSTEM/LeNet5.cpp | 2 +- tests/benchmark_new/NEON/ActivationLayer.cpp | 4 +- tests/benchmark_new/NEON/ConvolutionLayer.cpp | 4 +- .../benchmark_new/NEON/DirectConvolutionLayer.cpp | 4 +- tests/benchmark_new/NEON/FullyConnectedLayer.cpp | 4 +- tests/benchmark_new/NEON/NormalizationLayer.cpp | 4 +- tests/benchmark_new/NEON/PoolingLayer.cpp | 4 +- tests/benchmark_new/NEON/SYSTEM/AlexNet.cpp | 4 +- tests/benchmark_new/NEON/SYSTEM/LeNet5.cpp | 4 +- tests/validation/CL/ActivationLayer.cpp | 1 - tests/validation/CL/ArithmeticAddition.cpp | 1 - tests/validation/CL/ArithmeticSubtraction.cpp | 1 - tests/validation/CL/BatchNormalizationLayer.cpp | 1 - tests/validation/CL/BitwiseAnd.cpp | 1 - tests/validation/CL/Box3x3.cpp | 1 - tests/validation/CL/CLFixture.cpp | 1 - tests/validation/CL/CLFixture.h | 3 - tests/validation/CL/ConvolutionLayer.cpp | 1 - tests/validation/CL/DepthConcatenateLayer.cpp | 1 - tests/validation/CL/DepthConvert.cpp | 1 - tests/validation/CL/FillBorder.cpp | 1 - tests/validation/CL/FixedPoint/FixedPoint_QS8.cpp | 5 +- tests/validation/CL/FullyConnectedLayer.cpp | 1 - tests/validation/CL/GEMM.cpp | 1 - tests/validation/CL/Gaussian3x3.cpp | 1 - tests/validation/CL/Gaussian5x5.cpp | 1 - tests/validation/CL/IntegralImage.cpp | 1 - tests/validation/CL/NonLinearFilter.cpp | 1 - tests/validation/CL/PixelWiseMultiplication.cpp | 1 - tests/validation/CL/PoolingLayer.cpp | 1 - tests/validation/CL/Sobel3x3.cpp | 1 - tests/validation/CL/Sobel5x5.cpp | 1 - tests/validation/CL/SoftmaxLayer.cpp | 1 - tests/validation/CL/TableLookup.cpp | 1 - tests/validation/CL/Threshold.cpp | 1 - tests/validation/NEON/AbsoluteDifference.cpp | 15 ++- tests/validation/NEON/Accumulate.cpp | 11 +- tests/validation/NEON/AccumulateSquared.cpp | 11 +- tests/validation/NEON/AccumulateWeighted.cpp | 11 +- tests/validation/NEON/ActivationLayer.cpp | 19 ++-- tests/validation/NEON/ArithmeticAddition.cpp | 27 +++-- tests/validation/NEON/ArithmeticSubtraction.cpp | 27 +++-- tests/validation/NEON/BatchNormalizationLayer.cpp | 29 +++-- tests/validation/NEON/BitwiseAnd.cpp | 17 ++- tests/validation/NEON/BitwiseNot.cpp | 9 +- tests/validation/NEON/BitwiseOr.cpp | 11 +- tests/validation/NEON/BitwiseXor.cpp | 11 +- tests/validation/NEON/Box3x3.cpp | 9 +- tests/validation/NEON/CMakeLists.txt | 2 +- tests/validation/NEON/ConvolutionLayer.cpp | 25 ++--- tests/validation/NEON/ConvolutionLayerDirect.cpp | 23 ++-- tests/validation/NEON/DepthConcatenateLayer.cpp | 13 +-- tests/validation/NEON/DepthConvert.cpp | 53 +++++---- tests/validation/NEON/FillBorder.cpp | 9 +- tests/validation/NEON/Fixedpoint/Exp_QS16.cpp | 7 +- tests/validation/NEON/Fixedpoint/Exp_QS8.cpp | 7 +- tests/validation/NEON/Fixedpoint/Invsqrt_QS16.cpp | 7 +- tests/validation/NEON/Fixedpoint/Invsqrt_QS8.cpp | 7 +- tests/validation/NEON/Fixedpoint/Log_QS16.cpp | 7 +- tests/validation/NEON/Fixedpoint/Log_QS8.cpp | 7 +- .../validation/NEON/Fixedpoint/Reciprocal_QS16.cpp | 7 +- .../validation/NEON/Fixedpoint/Reciprocal_QS8.cpp | 7 +- tests/validation/NEON/FullyConnectedLayer.cpp | 25 ++--- tests/validation/NEON/GEMM.cpp | 25 ++--- tests/validation/NEON/Gaussian3x3.cpp | 9 +- tests/validation/NEON/Gaussian5x5.cpp | 9 +- tests/validation/NEON/IntegralImage.cpp | 9 +- tests/validation/NEON/MeanStdDev.cpp | 5 +- tests/validation/NEON/MinMaxLocation.cpp | 5 +- tests/validation/NEON/NonLinearFilter.cpp | 9 +- tests/validation/NEON/NormalizationLayer.cpp | 13 +-- tests/validation/NEON/PixelWiseMultiplication.cpp | 41 ++++--- tests/validation/NEON/PoolingLayer.cpp | 11 +- tests/validation/NEON/ROIPoolingLayer.cpp | 7 +- tests/validation/NEON/Sobel3x3.cpp | 14 +-- tests/validation/NEON/Sobel5x5.cpp | 13 +-- tests/validation/NEON/SoftmaxLayer.cpp | 19 ++-- tests/validation/NEON/TableLookup.cpp | 27 +++-- tests/validation/NEON/Threshold.cpp | 9 +- tests/validation/system_tests/CL/AlexNet.cpp | 1 - tests/validation/system_tests/CL/LeNet5.cpp | 1 - tests/validation/system_tests/NEON/AlexNet.cpp | 5 +- tests/validation/system_tests/NEON/LeNet5.cpp | 5 +- 97 files changed, 538 insertions(+), 637 deletions(-) create mode 100644 tests/NEON/Accessor.h create mode 100644 tests/NEON/LutAccessor.h delete mode 100644 tests/NEON/NEAccessor.h delete mode 100644 tests/NEON/NELutAccessor.h diff --git a/tests/CL/CLAccessor.h b/tests/CL/CLAccessor.h index e6d226c89b..260da035c5 100644 --- a/tests/CL/CLAccessor.h +++ b/tests/CL/CLAccessor.h @@ -21,19 +21,16 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -#ifndef __ARM_COMPUTE_TEST_CL_CLACCESSOR_H__ -#define __ARM_COMPUTE_TEST_CL_CLACCESSOR_H__ - -#include "IAccessor.h" +#ifndef __ARM_COMPUTE_TEST_CLACCESSOR_H__ +#define __ARM_COMPUTE_TEST_CLACCESSOR_H__ #include "arm_compute/runtime/CL/CLTensor.h" +#include "tests/IAccessor.h" namespace arm_compute { namespace test { -namespace cl -{ /** Accessor implementation for @ref CLTensor objects. */ class CLAccessor : public IAccessor { @@ -130,7 +127,6 @@ inline void *CLAccessor::operator()(const Coordinates &coord) { return _tensor.ptr_to_element(coord); } -} // cl } // namespace test } // namespace arm_compute -#endif /* __ARM_COMPUTE_TEST_CL_CLACCESSOR_H__ */ +#endif /* __ARM_COMPUTE_TEST_CLACCESSOR_H__ */ diff --git a/tests/CL/CLLutAccessor.h b/tests/CL/CLLutAccessor.h index 49bd12f327..3877b1fe57 100644 --- a/tests/CL/CLLutAccessor.h +++ b/tests/CL/CLLutAccessor.h @@ -32,8 +32,6 @@ namespace arm_compute { namespace test { -namespace cl -{ /** Accessor implementation for @ref CLLut objects. */ template class CLLutAccessor : public ILutAccessor @@ -88,8 +86,6 @@ public: private: CLLut &_lut; }; - -} // namespace cl } // namespace test } // namespace arm_compute #endif /* __ARM_COMPUTE_TEST_CL_CLLUTACCESSOR_H__ */ diff --git a/tests/IAccessor.h b/tests/IAccessor.h index b4f2d213da..0517981df5 100644 --- a/tests/IAccessor.h +++ b/tests/IAccessor.h @@ -37,8 +37,8 @@ namespace test class IAccessor { public: - /** Pure virtual destructor. */ - virtual ~IAccessor() = 0; + /** Virtual destructor. */ + virtual ~IAccessor() = default; /** Shape of the tensor. */ virtual TensorShape shape() const = 0; @@ -80,10 +80,6 @@ public: */ virtual void *operator()(const Coordinates &coord) = 0; }; - -inline IAccessor::~IAccessor() -{ -} } // namespace test } // namespace arm_compute #endif /* __ARM_COMPUTE_TEST_IACCESSOR_H__ */ diff --git a/tests/NEON/Accessor.h b/tests/NEON/Accessor.h new file mode 100644 index 0000000000..5949b350a0 --- /dev/null +++ b/tests/NEON/Accessor.h @@ -0,0 +1,120 @@ +/* + * Copyright (c) 2017 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_TEST_ACCESSOR_H__ +#define __ARM_COMPUTE_TEST_ACCESSOR_H__ + +#include "arm_compute/runtime/Tensor.h" +#include "tests/IAccessor.h" + +namespace arm_compute +{ +namespace test +{ +/** Accessor implementation for @ref Tensor objects. */ +class Accessor : public IAccessor +{ +public: + /** Create an accessor for the given @p tensor. + * + * @param[in, out] tensor To be accessed tensor. + */ + Accessor(Tensor &tensor); + + Accessor(const Accessor &) = delete; + Accessor &operator=(const Accessor &) = delete; + Accessor(Accessor &&) = default; + Accessor &operator=(Accessor &&) = default; + + TensorShape shape() const override; + size_t element_size() const override; + size_t size() const override; + Format format() const override; + DataType data_type() const override; + int num_channels() const override; + int num_elements() const override; + int fixed_point_position() const override; + const void *operator()(const Coordinates &coord) const override; + void *operator()(const Coordinates &coord) override; + +private: + Tensor &_tensor; +}; + +inline Accessor::Accessor(Tensor &tensor) + : _tensor{ tensor } +{ +} + +inline TensorShape Accessor::shape() const +{ + return _tensor.info()->tensor_shape(); +} + +inline size_t Accessor::element_size() const +{ + return _tensor.info()->element_size(); +} + +inline size_t Accessor::size() const +{ + return _tensor.info()->total_size(); +} + +inline Format Accessor::format() const +{ + return _tensor.info()->format(); +} + +inline DataType Accessor::data_type() const +{ + return _tensor.info()->data_type(); +} + +inline int Accessor::num_channels() const +{ + return _tensor.info()->num_channels(); +} + +inline int Accessor::num_elements() const +{ + return _tensor.info()->tensor_shape().total_size(); +} + +inline int Accessor::fixed_point_position() const +{ + return _tensor.info()->fixed_point_position(); +} + +inline const void *Accessor::operator()(const Coordinates &coord) const +{ + return _tensor.ptr_to_element(coord); +} + +inline void *Accessor::operator()(const Coordinates &coord) +{ + return _tensor.ptr_to_element(coord); +} +} // namespace test +} // namespace arm_compute +#endif /* __ARM_COMPUTE_TEST_ACCESSOR_H__ */ diff --git a/tests/NEON/Helper.h b/tests/NEON/Helper.h index f9774c774c..5b0f750fca 100644 --- a/tests/NEON/Helper.h +++ b/tests/NEON/Helper.h @@ -33,8 +33,6 @@ namespace arm_compute { namespace test { -namespace neon -{ template Array create_array(const std::vector &v) { @@ -46,7 +44,6 @@ Array create_array(const std::vector &v) return array; } -} // namespace neon } // namespace test } // namespace arm_compute #endif /* __ARM_COMPUTE_TEST_NEON_HELPER_H__ */ diff --git a/tests/NEON/LutAccessor.h b/tests/NEON/LutAccessor.h new file mode 100644 index 0000000000..24ad63d84b --- /dev/null +++ b/tests/NEON/LutAccessor.h @@ -0,0 +1,86 @@ +/* + * Copyright (c) 2017 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_TEST_NEON_LUTACCESSOR_H__ +#define __ARM_COMPUTE_TEST_NEON_LUTACCESSOR_H__ + +#include "ILutAccessor.h" + +#include "arm_compute/runtime/Lut.h" + +namespace arm_compute +{ +namespace test +{ +/** Accessor implementation for @ref Lut objects. */ +template +class LutAccessor : public ILutAccessor +{ +public: + /** Create an accessor for the given @p Lut. + */ + LutAccessor(Lut &lut) + : _lut{ lut } + { + } + + LutAccessor(const LutAccessor &) = delete; + LutAccessor &operator=(const LutAccessor &) = delete; + LutAccessor(LutAccessor &&) = default; + LutAccessor &operator=(LutAccessor &&) = default; + + int num_elements() const override + { + return _lut.num_elements(); + } + + const T &operator[](T input_value) const override + { + auto lut = reinterpret_cast(_lut.buffer()); + int32_t real_index = _lut.index_offset() + static_cast(input_value); + + if(0 <= real_index && real_index < num_elements()) + { + return lut[real_index]; + } + ARM_COMPUTE_ERROR("Error index not in range."); + } + + T &operator[](T input_value) override + { + auto lut = reinterpret_cast(_lut.buffer()); + int32_t real_index = _lut.index_offset() + static_cast(input_value); + + if(0 <= real_index && real_index < num_elements()) + { + return lut[real_index]; + } + ARM_COMPUTE_ERROR("Error index not in range."); + } + +private: + ILut &_lut; +}; +} // namespace test +} // namespace arm_compute +#endif /* __ARM_COMPUTE_TEST_NEON_LUTACCESSOR_H__ */ diff --git a/tests/NEON/NEAccessor.h b/tests/NEON/NEAccessor.h deleted file mode 100644 index 9afc300d99..0000000000 --- a/tests/NEON/NEAccessor.h +++ /dev/null @@ -1,124 +0,0 @@ -/* - * Copyright (c) 2017 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_TEST_NEON_NEACCESSOR_H__ -#define __ARM_COMPUTE_TEST_NEON_NEACCESSOR_H__ - -#include "IAccessor.h" - -#include "arm_compute/runtime/Tensor.h" - -namespace arm_compute -{ -namespace test -{ -namespace neon -{ -/** Accessor implementation for @ref Tensor objects. */ -class NEAccessor : public IAccessor -{ -public: - /** Create an accessor for the given @p tensor. - * - * @param[in, out] tensor To be accessed tensor. - */ - NEAccessor(Tensor &tensor); - - NEAccessor(const NEAccessor &) = delete; - NEAccessor &operator=(const NEAccessor &) = delete; - NEAccessor(NEAccessor &&) = default; - NEAccessor &operator=(NEAccessor &&) = default; - - TensorShape shape() const override; - size_t element_size() const override; - size_t size() const override; - Format format() const override; - DataType data_type() const override; - int num_channels() const override; - int num_elements() const override; - int fixed_point_position() const override; - const void *operator()(const Coordinates &coord) const override; - void *operator()(const Coordinates &coord) override; - -private: - Tensor &_tensor; -}; - -inline NEAccessor::NEAccessor(Tensor &tensor) - : _tensor{ tensor } -{ -} - -inline TensorShape NEAccessor::shape() const -{ - return _tensor.info()->tensor_shape(); -} - -inline size_t NEAccessor::element_size() const -{ - return _tensor.info()->element_size(); -} - -inline size_t NEAccessor::size() const -{ - return _tensor.info()->total_size(); -} - -inline Format NEAccessor::format() const -{ - return _tensor.info()->format(); -} - -inline DataType NEAccessor::data_type() const -{ - return _tensor.info()->data_type(); -} - -inline int NEAccessor::num_channels() const -{ - return _tensor.info()->num_channels(); -} - -inline int NEAccessor::num_elements() const -{ - return _tensor.info()->tensor_shape().total_size(); -} - -inline int NEAccessor::fixed_point_position() const -{ - return _tensor.info()->fixed_point_position(); -} - -inline const void *NEAccessor::operator()(const Coordinates &coord) const -{ - return _tensor.ptr_to_element(coord); -} - -inline void *NEAccessor::operator()(const Coordinates &coord) -{ - return _tensor.ptr_to_element(coord); -} -} // namespace neon -} // namespace test -} // namespace arm_compute -#endif /* __ARM_COMPUTE_TEST_NEON_NEACCESSOR_H__ */ diff --git a/tests/NEON/NELutAccessor.h b/tests/NEON/NELutAccessor.h deleted file mode 100644 index 2dadcf5996..0000000000 --- a/tests/NEON/NELutAccessor.h +++ /dev/null @@ -1,90 +0,0 @@ -/* - * Copyright (c) 2017 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_TEST_NEON_NELUTACCESSOR_H__ -#define __ARM_COMPUTE_TEST_NEON_NELUTACCESSOR_H__ - -#include "ILutAccessor.h" - -#include "arm_compute/runtime/Lut.h" - -namespace arm_compute -{ -namespace test -{ -namespace neon -{ -/** Accessor implementation for @ref Lut objects. */ -template -class NELutAccessor : public ILutAccessor -{ -public: - /** Create an accessor for the given @p Lut. - */ - NELutAccessor(Lut &lut) - : _lut{ lut } - { - } - - NELutAccessor(const NELutAccessor &) = delete; - NELutAccessor &operator=(const NELutAccessor &) = delete; - NELutAccessor(NELutAccessor &&) = default; - NELutAccessor &operator=(NELutAccessor &&) = default; - - int num_elements() const override - { - return _lut.num_elements(); - } - - const T &operator[](T input_value) const override - { - auto lut = reinterpret_cast(_lut.buffer()); - int32_t real_index = _lut.index_offset() + static_cast(input_value); - - if(0 <= real_index && real_index < num_elements()) - { - return lut[real_index]; - } - ARM_COMPUTE_ERROR("Error index not in range."); - } - - T &operator[](T input_value) override - { - auto lut = reinterpret_cast(_lut.buffer()); - int32_t real_index = _lut.index_offset() + static_cast(input_value); - - if(0 <= real_index && real_index < num_elements()) - { - return lut[real_index]; - } - ARM_COMPUTE_ERROR("Error index not in range."); - } - -private: - ILut &_lut; -}; - -} // namespace neon -} // namespace test -} // namespace arm_compute -#endif /* __ARM_COMPUTE_TEST_NEON_NELUTACCESSOR_H__ */ diff --git a/tests/benchmark_new/CL/ActivationLayer.cpp b/tests/benchmark_new/CL/ActivationLayer.cpp index c3151e6729..6f8a00727e 100644 --- a/tests/benchmark_new/CL/ActivationLayer.cpp +++ b/tests/benchmark_new/CL/ActivationLayer.cpp @@ -37,7 +37,7 @@ namespace arm_compute { namespace test { -using CLActivationLayerFixture = ActivationLayerFixture; +using CLActivationLayerFixture = ActivationLayerFixture; TEST_SUITE(CL) diff --git a/tests/benchmark_new/CL/ConvolutionLayer.cpp b/tests/benchmark_new/CL/ConvolutionLayer.cpp index 3a74fbbaba..6e0d6ffc2a 100644 --- a/tests/benchmark_new/CL/ConvolutionLayer.cpp +++ b/tests/benchmark_new/CL/ConvolutionLayer.cpp @@ -39,7 +39,7 @@ namespace arm_compute { namespace test { -using CLConvolutionLayerFixture = ConvolutionLayerFixture; +using CLConvolutionLayerFixture = ConvolutionLayerFixture; TEST_SUITE(CL) diff --git a/tests/benchmark_new/CL/FullyConnectedLayer.cpp b/tests/benchmark_new/CL/FullyConnectedLayer.cpp index 6b177fd8fa..a71c876ad6 100644 --- a/tests/benchmark_new/CL/FullyConnectedLayer.cpp +++ b/tests/benchmark_new/CL/FullyConnectedLayer.cpp @@ -39,7 +39,7 @@ namespace arm_compute { namespace test { -using CLFullyConnectedLayerFixture = FullyConnectedLayerFixture; +using CLFullyConnectedLayerFixture = FullyConnectedLayerFixture; TEST_SUITE(CL) diff --git a/tests/benchmark_new/CL/NormalizationLayer.cpp b/tests/benchmark_new/CL/NormalizationLayer.cpp index 8e8c18054e..6d5142c7d7 100644 --- a/tests/benchmark_new/CL/NormalizationLayer.cpp +++ b/tests/benchmark_new/CL/NormalizationLayer.cpp @@ -37,7 +37,7 @@ namespace arm_compute { namespace test { -using CLNormalizationLayerFixture = NormalizationLayerFixture; +using CLNormalizationLayerFixture = NormalizationLayerFixture; TEST_SUITE(CL) diff --git a/tests/benchmark_new/CL/PoolingLayer.cpp b/tests/benchmark_new/CL/PoolingLayer.cpp index 39da61b0fe..125907bff5 100644 --- a/tests/benchmark_new/CL/PoolingLayer.cpp +++ b/tests/benchmark_new/CL/PoolingLayer.cpp @@ -39,7 +39,7 @@ namespace arm_compute { namespace test { -using CLPoolingLayerFixture = PoolingLayerFixture; +using CLPoolingLayerFixture = PoolingLayerFixture; TEST_SUITE(CL) diff --git a/tests/benchmark_new/CL/SYSTEM/AlexNet.cpp b/tests/benchmark_new/CL/SYSTEM/AlexNet.cpp index c34f35ebfb..85cd701648 100644 --- a/tests/benchmark_new/CL/SYSTEM/AlexNet.cpp +++ b/tests/benchmark_new/CL/SYSTEM/AlexNet.cpp @@ -46,7 +46,7 @@ namespace test using CLAlexNetFixture = AlexNetFixture; +using NEActivationLayerFixture = ActivationLayerFixture; TEST_SUITE(NEON) diff --git a/tests/benchmark_new/NEON/ConvolutionLayer.cpp b/tests/benchmark_new/NEON/ConvolutionLayer.cpp index 0825b4b6bb..6dd4df89a4 100644 --- a/tests/benchmark_new/NEON/ConvolutionLayer.cpp +++ b/tests/benchmark_new/NEON/ConvolutionLayer.cpp @@ -28,7 +28,7 @@ #include "arm_compute/runtime/TensorAllocator.h" #include "framework/Macros.h" #include "framework/datasets/Datasets.h" -#include "tests/NEON/NEAccessor.h" +#include "tests/NEON/Accessor.h" #include "tests/TypePrinter.h" #include "tests/datasets_new/AlexNetConvolutionLayerDataset.h" #include "tests/datasets_new/GoogLeNetConvolutionLayerDataset.h" @@ -50,7 +50,7 @@ const auto lenet_data_types = framework::dataset::make("DataType", { DataType: #endif /* ARM_COMPUTE_ENABLE_FP16 */ } // namespace -using NEConvolutionLayerFixture = ConvolutionLayerFixture; +using NEConvolutionLayerFixture = ConvolutionLayerFixture; TEST_SUITE(NEON) diff --git a/tests/benchmark_new/NEON/DirectConvolutionLayer.cpp b/tests/benchmark_new/NEON/DirectConvolutionLayer.cpp index b4e040d88c..5588321cc6 100644 --- a/tests/benchmark_new/NEON/DirectConvolutionLayer.cpp +++ b/tests/benchmark_new/NEON/DirectConvolutionLayer.cpp @@ -28,7 +28,7 @@ #include "arm_compute/runtime/TensorAllocator.h" #include "framework/Macros.h" #include "framework/datasets/Datasets.h" -#include "tests/NEON/NEAccessor.h" +#include "tests/NEON/Accessor.h" #include "tests/TypePrinter.h" #include "tests/datasets_new/DirectConvolutionLayerDataset.h" #include "tests/fixtures_new/ConvolutionLayerFixture.h" @@ -37,7 +37,7 @@ namespace arm_compute { namespace test { -using NEDirectConvolutionLayerFixture = ConvolutionLayerFixture; +using NEDirectConvolutionLayerFixture = ConvolutionLayerFixture; TEST_SUITE(NEON) diff --git a/tests/benchmark_new/NEON/FullyConnectedLayer.cpp b/tests/benchmark_new/NEON/FullyConnectedLayer.cpp index 5fa139ec7f..eb5612348a 100644 --- a/tests/benchmark_new/NEON/FullyConnectedLayer.cpp +++ b/tests/benchmark_new/NEON/FullyConnectedLayer.cpp @@ -28,7 +28,7 @@ #include "arm_compute/runtime/TensorAllocator.h" #include "framework/Macros.h" #include "framework/datasets/Datasets.h" -#include "tests/NEON/NEAccessor.h" +#include "tests/NEON/Accessor.h" #include "tests/TypePrinter.h" #include "tests/datasets_new/AlexNetFullyConnectedLayerDataset.h" #include "tests/datasets_new/GoogLeNetFullyConnectedLayerDataset.h" @@ -39,7 +39,7 @@ namespace arm_compute { namespace test { -using NEFullyConnectedLayerFixture = FullyConnectedLayerFixture; +using NEFullyConnectedLayerFixture = FullyConnectedLayerFixture; TEST_SUITE(NEON) diff --git a/tests/benchmark_new/NEON/NormalizationLayer.cpp b/tests/benchmark_new/NEON/NormalizationLayer.cpp index 01b960ebd2..c3d4969a10 100644 --- a/tests/benchmark_new/NEON/NormalizationLayer.cpp +++ b/tests/benchmark_new/NEON/NormalizationLayer.cpp @@ -28,7 +28,7 @@ #include "arm_compute/runtime/TensorAllocator.h" #include "framework/Macros.h" #include "framework/datasets/Datasets.h" -#include "tests/NEON/NEAccessor.h" +#include "tests/NEON/Accessor.h" #include "tests/TypePrinter.h" #include "tests/datasets_new/NormalizationLayerDataset.h" #include "tests/fixtures_new/NormalizationLayerFixture.h" @@ -37,7 +37,7 @@ namespace arm_compute { namespace test { -using NENormalizationLayerFixture = NormalizationLayerFixture; +using NENormalizationLayerFixture = NormalizationLayerFixture; TEST_SUITE(NEON) diff --git a/tests/benchmark_new/NEON/PoolingLayer.cpp b/tests/benchmark_new/NEON/PoolingLayer.cpp index 05a3600abe..baa6e31483 100644 --- a/tests/benchmark_new/NEON/PoolingLayer.cpp +++ b/tests/benchmark_new/NEON/PoolingLayer.cpp @@ -28,7 +28,7 @@ #include "arm_compute/runtime/TensorAllocator.h" #include "framework/Macros.h" #include "framework/datasets/Datasets.h" -#include "tests/NEON/NEAccessor.h" +#include "tests/NEON/Accessor.h" #include "tests/TypePrinter.h" #include "tests/datasets_new/AlexNetPoolingLayerDataset.h" #include "tests/datasets_new/GoogLeNetPoolingLayerDataset.h" @@ -39,7 +39,7 @@ namespace arm_compute { namespace test { -using NEPoolingLayerFixture = PoolingLayerFixture; +using NEPoolingLayerFixture = PoolingLayerFixture; TEST_SUITE(NEON) diff --git a/tests/benchmark_new/NEON/SYSTEM/AlexNet.cpp b/tests/benchmark_new/NEON/SYSTEM/AlexNet.cpp index 07d87fd548..e97919a21f 100644 --- a/tests/benchmark_new/NEON/SYSTEM/AlexNet.cpp +++ b/tests/benchmark_new/NEON/SYSTEM/AlexNet.cpp @@ -34,7 +34,7 @@ #include "arm_compute/runtime/TensorAllocator.h" #include "framework/Macros.h" #include "framework/datasets/Datasets.h" -#include "tests/NEON/NEAccessor.h" +#include "tests/NEON/Accessor.h" #include "tests/TypePrinter.h" #include "tests/datasets_new/ActivationLayerDataset.h" #include "tests/fixtures_new/AlexNetFixture.h" @@ -46,7 +46,7 @@ namespace test using NEAlexNetFixture = AlexNetFixtureis_resizable()); // Fill tensors - library->fill_tensor_uniform(NEAccessor(src1), 0); - library->fill_tensor_uniform(NEAccessor(src2), 1); + library->fill_tensor_uniform(Accessor(src1), 0); + library->fill_tensor_uniform(Accessor(src2), 1); // Compute function abs_d.run(); @@ -139,7 +138,7 @@ BOOST_DATA_TEST_CASE(RunSmall, SmallShapes(), RawTensor ref_dst = Reference::compute_reference_absolute_difference(shape, DataType::U8, DataType::U8, DataType::U8); // Validate output - validate(NEAccessor(dst), ref_dst); + validate(Accessor(dst), ref_dst); } BOOST_TEST_DECORATOR(*boost::unit_test::label("nightly")) BOOST_DATA_TEST_CASE(RunLarge, LargeShapes(), @@ -152,7 +151,7 @@ BOOST_DATA_TEST_CASE(RunLarge, LargeShapes(), RawTensor ref_dst = Reference::compute_reference_absolute_difference(shape, DataType::U8, DataType::U8, DataType::U8); // Validate output - validate(NEAccessor(dst), ref_dst); + validate(Accessor(dst), ref_dst); } BOOST_AUTO_TEST_SUITE_END() @@ -179,7 +178,7 @@ BOOST_DATA_TEST_CASE(RunSmall, SmallShapes() * boost::unit_test::data::make({ Da RawTensor ref_dst = Reference::compute_reference_absolute_difference(shape, dt, DataType::S16, DataType::S16); // Validate output - validate(NEAccessor(dst), ref_dst); + validate(Accessor(dst), ref_dst); } BOOST_TEST_DECORATOR(*boost::unit_test::label("nightly")) BOOST_DATA_TEST_CASE(RunLarge, LargeShapes() * boost::unit_test::data::make({ DataType::U8, DataType::S16 }), @@ -192,7 +191,7 @@ BOOST_DATA_TEST_CASE(RunLarge, LargeShapes() * boost::unit_test::data::make({ Da RawTensor ref_dst = Reference::compute_reference_absolute_difference(shape, dt, DataType::S16, DataType::S16); // Validate output - validate(NEAccessor(dst), ref_dst); + validate(Accessor(dst), ref_dst); } BOOST_AUTO_TEST_SUITE_END() diff --git a/tests/validation/NEON/Accumulate.cpp b/tests/validation/NEON/Accumulate.cpp index 2d2d9c22a1..7e8a85065e 100644 --- a/tests/validation/NEON/Accumulate.cpp +++ b/tests/validation/NEON/Accumulate.cpp @@ -23,7 +23,7 @@ */ #include "AssetsLibrary.h" #include "Globals.h" -#include "NEON/NEAccessor.h" +#include "NEON/Accessor.h" #include "PaddingCalculator.h" #include "TypePrinter.h" #include "Utils.h" @@ -44,7 +44,6 @@ using namespace arm_compute; using namespace arm_compute::test; -using namespace arm_compute::test::neon; using namespace arm_compute::test::validation; namespace @@ -73,8 +72,8 @@ Tensor compute_accumulate(const TensorShape &shape) BOOST_TEST(!dst.info()->is_resizable()); // Fill tensors - library->fill_tensor_uniform(NEAccessor(src), 0); - library->fill_tensor_uniform(NEAccessor(dst), 1); + library->fill_tensor_uniform(Accessor(src), 0); + library->fill_tensor_uniform(Accessor(dst), 1); // Compute function acc.run(); @@ -124,7 +123,7 @@ BOOST_DATA_TEST_CASE(RunSmall, SmallShapes(), RawTensor ref_dst = Reference::compute_reference_accumulate(shape); // Validate output - validate(NEAccessor(dst), ref_dst); + validate(Accessor(dst), ref_dst); } BOOST_TEST_DECORATOR(*boost::unit_test::label("nightly")) @@ -138,7 +137,7 @@ BOOST_DATA_TEST_CASE(RunLarge, LargeShapes(), RawTensor ref_dst = Reference::compute_reference_accumulate(shape); // Validate output - validate(NEAccessor(dst), ref_dst); + validate(Accessor(dst), ref_dst); } BOOST_AUTO_TEST_SUITE_END() diff --git a/tests/validation/NEON/AccumulateSquared.cpp b/tests/validation/NEON/AccumulateSquared.cpp index 19b930fb25..83908425be 100644 --- a/tests/validation/NEON/AccumulateSquared.cpp +++ b/tests/validation/NEON/AccumulateSquared.cpp @@ -23,7 +23,7 @@ */ #include "AssetsLibrary.h" #include "Globals.h" -#include "NEON/NEAccessor.h" +#include "NEON/Accessor.h" #include "PaddingCalculator.h" #include "TypePrinter.h" #include "Utils.h" @@ -44,7 +44,6 @@ using namespace arm_compute; using namespace arm_compute::test; -using namespace arm_compute::test::neon; using namespace arm_compute::test::validation; namespace @@ -74,8 +73,8 @@ Tensor compute_accumulate_squared(const TensorShape &shape, uint32_t shift) // Fill tensors // dst tensor filled with non-negative values - library->fill_tensor_uniform(NEAccessor(src), 0); - library->fill_tensor_uniform(NEAccessor(dst), 1, static_cast(0), std::numeric_limits::max()); + library->fill_tensor_uniform(Accessor(src), 0); + library->fill_tensor_uniform(Accessor(dst), 1, static_cast(0), std::numeric_limits::max()); // Compute function acc.run(); @@ -125,7 +124,7 @@ BOOST_DATA_TEST_CASE(RunSmall, SmallShapes() * boost::unit_test::data::xrange(0U RawTensor ref_dst = Reference::compute_reference_accumulate_squared(shape, shift); // Validate output - validate(NEAccessor(dst), ref_dst); + validate(Accessor(dst), ref_dst); } BOOST_TEST_DECORATOR(*boost::unit_test::label("nightly")) @@ -139,7 +138,7 @@ BOOST_DATA_TEST_CASE(RunLarge, LargeShapes() * boost::unit_test::data::make({ 0U RawTensor ref_dst = Reference::compute_reference_accumulate_squared(shape, shift); // Validate output - validate(NEAccessor(dst), ref_dst); + validate(Accessor(dst), ref_dst); } BOOST_AUTO_TEST_SUITE_END() diff --git a/tests/validation/NEON/AccumulateWeighted.cpp b/tests/validation/NEON/AccumulateWeighted.cpp index 4dfa2b8fc7..ea71959c0b 100644 --- a/tests/validation/NEON/AccumulateWeighted.cpp +++ b/tests/validation/NEON/AccumulateWeighted.cpp @@ -23,7 +23,7 @@ */ #include "AssetsLibrary.h" #include "Globals.h" -#include "NEON/NEAccessor.h" +#include "NEON/Accessor.h" #include "PaddingCalculator.h" #include "TypePrinter.h" #include "Utils.h" @@ -44,7 +44,6 @@ using namespace arm_compute; using namespace arm_compute::test; -using namespace arm_compute::test::neon; using namespace arm_compute::test::validation; namespace @@ -73,8 +72,8 @@ Tensor compute_accumulate_weighted(const TensorShape &shape, float alpha) BOOST_TEST(!dst.info()->is_resizable()); // Fill tensors - library->fill_tensor_uniform(NEAccessor(src), 0); - library->fill_tensor_uniform(NEAccessor(dst), 1); + library->fill_tensor_uniform(Accessor(src), 0); + library->fill_tensor_uniform(Accessor(dst), 1); // Compute function acc.run(); @@ -124,7 +123,7 @@ BOOST_DATA_TEST_CASE(RunSmall, SmallShapes() * boost::unit_test::data::make({ 0. RawTensor ref_dst = Reference::compute_reference_accumulate_weighted(shape, alpha); // Validate output - validate(NEAccessor(dst), ref_dst); + validate(Accessor(dst), ref_dst); } BOOST_TEST_DECORATOR(*boost::unit_test::label("nightly")) @@ -138,7 +137,7 @@ BOOST_DATA_TEST_CASE(RunLarge, LargeShapes() * boost::unit_test::data::make({ 0. RawTensor ref_dst = Reference::compute_reference_accumulate_weighted(shape, alpha); // Validate output - validate(NEAccessor(dst), ref_dst); + validate(Accessor(dst), ref_dst); } BOOST_AUTO_TEST_SUITE_END() diff --git a/tests/validation/NEON/ActivationLayer.cpp b/tests/validation/NEON/ActivationLayer.cpp index 5ddb9e05be..fbb5d17540 100644 --- a/tests/validation/NEON/ActivationLayer.cpp +++ b/tests/validation/NEON/ActivationLayer.cpp @@ -23,7 +23,7 @@ */ #include "AssetsLibrary.h" #include "Globals.h" -#include "NEON/NEAccessor.h" +#include "NEON/Accessor.h" #include "PaddingCalculator.h" #include "TypePrinter.h" #include "Utils.h" @@ -46,7 +46,6 @@ using namespace arm_compute; using namespace arm_compute::test; -using namespace arm_compute::test::neon; using namespace arm_compute::test::validation; namespace @@ -128,14 +127,14 @@ Tensor compute_activation_layer(bool in_place, const TensorShape &shape, DataTyp { const std::pair bounds = get_activation_layer_test_bounds(act_info.activation(), fixed_point_position); std::uniform_int_distribution<> distribution(bounds.first, bounds.second); - library->fill(NEAccessor(src), distribution, 0); + library->fill(Accessor(src), distribution, 0); break; } case DataType::QS16: { const std::pair bounds = get_activation_layer_test_bounds(act_info.activation(), fixed_point_position); std::uniform_int_distribution<> distribution(bounds.first, bounds.second); - library->fill(NEAccessor(src), distribution, 0); + library->fill(Accessor(src), distribution, 0); break; } #ifdef ARM_COMPUTE_ENABLE_FP16 @@ -143,7 +142,7 @@ Tensor compute_activation_layer(bool in_place, const TensorShape &shape, DataTyp { const std::pair bounds = get_activation_layer_test_bounds(act_info.activation()); std::uniform_real_distribution<> distribution(bounds.first, bounds.second); - library->fill(NEAccessor(src), distribution, 0); + library->fill(Accessor(src), distribution, 0); break; } #endif /* ARM_COMPUTE_ENABLE_FP16 */ @@ -151,7 +150,7 @@ Tensor compute_activation_layer(bool in_place, const TensorShape &shape, DataTyp { const std::pair bounds = get_activation_layer_test_bounds(act_info.activation()); std::uniform_real_distribution<> distribution(bounds.first, bounds.second); - library->fill(NEAccessor(src), distribution, 0); + library->fill(Accessor(src), distribution, 0); break; } default: @@ -259,7 +258,7 @@ BOOST_DATA_TEST_CASE(RunSmall, boost::unit_test::data::make({ false, true }) * S RawTensor ref_dst = Reference::compute_reference_activation_layer(shape, dt, act_info); // Validate output - validate(NEAccessor(dst), ref_dst, activation_layer_tolerance(dt, act_function)); + validate(Accessor(dst), ref_dst, activation_layer_tolerance(dt, act_function)); } BOOST_TEST_DECORATOR(*boost::unit_test::label("nightly")) @@ -276,7 +275,7 @@ BOOST_DATA_TEST_CASE(RunLarge, boost::unit_test::data::make({ false, true }) * L RawTensor ref_dst = Reference::compute_reference_activation_layer(shape, dt, act_info); // Validate output - validate(NEAccessor(dst), ref_dst, activation_layer_tolerance(dt, act_function)); + validate(Accessor(dst), ref_dst, activation_layer_tolerance(dt, act_function)); } BOOST_AUTO_TEST_SUITE_END() @@ -299,7 +298,7 @@ BOOST_DATA_TEST_CASE(RunSmall, boost::unit_test::data::make({ false, true }) * S RawTensor ref_dst = Reference::compute_reference_activation_layer(shape, DataType::QS8, act_info, fixed_point_position); // Validate output - validate(NEAccessor(dst), ref_dst, activation_layer_tolerance(DataType::QS8, act_function, fixed_point_position)); + validate(Accessor(dst), ref_dst, activation_layer_tolerance(DataType::QS8, act_function, fixed_point_position)); } BOOST_AUTO_TEST_SUITE_END() @@ -318,7 +317,7 @@ BOOST_DATA_TEST_CASE(RunSmall, boost::unit_test::data::make({ false, true }) * S RawTensor ref_dst = Reference::compute_reference_activation_layer(shape, DataType::QS16, act_info, fixed_point_position); // Validate output - validate(NEAccessor(dst), ref_dst, activation_layer_tolerance(DataType::QS16, act_function, fixed_point_position)); + validate(Accessor(dst), ref_dst, activation_layer_tolerance(DataType::QS16, act_function, fixed_point_position)); } BOOST_AUTO_TEST_SUITE_END() diff --git a/tests/validation/NEON/ArithmeticAddition.cpp b/tests/validation/NEON/ArithmeticAddition.cpp index c98df7a8df..952dcd207b 100644 --- a/tests/validation/NEON/ArithmeticAddition.cpp +++ b/tests/validation/NEON/ArithmeticAddition.cpp @@ -23,7 +23,7 @@ */ #include "AssetsLibrary.h" #include "Globals.h" -#include "NEON/NEAccessor.h" +#include "NEON/Accessor.h" #include "PaddingCalculator.h" #include "TypePrinter.h" #include "Utils.h" @@ -44,7 +44,6 @@ using namespace arm_compute; using namespace arm_compute::test; -using namespace arm_compute::test::neon; using namespace arm_compute::test::validation; namespace @@ -81,8 +80,8 @@ Tensor compute_arithmetic_addition(const TensorShape &shape, DataType dt_in0, Da BOOST_TEST(!dst.info()->is_resizable()); // Fill tensors - library->fill_tensor_uniform(NEAccessor(src1), 0); - library->fill_tensor_uniform(NEAccessor(src2), 1); + library->fill_tensor_uniform(Accessor(src1), 0); + library->fill_tensor_uniform(Accessor(src2), 1); // Compute function add.run(); @@ -141,7 +140,7 @@ BOOST_DATA_TEST_CASE(RunSmall, SmallShapes() * boost::unit_test::data::make({ Co RawTensor ref_dst = Reference::compute_reference_arithmetic_addition(shape, DataType::U8, DataType::U8, DataType::U8, policy); // Validate output - validate(NEAccessor(dst), ref_dst); + validate(Accessor(dst), ref_dst); } BOOST_AUTO_TEST_SUITE_END() @@ -168,7 +167,7 @@ BOOST_DATA_TEST_CASE(RunSmall, SmallShapes() * boost::unit_test::data::make({ Da RawTensor ref_dst = Reference::compute_reference_arithmetic_addition(shape, dt, DataType::S16, DataType::S16, policy); // Validate output - validate(NEAccessor(dst), ref_dst); + validate(Accessor(dst), ref_dst); } BOOST_TEST_DECORATOR(*boost::unit_test::label("nightly")) BOOST_DATA_TEST_CASE(RunLarge, LargeShapes() * boost::unit_test::data::make({ DataType::U8, DataType::S16 }) * boost::unit_test::data::make({ ConvertPolicy::SATURATE, ConvertPolicy::WRAP }), @@ -181,7 +180,7 @@ BOOST_DATA_TEST_CASE(RunLarge, LargeShapes() * boost::unit_test::data::make({ Da RawTensor ref_dst = Reference::compute_reference_arithmetic_addition(shape, dt, DataType::S16, DataType::S16, policy); // Validate output - validate(NEAccessor(dst), ref_dst); + validate(Accessor(dst), ref_dst); } BOOST_AUTO_TEST_SUITE_END() @@ -198,7 +197,7 @@ BOOST_DATA_TEST_CASE(RunSmall, SmallShapes() * ConvertPolicies() * boost::unit_t RawTensor ref_dst = Reference::compute_reference_arithmetic_addition(shape, DataType::QS8, DataType::QS8, DataType::QS8, policy, fixed_point_position); // Validate output - validate(NEAccessor(dst), ref_dst); + validate(Accessor(dst), ref_dst); } BOOST_TEST_DECORATOR(*boost::unit_test::label("nightly")) BOOST_DATA_TEST_CASE(RunLarge, LargeShapes() * ConvertPolicies() * boost::unit_test::data::xrange(1, 7), @@ -211,7 +210,7 @@ BOOST_DATA_TEST_CASE(RunLarge, LargeShapes() * ConvertPolicies() * boost::unit_t RawTensor ref_dst = Reference::compute_reference_arithmetic_addition(shape, DataType::QS8, DataType::QS8, DataType::QS8, policy, fixed_point_position); // Validate output - validate(NEAccessor(dst), ref_dst); + validate(Accessor(dst), ref_dst); } BOOST_AUTO_TEST_SUITE_END() @@ -227,7 +226,7 @@ BOOST_DATA_TEST_CASE(RunSmall, SmallShapes() * ConvertPolicies() * boost::unit_t RawTensor ref_dst = Reference::compute_reference_arithmetic_addition(shape, DataType::QS16, DataType::QS16, DataType::QS16, policy, fixed_point_position); // Validate output - validate(NEAccessor(dst), ref_dst); + validate(Accessor(dst), ref_dst); } BOOST_TEST_DECORATOR(*boost::unit_test::label("nightly")) BOOST_DATA_TEST_CASE(RunLarge, LargeShapes() * ConvertPolicies() * boost::unit_test::data::xrange(1, 15), @@ -240,7 +239,7 @@ BOOST_DATA_TEST_CASE(RunLarge, LargeShapes() * ConvertPolicies() * boost::unit_t RawTensor ref_dst = Reference::compute_reference_arithmetic_addition(shape, DataType::QS16, DataType::QS16, DataType::QS16, policy, fixed_point_position); // Validate output - validate(NEAccessor(dst), ref_dst); + validate(Accessor(dst), ref_dst); } BOOST_AUTO_TEST_SUITE_END() BOOST_AUTO_TEST_SUITE_END() @@ -256,7 +255,7 @@ BOOST_DATA_TEST_CASE(RunSmall, SmallShapes(), shape) RawTensor ref_dst = Reference::compute_reference_arithmetic_addition(shape, DataType::F16, DataType::F16, DataType::F16, ConvertPolicy::WRAP); // Validate output - validate(NEAccessor(dst), ref_dst); + validate(Accessor(dst), ref_dst); } BOOST_AUTO_TEST_SUITE_END() #endif /* ARM_COMPUTE_ENABLE_FP16 */ @@ -283,7 +282,7 @@ BOOST_DATA_TEST_CASE(RunSmall, SmallShapes(), shape) RawTensor ref_dst = Reference::compute_reference_arithmetic_addition(shape, DataType::F32, DataType::F32, DataType::F32, ConvertPolicy::WRAP); // Validate output - validate(NEAccessor(dst), ref_dst); + validate(Accessor(dst), ref_dst); } BOOST_TEST_DECORATOR(*boost::unit_test::label("nightly")) BOOST_DATA_TEST_CASE(RunLarge, LargeShapes() * boost::unit_test::data::make({ ConvertPolicy::SATURATE, ConvertPolicy::WRAP }), @@ -296,7 +295,7 @@ BOOST_DATA_TEST_CASE(RunLarge, LargeShapes() * boost::unit_test::data::make({ Co RawTensor ref_dst = Reference::compute_reference_arithmetic_addition(shape, DataType::F32, DataType::F32, DataType::F32, policy); // Validate output - validate(NEAccessor(dst), ref_dst); + validate(Accessor(dst), ref_dst); } BOOST_AUTO_TEST_SUITE_END() diff --git a/tests/validation/NEON/ArithmeticSubtraction.cpp b/tests/validation/NEON/ArithmeticSubtraction.cpp index cc6dbcdbf8..b95bc05d75 100644 --- a/tests/validation/NEON/ArithmeticSubtraction.cpp +++ b/tests/validation/NEON/ArithmeticSubtraction.cpp @@ -23,7 +23,7 @@ */ #include "AssetsLibrary.h" #include "Globals.h" -#include "NEON/NEAccessor.h" +#include "NEON/Accessor.h" #include "PaddingCalculator.h" #include "TypePrinter.h" #include "Utils.h" @@ -44,7 +44,6 @@ using namespace arm_compute; using namespace arm_compute::test; -using namespace arm_compute::test::neon; using namespace arm_compute::test::validation; namespace @@ -81,8 +80,8 @@ Tensor compute_arithmetic_subtraction(const TensorShape &shape, DataType dt_in0, BOOST_TEST(!dst.info()->is_resizable()); // Fill tensors - library->fill_tensor_uniform(NEAccessor(src1), 0); - library->fill_tensor_uniform(NEAccessor(src2), 1); + library->fill_tensor_uniform(Accessor(src1), 0); + library->fill_tensor_uniform(Accessor(src2), 1); // Compute function sub.run(); @@ -141,7 +140,7 @@ BOOST_DATA_TEST_CASE(RunSmall, SmallShapes() * boost::unit_test::data::make({ Co RawTensor ref_dst = Reference::compute_reference_arithmetic_subtraction(shape, DataType::U8, DataType::U8, DataType::U8, policy); // Validate output - validate(NEAccessor(dst), ref_dst); + validate(Accessor(dst), ref_dst); } BOOST_AUTO_TEST_SUITE_END() @@ -168,7 +167,7 @@ BOOST_DATA_TEST_CASE(RunSmall, SmallShapes() * boost::unit_test::data::make({ Da RawTensor ref_dst = Reference::compute_reference_arithmetic_subtraction(shape, dt, DataType::S16, DataType::S16, policy); // Validate output - validate(NEAccessor(dst), ref_dst); + validate(Accessor(dst), ref_dst); } BOOST_TEST_DECORATOR(*boost::unit_test::label("nightly")) BOOST_DATA_TEST_CASE(RunLarge, LargeShapes() * boost::unit_test::data::make({ DataType::U8, DataType::S16 }) * boost::unit_test::data::make({ ConvertPolicy::SATURATE, ConvertPolicy::WRAP }), @@ -181,7 +180,7 @@ BOOST_DATA_TEST_CASE(RunLarge, LargeShapes() * boost::unit_test::data::make({ Da RawTensor ref_dst = Reference::compute_reference_arithmetic_subtraction(shape, dt, DataType::S16, DataType::S16, policy); // Validate output - validate(NEAccessor(dst), ref_dst); + validate(Accessor(dst), ref_dst); } BOOST_AUTO_TEST_SUITE_END() @@ -198,7 +197,7 @@ BOOST_DATA_TEST_CASE(RunSmall, SmallShapes() * ConvertPolicies() * boost::unit_t RawTensor ref_dst = Reference::compute_reference_arithmetic_subtraction(shape, DataType::QS8, DataType::QS8, DataType::QS8, policy, fixed_point_position); // Validate output - validate(NEAccessor(dst), ref_dst); + validate(Accessor(dst), ref_dst); } BOOST_TEST_DECORATOR(*boost::unit_test::label("nightly")) @@ -212,7 +211,7 @@ BOOST_DATA_TEST_CASE(RunLarge, LargeShapes() * ConvertPolicies() * boost::unit_t RawTensor ref_dst = Reference::compute_reference_arithmetic_subtraction(shape, DataType::QS8, DataType::QS8, DataType::QS8, policy, fixed_point_position); // Validate output - validate(NEAccessor(dst), ref_dst); + validate(Accessor(dst), ref_dst); } BOOST_AUTO_TEST_SUITE_END() @@ -228,7 +227,7 @@ BOOST_DATA_TEST_CASE(RunSmall, SmallShapes() * ConvertPolicies() * boost::unit_t RawTensor ref_dst = Reference::compute_reference_arithmetic_subtraction(shape, DataType::QS16, DataType::QS16, DataType::QS16, policy, fixed_point_position); // Validate output - validate(NEAccessor(dst), ref_dst); + validate(Accessor(dst), ref_dst); } BOOST_TEST_DECORATOR(*boost::unit_test::label("nightly")) BOOST_DATA_TEST_CASE(RunLarge, LargeShapes() * ConvertPolicies() * boost::unit_test::data::xrange(1, 15), @@ -241,7 +240,7 @@ BOOST_DATA_TEST_CASE(RunLarge, LargeShapes() * ConvertPolicies() * boost::unit_t RawTensor ref_dst = Reference::compute_reference_arithmetic_subtraction(shape, DataType::QS16, DataType::QS16, DataType::QS16, policy, fixed_point_position); // Validate output - validate(NEAccessor(dst), ref_dst); + validate(Accessor(dst), ref_dst); } BOOST_AUTO_TEST_SUITE_END() BOOST_AUTO_TEST_SUITE_END() @@ -258,7 +257,7 @@ BOOST_DATA_TEST_CASE(RunSmall, SmallShapes(), shape) RawTensor ref_dst = Reference::compute_reference_arithmetic_subtraction(shape, DataType::F16, DataType::F16, DataType::F16, ConvertPolicy::WRAP); // Validate output - validate(NEAccessor(dst), ref_dst); + validate(Accessor(dst), ref_dst); } BOOST_AUTO_TEST_SUITE_END() #endif /* ARM_COMPUTE_ENABLE_FP16 */ @@ -285,7 +284,7 @@ BOOST_DATA_TEST_CASE(RunSmall, SmallShapes(), shape) RawTensor ref_dst = Reference::compute_reference_arithmetic_subtraction(shape, DataType::F32, DataType::F32, DataType::F32, ConvertPolicy::WRAP); // Validate output - validate(NEAccessor(dst), ref_dst); + validate(Accessor(dst), ref_dst); } BOOST_TEST_DECORATOR(*boost::unit_test::label("nightly")) BOOST_DATA_TEST_CASE(RunLarge, LargeShapes() * boost::unit_test::data::make({ ConvertPolicy::SATURATE, ConvertPolicy::WRAP }), @@ -298,7 +297,7 @@ BOOST_DATA_TEST_CASE(RunLarge, LargeShapes() * boost::unit_test::data::make({ Co RawTensor ref_dst = Reference::compute_reference_arithmetic_subtraction(shape, DataType::F32, DataType::F32, DataType::F32, policy); // Validate output - validate(NEAccessor(dst), ref_dst); + validate(Accessor(dst), ref_dst); } BOOST_AUTO_TEST_SUITE_END() diff --git a/tests/validation/NEON/BatchNormalizationLayer.cpp b/tests/validation/NEON/BatchNormalizationLayer.cpp index 9d72996940..279257d071 100644 --- a/tests/validation/NEON/BatchNormalizationLayer.cpp +++ b/tests/validation/NEON/BatchNormalizationLayer.cpp @@ -21,7 +21,7 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -#include "NEON/NEAccessor.h" +#include "NEON/Accessor.h" #include "TypePrinter.h" #include "dataset/BatchNormalizationLayerDataset.h" #include "tests/Globals.h" @@ -37,7 +37,6 @@ using namespace arm_compute; using namespace arm_compute::test; -using namespace arm_compute::test::neon; using namespace arm_compute::test::validation; namespace @@ -91,11 +90,11 @@ Tensor compute_reference_batch_normalization_layer(const TensorShape &shape0, co std::tie(min_bound, max_bound) = get_batchnormalization_layer_test_bounds(); std::uniform_real_distribution<> distribution(min_bound, max_bound); std::uniform_real_distribution<> distribution_var(0, max_bound); - library->fill(NEAccessor(src), distribution, 0); - library->fill(NEAccessor(mean), distribution, 1); - library->fill(NEAccessor(var), distribution_var, 0); - library->fill(NEAccessor(beta), distribution, 3); - library->fill(NEAccessor(gamma), distribution, 4); + library->fill(Accessor(src), distribution, 0); + library->fill(Accessor(mean), distribution, 1); + library->fill(Accessor(var), distribution_var, 0); + library->fill(Accessor(beta), distribution, 3); + library->fill(Accessor(gamma), distribution, 4); } else { @@ -111,11 +110,11 @@ Tensor compute_reference_batch_normalization_layer(const TensorShape &shape0, co } std::uniform_int_distribution<> distribution(min_bound, max_bound); std::uniform_int_distribution<> distribution_var(0, max_bound); - library->fill(NEAccessor(src), distribution, 0); - library->fill(NEAccessor(mean), distribution, 1); - library->fill(NEAccessor(var), distribution_var, 0); - library->fill(NEAccessor(beta), distribution, 3); - library->fill(NEAccessor(gamma), distribution, 4); + library->fill(Accessor(src), distribution, 0); + library->fill(Accessor(mean), distribution, 1); + library->fill(Accessor(var), distribution_var, 0); + library->fill(Accessor(beta), distribution, 3); + library->fill(Accessor(gamma), distribution, 4); } // Compute function @@ -178,7 +177,7 @@ BOOST_DATA_TEST_CASE(Random, RawTensor ref_dst = Reference::compute_reference_batch_normalization_layer(obj.shape0, obj.shape1, dt, obj.epsilon); // Validate output - validate(NEAccessor(dst), ref_dst, tolerance_f, 0); + validate(Accessor(dst), ref_dst, tolerance_f, 0); } BOOST_AUTO_TEST_SUITE_END() @@ -196,7 +195,7 @@ BOOST_DATA_TEST_CASE(Random, RawTensor ref_dst = Reference::compute_reference_batch_normalization_layer(obj.shape0, obj.shape1, dt, obj.epsilon, fixed_point_position); // Validate output - validate(NEAccessor(dst), ref_dst, tolerance_qs8); + validate(Accessor(dst), ref_dst, tolerance_qs8); } BOOST_AUTO_TEST_SUITE_END() @@ -213,7 +212,7 @@ BOOST_DATA_TEST_CASE(Random, RawTensor ref_dst = Reference::compute_reference_batch_normalization_layer(obj.shape0, obj.shape1, dt, obj.epsilon, fixed_point_position); // Validate output - validate(NEAccessor(dst), ref_dst, tolerance_qs16); + validate(Accessor(dst), ref_dst, tolerance_qs16); } BOOST_AUTO_TEST_SUITE_END() BOOST_AUTO_TEST_SUITE_END() diff --git a/tests/validation/NEON/BitwiseAnd.cpp b/tests/validation/NEON/BitwiseAnd.cpp index 9ef6fc18a2..e701b40949 100644 --- a/tests/validation/NEON/BitwiseAnd.cpp +++ b/tests/validation/NEON/BitwiseAnd.cpp @@ -23,7 +23,7 @@ */ #include "AssetsLibrary.h" #include "Globals.h" -#include "NEON/NEAccessor.h" +#include "NEON/Accessor.h" #include "PaddingCalculator.h" #include "TypePrinter.h" #include "Utils.h" @@ -45,7 +45,6 @@ using namespace arm_compute; using namespace arm_compute::test; -using namespace arm_compute::test::neon; using namespace arm_compute::test::validation; namespace @@ -77,8 +76,8 @@ Tensor compute_bitwise_and(const TensorShape &shape) BOOST_TEST(!dst.info()->is_resizable()); // Fill tensors - library->fill_tensor_uniform(NEAccessor(src1), 0); - library->fill_tensor_uniform(NEAccessor(src2), 1); + library->fill_tensor_uniform(Accessor(src1), 0); + library->fill_tensor_uniform(Accessor(src2), 1); // Compute function band.run(); @@ -127,8 +126,8 @@ Tensor compute_bitwise_and_subtensor(const TensorShape &shape) // Fill tensors std::uniform_int_distribution<> distribution(0, 255); - library->fill(NEAccessor(src1), distribution, 0); - library->fill(NEAccessor(src2), distribution, 1); + library->fill(Accessor(src1), distribution, 0); + library->fill(Accessor(src2), distribution, 1); // Compute function band1.run(); @@ -181,7 +180,7 @@ BOOST_DATA_TEST_CASE(RunSmall, SmallShapes(), shape) RawTensor ref_dst = Reference::compute_reference_bitwise_and(shape); // Validate output - validate(NEAccessor(dst), ref_dst); + validate(Accessor(dst), ref_dst); } BOOST_TEST_DECORATOR(*boost::unit_test::label("precommit")) @@ -197,7 +196,7 @@ BOOST_AUTO_TEST_CASE(RunSubTensor) RawTensor ref_dst = Reference::compute_reference_bitwise_and(shape); // Validate output - validate(NEAccessor(dst), ref_dst); + validate(Accessor(dst), ref_dst); } BOOST_TEST_DECORATOR(*boost::unit_test::label("nightly")) @@ -210,7 +209,7 @@ BOOST_DATA_TEST_CASE(RunLarge, LargeShapes(), shape) RawTensor ref_dst = Reference::compute_reference_bitwise_and(shape); // Validate output - validate(NEAccessor(dst), ref_dst); + validate(Accessor(dst), ref_dst); } BOOST_AUTO_TEST_SUITE_END() diff --git a/tests/validation/NEON/BitwiseNot.cpp b/tests/validation/NEON/BitwiseNot.cpp index f04a789e22..a5a4e350a9 100644 --- a/tests/validation/NEON/BitwiseNot.cpp +++ b/tests/validation/NEON/BitwiseNot.cpp @@ -23,7 +23,7 @@ */ #include "AssetsLibrary.h" #include "Globals.h" -#include "NEON/NEAccessor.h" +#include "NEON/Accessor.h" #include "PaddingCalculator.h" #include "TypePrinter.h" #include "Utils.h" @@ -44,7 +44,6 @@ using namespace arm_compute; using namespace arm_compute::test; -using namespace arm_compute::test::neon; using namespace arm_compute::test::validation; namespace @@ -73,7 +72,7 @@ Tensor compute_bitwise_not(const TensorShape &shape) BOOST_TEST(!dst.info()->is_resizable()); // Fill tensors - library->fill_tensor_uniform(NEAccessor(src), 0); + library->fill_tensor_uniform(Accessor(src), 0); // Compute function bnot.run(); @@ -121,7 +120,7 @@ BOOST_DATA_TEST_CASE(RunSmall, SmallShapes(), shape) RawTensor ref_dst = Reference::compute_reference_bitwise_not(shape); // Validate output - validate(NEAccessor(dst), ref_dst); + validate(Accessor(dst), ref_dst); } BOOST_TEST_DECORATOR(*boost::unit_test::label("nightly")) @@ -134,7 +133,7 @@ BOOST_DATA_TEST_CASE(RunLarge, LargeShapes(), shape) RawTensor ref_dst = Reference::compute_reference_bitwise_not(shape); // Validate output - validate(NEAccessor(dst), ref_dst); + validate(Accessor(dst), ref_dst); } BOOST_AUTO_TEST_SUITE_END() diff --git a/tests/validation/NEON/BitwiseOr.cpp b/tests/validation/NEON/BitwiseOr.cpp index 6b97de5112..91f35cbb6f 100644 --- a/tests/validation/NEON/BitwiseOr.cpp +++ b/tests/validation/NEON/BitwiseOr.cpp @@ -23,7 +23,7 @@ */ #include "AssetsLibrary.h" #include "Globals.h" -#include "NEON/NEAccessor.h" +#include "NEON/Accessor.h" #include "PaddingCalculator.h" #include "TypePrinter.h" #include "Utils.h" @@ -44,7 +44,6 @@ using namespace arm_compute; using namespace arm_compute::test; -using namespace arm_compute::test::neon; using namespace arm_compute::test::validation; namespace @@ -76,8 +75,8 @@ Tensor compute_bitwise_or(const TensorShape &shape) BOOST_TEST(!dst.info()->is_resizable()); // Fill tensors - library->fill_tensor_uniform(NEAccessor(src1), 0); - library->fill_tensor_uniform(NEAccessor(src2), 1); + library->fill_tensor_uniform(Accessor(src1), 0); + library->fill_tensor_uniform(Accessor(src2), 1); // Compute function bor.run(); @@ -129,7 +128,7 @@ BOOST_DATA_TEST_CASE(RunSmall, SmallShapes(), shape) RawTensor ref_dst = Reference::compute_reference_bitwise_or(shape); // Validate output - validate(NEAccessor(dst), ref_dst); + validate(Accessor(dst), ref_dst); } BOOST_TEST_DECORATOR(*boost::unit_test::label("nightly")) @@ -142,7 +141,7 @@ BOOST_DATA_TEST_CASE(RunLarge, LargeShapes(), shape) RawTensor ref_dst = Reference::compute_reference_bitwise_or(shape); // Validate output - validate(NEAccessor(dst), ref_dst); + validate(Accessor(dst), ref_dst); } BOOST_AUTO_TEST_SUITE_END() diff --git a/tests/validation/NEON/BitwiseXor.cpp b/tests/validation/NEON/BitwiseXor.cpp index cb2eed1d69..b30fd7aaaa 100644 --- a/tests/validation/NEON/BitwiseXor.cpp +++ b/tests/validation/NEON/BitwiseXor.cpp @@ -23,7 +23,7 @@ */ #include "AssetsLibrary.h" #include "Globals.h" -#include "NEON/NEAccessor.h" +#include "NEON/Accessor.h" #include "PaddingCalculator.h" #include "TypePrinter.h" #include "Utils.h" @@ -44,7 +44,6 @@ using namespace arm_compute; using namespace arm_compute::test; -using namespace arm_compute::test::neon; using namespace arm_compute::test::validation; namespace @@ -76,8 +75,8 @@ Tensor compute_bitwise_xor(const TensorShape &shape) BOOST_TEST(!dst.info()->is_resizable()); // Fill tensors - library->fill_tensor_uniform(NEAccessor(src1), 0); - library->fill_tensor_uniform(NEAccessor(src2), 1); + library->fill_tensor_uniform(Accessor(src1), 0); + library->fill_tensor_uniform(Accessor(src2), 1); // Compute function bxor.run(); @@ -129,7 +128,7 @@ BOOST_DATA_TEST_CASE(RunSmall, SmallShapes(), shape) RawTensor ref_dst = Reference::compute_reference_bitwise_xor(shape); // Validate output - validate(NEAccessor(dst), ref_dst); + validate(Accessor(dst), ref_dst); } BOOST_TEST_DECORATOR(*boost::unit_test::label("nightly")) @@ -142,7 +141,7 @@ BOOST_DATA_TEST_CASE(RunLarge, LargeShapes(), shape) RawTensor ref_dst = Reference::compute_reference_bitwise_xor(shape); // Validate output - validate(NEAccessor(dst), ref_dst); + validate(Accessor(dst), ref_dst); } BOOST_AUTO_TEST_SUITE_END() diff --git a/tests/validation/NEON/Box3x3.cpp b/tests/validation/NEON/Box3x3.cpp index 32fbbd8f2a..579b2c8af1 100644 --- a/tests/validation/NEON/Box3x3.cpp +++ b/tests/validation/NEON/Box3x3.cpp @@ -23,7 +23,7 @@ */ #include "AssetsLibrary.h" #include "Globals.h" -#include "NEON/NEAccessor.h" +#include "NEON/Accessor.h" #include "PaddingCalculator.h" #include "TypePrinter.h" #include "Utils.h" @@ -46,7 +46,6 @@ using namespace arm_compute; using namespace arm_compute::test; -using namespace arm_compute::test::neon; using namespace arm_compute::test::validation; namespace @@ -80,7 +79,7 @@ Tensor compute_box3x3(const TensorShape &shape, BorderMode border_mode, uint8_t BOOST_TEST(!dst.info()->is_resizable()); // Fill tensors - library->fill_tensor_uniform(NEAccessor(src), 0); + library->fill_tensor_uniform(Accessor(src), 0); // Compute function box3x3.run(); @@ -143,7 +142,7 @@ BOOST_DATA_TEST_CASE(RunSmall, SmallShapes() * BorderModes(), shape, border_mode RawTensor ref_dst = Reference::compute_reference_box3x3(shape, border_mode, border_value); // Validate output - validate(NEAccessor(dst), ref_dst, shape_to_valid_region(shape, border_mode == BorderMode::UNDEFINED, border_size)); + validate(Accessor(dst), ref_dst, shape_to_valid_region(shape, border_mode == BorderMode::UNDEFINED, border_size)); } BOOST_TEST_DECORATOR(*boost::unit_test::label("nightly")) @@ -160,7 +159,7 @@ BOOST_DATA_TEST_CASE(RunLarge, LargeShapes() * BorderModes(), shape, border_mode RawTensor ref_dst = Reference::compute_reference_box3x3(shape, border_mode, border_value); // Validate output - validate(NEAccessor(dst), ref_dst, shape_to_valid_region(shape, border_mode == BorderMode::UNDEFINED, border_size)); + validate(Accessor(dst), ref_dst, shape_to_valid_region(shape, border_mode == BorderMode::UNDEFINED, border_size)); } BOOST_AUTO_TEST_SUITE_END() diff --git a/tests/validation/NEON/CMakeLists.txt b/tests/validation/NEON/CMakeLists.txt index ba35249cb6..988e1633f5 100644 --- a/tests/validation/NEON/CMakeLists.txt +++ b/tests/validation/NEON/CMakeLists.txt @@ -23,7 +23,7 @@ cmake_minimum_required (VERSION 3.1) set(arm_compute_test_validation_NEON_SOURCE_FILES ${CMAKE_SOURCE_DIR}/NEON/Helper.h - ${CMAKE_SOURCE_DIR}/NEON/NEAccessor.h + ${CMAKE_SOURCE_DIR}/NEON/Accessor.h ${CMAKE_CURRENT_SOURCE_DIR}/AbsoluteDifference.cpp ${CMAKE_CURRENT_SOURCE_DIR}/Accumulate.cpp ${CMAKE_CURRENT_SOURCE_DIR}/AccumulateSquared.cpp diff --git a/tests/validation/NEON/ConvolutionLayer.cpp b/tests/validation/NEON/ConvolutionLayer.cpp index 1cf630a473..ce96a6b321 100644 --- a/tests/validation/NEON/ConvolutionLayer.cpp +++ b/tests/validation/NEON/ConvolutionLayer.cpp @@ -21,7 +21,7 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -#include "NEON/NEAccessor.h" +#include "NEON/Accessor.h" #include "TypePrinter.h" #include "dataset/ConvolutionLayerDataset.h" #include "tests/Globals.h" @@ -37,7 +37,6 @@ using namespace arm_compute; using namespace arm_compute::test; -using namespace arm_compute::test::neon; using namespace arm_compute::test::validation; namespace @@ -76,15 +75,15 @@ Tensor compute_convolution_layer(const TensorShape &input_shape, const TensorSha if(dt == DataType::F16 || dt == DataType::F32) { std::uniform_real_distribution<> distribution(-1.0f, 1.0f); - library->fill(NEAccessor(src), distribution, 0); - library->fill(NEAccessor(weights), distribution, 1); - library->fill(NEAccessor(bias), distribution, 2); + library->fill(Accessor(src), distribution, 0); + library->fill(Accessor(weights), distribution, 1); + library->fill(Accessor(bias), distribution, 2); } else { - library->fill_tensor_uniform(NEAccessor(src), 0); - library->fill_tensor_uniform(NEAccessor(weights), 1); - library->fill_tensor_uniform(NEAccessor(bias), 2); + library->fill_tensor_uniform(Accessor(src), 0); + library->fill_tensor_uniform(Accessor(weights), 1); + library->fill_tensor_uniform(Accessor(bias), 2); } // Compute NEConvolutionLayer function @@ -148,7 +147,7 @@ BOOST_DATA_TEST_CASE(SmallConvolutionLayer, RawTensor ref_dst = Reference::compute_reference_convolution_layer(conv_set.src_shape, conv_set.weights_shape, conv_set.bias_shape, conv_set.dst_shape, dt, conv_set.info, 0); // Validate output - validate(NEAccessor(dst), ref_dst, tolerance_f16); + validate(Accessor(dst), ref_dst, tolerance_f16); } BOOST_AUTO_TEST_SUITE_END() #endif /* ARM_COMPUTE_ENABLE_FP16 */ @@ -166,7 +165,7 @@ BOOST_DATA_TEST_CASE(SmallConvolutionLayer, RawTensor ref_dst = Reference::compute_reference_convolution_layer(conv_set.src_shape, conv_set.weights_shape, conv_set.bias_shape, conv_set.dst_shape, dt, conv_set.info, 0); // Validate output - validate(NEAccessor(dst), ref_dst, tolerance_f32); + validate(Accessor(dst), ref_dst, tolerance_f32); } BOOST_TEST_DECORATOR(*boost::unit_test::label("nightly")) @@ -181,7 +180,7 @@ BOOST_DATA_TEST_CASE(LargeConvolutionLayer, RawTensor ref_dst = Reference::compute_reference_convolution_layer(conv_set.src_shape, conv_set.weights_shape, conv_set.bias_shape, conv_set.dst_shape, dt, conv_set.info, 0); // Validate output - validate(NEAccessor(dst), ref_dst, tolerance_f32); + validate(Accessor(dst), ref_dst, tolerance_f32); } BOOST_AUTO_TEST_SUITE_END() @@ -198,7 +197,7 @@ BOOST_DATA_TEST_CASE(SmallConvolutionLayer, RawTensor ref_dst = Reference::compute_reference_convolution_layer(conv_set.src_shape, conv_set.weights_shape, conv_set.bias_shape, conv_set.dst_shape, dt, conv_set.info, fixed_point_position); // Validate output - validate(NEAccessor(dst), ref_dst, tolerance_q); + validate(Accessor(dst), ref_dst, tolerance_q); } BOOST_TEST_DECORATOR(*boost::unit_test::label("nightly")) @@ -213,7 +212,7 @@ BOOST_DATA_TEST_CASE(LargeConvolutionLayer, RawTensor ref_dst = Reference::compute_reference_convolution_layer(conv_set.src_shape, conv_set.weights_shape, conv_set.bias_shape, conv_set.dst_shape, dt, conv_set.info, fixed_point_position); // Validate output - validate(NEAccessor(dst), ref_dst, tolerance_q); + validate(Accessor(dst), ref_dst, tolerance_q); } BOOST_AUTO_TEST_SUITE_END() diff --git a/tests/validation/NEON/ConvolutionLayerDirect.cpp b/tests/validation/NEON/ConvolutionLayerDirect.cpp index 7b0f711eee..4949f387f7 100644 --- a/tests/validation/NEON/ConvolutionLayerDirect.cpp +++ b/tests/validation/NEON/ConvolutionLayerDirect.cpp @@ -23,7 +23,7 @@ */ #include "AssetsLibrary.h" #include "Globals.h" -#include "NEON/NEAccessor.h" +#include "NEON/Accessor.h" #include "TypePrinter.h" #include "Utils.h" #include "validation/Datasets.h" @@ -44,7 +44,6 @@ using namespace arm_compute; using namespace arm_compute::test; -using namespace arm_compute::test::neon; using namespace arm_compute::test::validation; namespace @@ -92,15 +91,15 @@ Tensor compute_convolution_layer(const TensorShape &src_shape, const TensorShape if(dt == DataType::F32) { std::uniform_real_distribution<> distribution(-1.f, 1.f); - library->fill(NEAccessor(src), distribution, 0); - library->fill(NEAccessor(weights), distribution, 1); - library->fill(NEAccessor(bias), distribution, 2); + library->fill(Accessor(src), distribution, 0); + library->fill(Accessor(weights), distribution, 1); + library->fill(Accessor(bias), distribution, 2); } else { - library->fill_tensor_uniform(NEAccessor(src), 0); - library->fill_tensor_uniform(NEAccessor(weights), 1); - library->fill_tensor_uniform(NEAccessor(bias), 2); + library->fill_tensor_uniform(Accessor(src), 0); + library->fill_tensor_uniform(Accessor(weights), 1); + library->fill_tensor_uniform(Accessor(bias), 2); } // Compute function @@ -147,7 +146,7 @@ BOOST_DATA_TEST_CASE(W1x1, RawTensor ref = Reference::compute_reference_convolution_layer(input_shape, w_shape, b_shape, d_shape, dt, conv_info, 0); // Validate output - validate(NEAccessor(dst), ref); + validate(Accessor(dst), ref); } BOOST_TEST_DECORATOR(*boost::unit_test::label("precommit")) @@ -167,7 +166,7 @@ BOOST_DATA_TEST_CASE(W3x3, DirectConvolutionShapes() * CNNFloatDataTypes() * boo RawTensor ref = Reference::compute_reference_convolution_layer(input_shape, w_shape, b_shape, d_shape, dt, conv_info, 0); // Validate output - validate(NEAccessor(dst), ref, tolerance_fp); + validate(Accessor(dst), ref, tolerance_fp); } BOOST_AUTO_TEST_SUITE_END() @@ -188,7 +187,7 @@ BOOST_DATA_TEST_CASE(W1x1, RawTensor ref = Reference::compute_reference_convolution_layer(input_shape, w_shape, b_shape, d_shape, DataType::QS8, conv_info, fixed_point_position); // Validate output - validate(NEAccessor(dst), ref); + validate(Accessor(dst), ref); } BOOST_TEST_DECORATOR(*boost::unit_test::label("precommit")) @@ -207,7 +206,7 @@ BOOST_DATA_TEST_CASE(W3x3, DirectConvolutionShapes() * boost::unit_test::data::x RawTensor ref = Reference::compute_reference_convolution_layer(input_shape, w_shape, b_shape, d_shape, DataType::QS8, conv_info, fixed_point_position); // Validate output - validate(NEAccessor(dst), ref, tolerance_qs8); + validate(Accessor(dst), ref, tolerance_qs8); } BOOST_AUTO_TEST_SUITE_END() diff --git a/tests/validation/NEON/DepthConcatenateLayer.cpp b/tests/validation/NEON/DepthConcatenateLayer.cpp index 40c2ada210..528d6f80d7 100644 --- a/tests/validation/NEON/DepthConcatenateLayer.cpp +++ b/tests/validation/NEON/DepthConcatenateLayer.cpp @@ -23,7 +23,7 @@ */ #include "AssetsLibrary.h" #include "Globals.h" -#include "NEON/NEAccessor.h" +#include "NEON/Accessor.h" #include "PaddingCalculator.h" #include "TypePrinter.h" #include "Utils.h" @@ -50,7 +50,6 @@ using namespace arm_compute; using namespace arm_compute::test; -using namespace arm_compute::test::neon; using namespace arm_compute::test::validation; namespace @@ -104,7 +103,7 @@ Tensor compute_depth_concatenate_layer(const std::vector &shapes, D // Fill tensors for(unsigned int i = 0; i < srcs.size(); ++i) { - library->fill_tensor_uniform(NEAccessor(*srcs[i]), i); + library->fill_tensor_uniform(Accessor(*srcs[i]), i); } // Compute function @@ -137,7 +136,7 @@ BOOST_DATA_TEST_CASE(RunSmall, SmallShapes() * CNNFloatDataTypes(), shape, dt) RawTensor ref_dst = Reference::compute_reference_depth_concatenate_layer(shapes, dt); // Validate output - validate(NEAccessor(dst), ref_dst); + validate(Accessor(dst), ref_dst); } BOOST_TEST_DECORATOR(*boost::unit_test::label("precommit")) @@ -153,7 +152,7 @@ BOOST_DATA_TEST_CASE(RunSmallPad, CNNFloatDataTypes(), dt) RawTensor ref_dst = Reference::compute_reference_depth_concatenate_layer(shapes, dt); // Validate output - validate(NEAccessor(dst), ref_dst); + validate(Accessor(dst), ref_dst); } BOOST_AUTO_TEST_SUITE_END() @@ -176,7 +175,7 @@ BOOST_DATA_TEST_CASE(RunSmall, SmallShapes() * CNNFixedPointDataTypes() * boost: RawTensor ref_dst = Reference::compute_reference_depth_concatenate_layer(shapes, dt, fixed_point_position); // Validate output - validate(NEAccessor(dst), ref_dst); + validate(Accessor(dst), ref_dst); } BOOST_TEST_DECORATOR(*boost::unit_test::label("precommit")) @@ -192,7 +191,7 @@ BOOST_DATA_TEST_CASE(RunSmallPad, CNNFixedPointDataTypes() * boost::unit_test::d RawTensor ref_dst = Reference::compute_reference_depth_concatenate_layer(shapes, dt, fixed_point_position); // Validate output - validate(NEAccessor(dst), ref_dst); + validate(Accessor(dst), ref_dst); } BOOST_AUTO_TEST_SUITE_END() diff --git a/tests/validation/NEON/DepthConvert.cpp b/tests/validation/NEON/DepthConvert.cpp index 9588d18cf3..0b7a175f4f 100644 --- a/tests/validation/NEON/DepthConvert.cpp +++ b/tests/validation/NEON/DepthConvert.cpp @@ -23,7 +23,7 @@ */ #include "AssetsLibrary.h" #include "Globals.h" -#include "NEON/NEAccessor.h" +#include "NEON/Accessor.h" #include "PaddingCalculator.h" #include "TypePrinter.h" #include "Utils.h" @@ -44,7 +44,6 @@ using namespace arm_compute; using namespace arm_compute::test; -using namespace arm_compute::test::neon; using namespace arm_compute::test::validation; namespace @@ -80,7 +79,7 @@ Tensor compute_depth_convert(const TensorShape &shape, DataType dt_in, DataType BOOST_TEST(!dst.info()->is_resizable()); // Fill tensors - library->fill_tensor_uniform(NEAccessor(src), 0); + library->fill_tensor_uniform(Accessor(src), 0); // Compute function depth_convert.run(); @@ -151,7 +150,7 @@ BOOST_DATA_TEST_CASE(RunSmall, SmallShapes() * boost::unit_test::data::make({ Co RawTensor ref_dst = Reference::compute_reference_depth_convert(shape, DataType::QS8, DataType::QS8, policy, 0, fixed_point_position_in, fixed_point_position_out); // Validate output - validate(NEAccessor(dst), ref_dst); + validate(Accessor(dst), ref_dst); } BOOST_AUTO_TEST_SUITE_END() @@ -177,7 +176,7 @@ BOOST_DATA_TEST_CASE(RunSmall, SmallShapes() * boost::unit_test::data::make({ Co RawTensor ref_dst = Reference::compute_reference_depth_convert(shape, DataType::QS8, DataType::F32, policy, 0, fixed_point_position, fixed_point_position); // Validate output - validate(NEAccessor(dst), ref_dst); + validate(Accessor(dst), ref_dst); } BOOST_TEST_DECORATOR(*boost::unit_test::label("nightly")) @@ -192,7 +191,7 @@ BOOST_DATA_TEST_CASE(RunLarge, LargeShapes() * boost::unit_test::data::make({ Co RawTensor ref_dst = Reference::compute_reference_depth_convert(shape, DataType::QS8, DataType::F32, policy, 0, fixed_point_position, fixed_point_position); // Validate output - validate(NEAccessor(dst), ref_dst); + validate(Accessor(dst), ref_dst); } BOOST_AUTO_TEST_SUITE_END() @@ -218,7 +217,7 @@ BOOST_DATA_TEST_CASE(RunSmall, SmallShapes() * boost::unit_test::data::make({ Co RawTensor ref_dst = Reference::compute_reference_depth_convert(shape, DataType::F32, DataType::QS8, policy, 0, fixed_point_position, fixed_point_position); // Validate output - validate(NEAccessor(dst), ref_dst); + validate(Accessor(dst), ref_dst); } BOOST_TEST_DECORATOR(*boost::unit_test::label("nightly")) @@ -233,7 +232,7 @@ BOOST_DATA_TEST_CASE(RunLarge, LargeShapes() * boost::unit_test::data::make({ Co RawTensor ref_dst = Reference::compute_reference_depth_convert(shape, DataType::F32, DataType::QS8, policy, 0, fixed_point_position, fixed_point_position); // Validate output - validate(NEAccessor(dst), ref_dst); + validate(Accessor(dst), ref_dst); } BOOST_AUTO_TEST_SUITE_END() @@ -259,7 +258,7 @@ BOOST_DATA_TEST_CASE(RunSmall, SmallShapes() * boost::unit_test::data::make({ Co RawTensor ref_dst = Reference::compute_reference_depth_convert(shape, DataType::QS16, DataType::QS16, policy, 0, fixed_point_position_in, fixed_point_position_out); // Validate output - validate(NEAccessor(dst), ref_dst); + validate(Accessor(dst), ref_dst); } BOOST_AUTO_TEST_SUITE_END() @@ -285,7 +284,7 @@ BOOST_DATA_TEST_CASE(RunSmall, SmallShapes() * boost::unit_test::data::make({ Co RawTensor ref_dst = Reference::compute_reference_depth_convert(shape, DataType::QS16, DataType::F32, policy, 0, fixed_point_position, fixed_point_position); // Validate output - validate(NEAccessor(dst), ref_dst); + validate(Accessor(dst), ref_dst); } BOOST_TEST_DECORATOR(*boost::unit_test::label("nightly")) @@ -300,7 +299,7 @@ BOOST_DATA_TEST_CASE(RunLarge, LargeShapes() * boost::unit_test::data::make({ Co RawTensor ref_dst = Reference::compute_reference_depth_convert(shape, DataType::QS16, DataType::F32, policy, 0, fixed_point_position, fixed_point_position); // Validate output - validate(NEAccessor(dst), ref_dst); + validate(Accessor(dst), ref_dst); } BOOST_AUTO_TEST_SUITE_END() @@ -327,7 +326,7 @@ BOOST_DATA_TEST_CASE(RunSmall, SmallShapes() * boost::unit_test::data::make({ Co RawTensor ref_dst = Reference::compute_reference_depth_convert(shape, DataType::F32, DataType::QS16, policy, 0, fixed_point_position, fixed_point_position); // Validate output - validate(NEAccessor(dst), ref_dst); + validate(Accessor(dst), ref_dst); } BOOST_TEST_DECORATOR(*boost::unit_test::label("nightly")) @@ -342,7 +341,7 @@ BOOST_DATA_TEST_CASE(RunLarge, LargeShapes() * boost::unit_test::data::make({ Co RawTensor ref_dst = Reference::compute_reference_depth_convert(shape, DataType::F32, DataType::QS16, policy, 0, fixed_point_position, fixed_point_position); // Validate output - validate(NEAccessor(dst), ref_dst); + validate(Accessor(dst), ref_dst); } BOOST_AUTO_TEST_SUITE_END() @@ -369,7 +368,7 @@ BOOST_DATA_TEST_CASE(RunSmall, SmallShapes() * boost::unit_test::data::make({ Co RawTensor ref_dst = Reference::compute_reference_depth_convert(shape, DataType::U8, DataType::U16, policy, shift); // Validate output - validate(NEAccessor(dst), ref_dst); + validate(Accessor(dst), ref_dst); } BOOST_TEST_DECORATOR(*boost::unit_test::label("nightly")) BOOST_DATA_TEST_CASE(RunLarge, LargeShapes() * boost::unit_test::data::make({ ConvertPolicy::SATURATE, ConvertPolicy::WRAP }) @@ -383,7 +382,7 @@ BOOST_DATA_TEST_CASE(RunLarge, LargeShapes() * boost::unit_test::data::make({ Co RawTensor ref_dst = Reference::compute_reference_depth_convert(shape, DataType::U8, DataType::U16, policy, shift); // Validate output - validate(NEAccessor(dst), ref_dst); + validate(Accessor(dst), ref_dst); } BOOST_AUTO_TEST_SUITE_END() @@ -409,7 +408,7 @@ BOOST_DATA_TEST_CASE(RunSmall, SmallShapes() * boost::unit_test::data::make({ Co RawTensor ref_dst = Reference::compute_reference_depth_convert(shape, DataType::U8, DataType::S16, policy, shift); // Validate output - validate(NEAccessor(dst), ref_dst); + validate(Accessor(dst), ref_dst); } BOOST_TEST_DECORATOR(*boost::unit_test::label("nightly")) @@ -424,7 +423,7 @@ BOOST_DATA_TEST_CASE(RunLarge, LargeShapes() * boost::unit_test::data::make({ Co RawTensor ref_dst = Reference::compute_reference_depth_convert(shape, DataType::U8, DataType::S16, policy, shift); // Validate output - validate(NEAccessor(dst), ref_dst); + validate(Accessor(dst), ref_dst); } BOOST_AUTO_TEST_SUITE_END() @@ -450,7 +449,7 @@ BOOST_DATA_TEST_CASE(RunSmall, SmallShapes() * boost::unit_test::data::make({ Co RawTensor ref_dst = Reference::compute_reference_depth_convert(shape, DataType::U8, DataType::S32, policy, shift); // Validate output - validate(NEAccessor(dst), ref_dst); + validate(Accessor(dst), ref_dst); } BOOST_TEST_DECORATOR(*boost::unit_test::label("nightly")) @@ -465,7 +464,7 @@ BOOST_DATA_TEST_CASE(RunLarge, LargeShapes() * boost::unit_test::data::make({ Co RawTensor ref_dst = Reference::compute_reference_depth_convert(shape, DataType::U8, DataType::S32, policy, shift); // Validate output - validate(NEAccessor(dst), ref_dst); + validate(Accessor(dst), ref_dst); } BOOST_AUTO_TEST_SUITE_END() @@ -491,7 +490,7 @@ BOOST_DATA_TEST_CASE(RunSmall, SmallShapes() * boost::unit_test::data::make({ Co RawTensor ref_dst = Reference::compute_reference_depth_convert(shape, DataType::U16, DataType::U8, policy, shift); // Validate output - validate(NEAccessor(dst), ref_dst); + validate(Accessor(dst), ref_dst); } BOOST_TEST_DECORATOR(*boost::unit_test::label("nightly")) @@ -506,7 +505,7 @@ BOOST_DATA_TEST_CASE(RunLarge, LargeShapes() * boost::unit_test::data::make({ Co RawTensor ref_dst = Reference::compute_reference_depth_convert(shape, DataType::U16, DataType::U8, policy, shift); // Validate output - validate(NEAccessor(dst), ref_dst); + validate(Accessor(dst), ref_dst); } BOOST_AUTO_TEST_SUITE_END() @@ -532,7 +531,7 @@ BOOST_DATA_TEST_CASE(RunSmall, SmallShapes() * boost::unit_test::data::make({ Co RawTensor ref_dst = Reference::compute_reference_depth_convert(shape, DataType::U16, DataType::U32, policy, shift); // Validate output - validate(NEAccessor(dst), ref_dst); + validate(Accessor(dst), ref_dst); } BOOST_TEST_DECORATOR(*boost::unit_test::label("nightly")) @@ -547,7 +546,7 @@ BOOST_DATA_TEST_CASE(RunLarge, LargeShapes() * boost::unit_test::data::make({ Co RawTensor ref_dst = Reference::compute_reference_depth_convert(shape, DataType::U16, DataType::U32, policy, shift); // Validate output - validate(NEAccessor(dst), ref_dst); + validate(Accessor(dst), ref_dst); } BOOST_AUTO_TEST_SUITE_END() @@ -573,7 +572,7 @@ BOOST_DATA_TEST_CASE(RunSmall, SmallShapes() * boost::unit_test::data::make({ Co RawTensor ref_dst = Reference::compute_reference_depth_convert(shape, DataType::S16, DataType::U8, policy, shift); // Validate output - validate(NEAccessor(dst), ref_dst); + validate(Accessor(dst), ref_dst); } BOOST_TEST_DECORATOR(*boost::unit_test::label("nightly")) @@ -588,7 +587,7 @@ BOOST_DATA_TEST_CASE(RunLarge, LargeShapes() * boost::unit_test::data::make({ Co RawTensor ref_dst = Reference::compute_reference_depth_convert(shape, DataType::S16, DataType::U8, policy, shift); // Validate output - validate(NEAccessor(dst), ref_dst); + validate(Accessor(dst), ref_dst); } BOOST_AUTO_TEST_SUITE_END() @@ -614,7 +613,7 @@ BOOST_DATA_TEST_CASE(RunSmall, SmallShapes() * boost::unit_test::data::make({ Co RawTensor ref_dst = Reference::compute_reference_depth_convert(shape, DataType::S16, DataType::S32, policy, shift); // Validate output - validate(NEAccessor(dst), ref_dst); + validate(Accessor(dst), ref_dst); } BOOST_TEST_DECORATOR(*boost::unit_test::label("nightly")) @@ -629,7 +628,7 @@ BOOST_DATA_TEST_CASE(RunLarge, LargeShapes() * boost::unit_test::data::make({ Co RawTensor ref_dst = Reference::compute_reference_depth_convert(shape, DataType::S16, DataType::S32, policy, shift); // Validate output - validate(NEAccessor(dst), ref_dst); + validate(Accessor(dst), ref_dst); } BOOST_AUTO_TEST_SUITE_END() diff --git a/tests/validation/NEON/FillBorder.cpp b/tests/validation/NEON/FillBorder.cpp index 797098e133..ef2c1ff6f8 100644 --- a/tests/validation/NEON/FillBorder.cpp +++ b/tests/validation/NEON/FillBorder.cpp @@ -23,7 +23,7 @@ */ #include "AssetsLibrary.h" #include "Globals.h" -#include "NEON/NEAccessor.h" +#include "NEON/Accessor.h" #include "TypePrinter.h" #include "Utils.h" #include "validation/Datasets.h" @@ -42,7 +42,6 @@ using namespace arm_compute; using namespace arm_compute::test; -using namespace arm_compute::test::neon; using namespace arm_compute::test::validation; #ifndef DOXYGEN_SKIP_THIS @@ -68,7 +67,7 @@ BOOST_DATA_TEST_CASE(FillBorder, BorderModes() * boost::unit_test::data::make({ // Fill tensor with constant value std::uniform_int_distribution distribution{ tensor_value, tensor_value }; - library->fill(NEAccessor(src), distribution, 0); + library->fill(Accessor(src), distribution, 0); // Create and configure kernel NEFillBorderKernel fill_border; @@ -79,10 +78,10 @@ BOOST_DATA_TEST_CASE(FillBorder, BorderModes() * boost::unit_test::data::make({ // Validate border border_size.limit(padding); - validate(NEAccessor(src), border_size, border_mode, &border_value); + validate(Accessor(src), border_size, border_mode, &border_value); // Validate tensor - validate(NEAccessor(src), &tensor_value); + validate(Accessor(src), &tensor_value); } BOOST_AUTO_TEST_SUITE_END() diff --git a/tests/validation/NEON/Fixedpoint/Exp_QS16.cpp b/tests/validation/NEON/Fixedpoint/Exp_QS16.cpp index fe38a99d95..dc8603c963 100644 --- a/tests/validation/NEON/Fixedpoint/Exp_QS16.cpp +++ b/tests/validation/NEON/Fixedpoint/Exp_QS16.cpp @@ -23,7 +23,7 @@ */ #include "AssetsLibrary.h" #include "Globals.h" -#include "NEON/NEAccessor.h" +#include "NEON/Accessor.h" #include "TypePrinter.h" #include "Utils.h" #include "validation/Datasets.h" @@ -43,7 +43,6 @@ using namespace arm_compute; using namespace arm_compute::test; -using namespace arm_compute::test::neon; using namespace arm_compute::test::validation; namespace @@ -80,7 +79,7 @@ Tensor compute_exp_qs16(const TensorShape &shape, int fixed_point_position) // Fill tensors. Keep the range between [-1.0, 1.0) so the result won't // overflow. std::uniform_int_distribution<> distribution(-(1 << (fixed_point_position - 1)), (1 << (fixed_point_position - 1))); - library->fill(NEAccessor(src), distribution, 0); + library->fill(Accessor(src), distribution, 0); Iterator input(&src, window); Iterator output(&dst, window); @@ -113,7 +112,7 @@ BOOST_DATA_TEST_CASE(RunSmall, Small1DShape() * boost::unit_test::data::xrange(1 RawTensor ref_dst = Reference::compute_reference_fixed_point_operation(shape, DataType::QS16, DataType::QS16, FixedPointOp::EXP, fixed_point_position); // Validate output - validate(NEAccessor(dst), ref_dst, tolerance, 0); + validate(Accessor(dst), ref_dst, tolerance, 0); } BOOST_AUTO_TEST_SUITE_END() diff --git a/tests/validation/NEON/Fixedpoint/Exp_QS8.cpp b/tests/validation/NEON/Fixedpoint/Exp_QS8.cpp index 8955099d81..dae01db41e 100644 --- a/tests/validation/NEON/Fixedpoint/Exp_QS8.cpp +++ b/tests/validation/NEON/Fixedpoint/Exp_QS8.cpp @@ -23,7 +23,7 @@ */ #include "AssetsLibrary.h" #include "Globals.h" -#include "NEON/NEAccessor.h" +#include "NEON/Accessor.h" #include "TypePrinter.h" #include "Utils.h" #include "validation/Datasets.h" @@ -43,7 +43,6 @@ using namespace arm_compute; using namespace arm_compute::test; -using namespace arm_compute::test::neon; using namespace arm_compute::test::validation; namespace @@ -80,7 +79,7 @@ Tensor compute_exp_qs8(const TensorShape &shape, int fixed_point_position) // Fill tensors. Keep the range between [-1.0, 1.0) so the result won't // overflow. E.g. e^7 = 1096, which cannot be represented in QS8 std::uniform_int_distribution<> distribution(-(1 << (fixed_point_position - 1)), (1 << (fixed_point_position - 1))); - library->fill(NEAccessor(src), distribution, 0); + library->fill(Accessor(src), distribution, 0); Iterator input(&src, window); Iterator output(&dst, window); @@ -113,7 +112,7 @@ BOOST_DATA_TEST_CASE(RunSmall, Small1DShape() * boost::unit_test::data::xrange(1 RawTensor ref_dst = Reference::compute_reference_fixed_point_operation(shape, DataType::QS8, DataType::QS8, FixedPointOp::EXP, fixed_point_position); // Validate output - validate(NEAccessor(dst), ref_dst, tolerance, 0); + validate(Accessor(dst), ref_dst, tolerance, 0); } BOOST_AUTO_TEST_SUITE_END() diff --git a/tests/validation/NEON/Fixedpoint/Invsqrt_QS16.cpp b/tests/validation/NEON/Fixedpoint/Invsqrt_QS16.cpp index 1d16ed5dd0..4306a9a8ba 100644 --- a/tests/validation/NEON/Fixedpoint/Invsqrt_QS16.cpp +++ b/tests/validation/NEON/Fixedpoint/Invsqrt_QS16.cpp @@ -23,7 +23,7 @@ */ #include "AssetsLibrary.h" #include "Globals.h" -#include "NEON/NEAccessor.h" +#include "NEON/Accessor.h" #include "TypePrinter.h" #include "Utils.h" #include "validation/Datasets.h" @@ -43,7 +43,6 @@ using namespace arm_compute; using namespace arm_compute::test; -using namespace arm_compute::test::neon; using namespace arm_compute::test::validation; namespace @@ -79,7 +78,7 @@ Tensor compute_invsqrt_qs16(const TensorShape &shape, int fixed_point_position) // Fill tensors. Keep the range between [1, 0x7FFF) std::uniform_int_distribution<> distribution(1, 0x7FFF); - library->fill(NEAccessor(src), distribution, 0); + library->fill(Accessor(src), distribution, 0); Iterator input(&src, window); Iterator output(&dst, window); @@ -113,7 +112,7 @@ BOOST_DATA_TEST_CASE(RunSmall, boost::unit_test::data::xrange(1, 14), fixed_poin RawTensor ref_dst = Reference::compute_reference_fixed_point_operation(shape, DataType::QS16, DataType::QS16, FixedPointOp::INV_SQRT, fixed_point_position); // Validate output - validate(NEAccessor(dst), ref_dst, tolerance, 0); + validate(Accessor(dst), ref_dst, tolerance, 0); } BOOST_AUTO_TEST_SUITE_END() diff --git a/tests/validation/NEON/Fixedpoint/Invsqrt_QS8.cpp b/tests/validation/NEON/Fixedpoint/Invsqrt_QS8.cpp index 69805a0859..1a2acaf34b 100644 --- a/tests/validation/NEON/Fixedpoint/Invsqrt_QS8.cpp +++ b/tests/validation/NEON/Fixedpoint/Invsqrt_QS8.cpp @@ -23,7 +23,7 @@ */ #include "AssetsLibrary.h" #include "Globals.h" -#include "NEON/NEAccessor.h" +#include "NEON/Accessor.h" #include "TypePrinter.h" #include "Utils.h" #include "validation/Datasets.h" @@ -43,7 +43,6 @@ using namespace arm_compute; using namespace arm_compute::test; -using namespace arm_compute::test::neon; using namespace arm_compute::test::validation; namespace @@ -79,7 +78,7 @@ Tensor compute_invsqrt_qs8(const TensorShape &shape, int fixed_point_position) // Fill tensors. Keep the range between [1, 127). std::uniform_int_distribution<> distribution(1, 127); - library->fill(NEAccessor(src), distribution, 0); + library->fill(Accessor(src), distribution, 0); Iterator input(&src, window); Iterator output(&dst, window); @@ -111,7 +110,7 @@ BOOST_DATA_TEST_CASE(Small1DShape, SmallShapes() * boost::unit_test::data::xrang RawTensor ref_dst = Reference::compute_reference_fixed_point_operation(shape, DataType::QS8, DataType::QS8, FixedPointOp::INV_SQRT, fixed_point_position); // Validate output - validate(NEAccessor(dst), ref_dst, tolerance, 0); + validate(Accessor(dst), ref_dst, tolerance, 0); } BOOST_AUTO_TEST_SUITE_END() diff --git a/tests/validation/NEON/Fixedpoint/Log_QS16.cpp b/tests/validation/NEON/Fixedpoint/Log_QS16.cpp index 0b5bc3a7cc..71582d8f96 100644 --- a/tests/validation/NEON/Fixedpoint/Log_QS16.cpp +++ b/tests/validation/NEON/Fixedpoint/Log_QS16.cpp @@ -23,7 +23,7 @@ */ #include "AssetsLibrary.h" #include "Globals.h" -#include "NEON/NEAccessor.h" +#include "NEON/Accessor.h" #include "TypePrinter.h" #include "Utils.h" #include "validation/Datasets.h" @@ -43,7 +43,6 @@ using namespace arm_compute; using namespace arm_compute::test; -using namespace arm_compute::test::neon; using namespace arm_compute::test::validation; namespace @@ -80,7 +79,7 @@ Tensor compute_log_qs16(const TensorShape &shape, int fixed_point_position) // Fill tensors. Keep the range between [(1 << (fixed_point_position - 1), 0x3FFF) so the result won't // overflow. std::uniform_int_distribution<> distribution((1 << (fixed_point_position - 1)), 0x3FFF); - library->fill(NEAccessor(src), distribution, 0); + library->fill(Accessor(src), distribution, 0); Iterator input(&src, window); Iterator output(&dst, window); @@ -112,7 +111,7 @@ BOOST_DATA_TEST_CASE(RunSmall, Small1DShape() * boost::unit_test::data::xrange(4 RawTensor ref_dst = Reference::compute_reference_fixed_point_operation(shape, DataType::QS16, DataType::QS16, FixedPointOp::LOG, fixed_point_position); // Validate output - validate(NEAccessor(dst), ref_dst, tolerance, 0); + validate(Accessor(dst), ref_dst, tolerance, 0); } BOOST_AUTO_TEST_SUITE_END() diff --git a/tests/validation/NEON/Fixedpoint/Log_QS8.cpp b/tests/validation/NEON/Fixedpoint/Log_QS8.cpp index 685d0f1230..cc74d12e10 100644 --- a/tests/validation/NEON/Fixedpoint/Log_QS8.cpp +++ b/tests/validation/NEON/Fixedpoint/Log_QS8.cpp @@ -23,7 +23,7 @@ */ #include "AssetsLibrary.h" #include "Globals.h" -#include "NEON/NEAccessor.h" +#include "NEON/Accessor.h" #include "TypePrinter.h" #include "Utils.h" #include "validation/Datasets.h" @@ -43,7 +43,6 @@ using namespace arm_compute; using namespace arm_compute::test; -using namespace arm_compute::test::neon; using namespace arm_compute::test::validation; namespace @@ -80,7 +79,7 @@ Tensor compute_log_qs8(const TensorShape &shape, int fixed_point_position) // Fill tensors. Keep the range between [(1 << (fixed_point_position - 1), 63) so the result won't // overflow. E.g. for Q2.5 ln(0.001) = -6.9, which cannot be represented. std::uniform_int_distribution<> distribution((1 << (fixed_point_position - 1)), 0x3F); - library->fill(NEAccessor(src), distribution, 0); + library->fill(Accessor(src), distribution, 0); Iterator input(&src, window); Iterator output(&dst, window); @@ -112,7 +111,7 @@ BOOST_DATA_TEST_CASE(RunSmall, Small1DShape() * boost::unit_test::data::xrange(3 RawTensor ref_dst = Reference::compute_reference_fixed_point_operation(shape, DataType::QS8, DataType::QS8, FixedPointOp::LOG, fixed_point_position); // Validate output - validate(NEAccessor(dst), ref_dst, tolerance, 0); + validate(Accessor(dst), ref_dst, tolerance, 0); } BOOST_AUTO_TEST_SUITE_END() diff --git a/tests/validation/NEON/Fixedpoint/Reciprocal_QS16.cpp b/tests/validation/NEON/Fixedpoint/Reciprocal_QS16.cpp index 9b62d3a8cf..2081948d6c 100644 --- a/tests/validation/NEON/Fixedpoint/Reciprocal_QS16.cpp +++ b/tests/validation/NEON/Fixedpoint/Reciprocal_QS16.cpp @@ -23,7 +23,7 @@ */ #include "AssetsLibrary.h" #include "Globals.h" -#include "NEON/NEAccessor.h" +#include "NEON/Accessor.h" #include "TypePrinter.h" #include "Utils.h" #include "validation/Datasets.h" @@ -43,7 +43,6 @@ using namespace arm_compute; using namespace arm_compute::test; -using namespace arm_compute::test::neon; using namespace arm_compute::test::validation; namespace @@ -80,7 +79,7 @@ Tensor compute_reciprocal_qs16(const TensorShape &shape, int fixed_point_positio // Fill tensors. Keep the range between [15, 0x7FFF) so the result won't // overflow. std::uniform_int_distribution<> distribution(15, 0x7FFF); - library->fill(NEAccessor(src), distribution, 0); + library->fill(Accessor(src), distribution, 0); Iterator input(&src, window); Iterator output(&dst, window); @@ -112,7 +111,7 @@ BOOST_DATA_TEST_CASE(RunSmall, Small1DShape() * boost::unit_test::data::xrange(1 RawTensor ref_dst = Reference::compute_reference_fixed_point_operation(shape, DataType::QS16, DataType::QS16, FixedPointOp::RECIPROCAL, fixed_point_position); // Validate output - validate(NEAccessor(dst), ref_dst, tolerance, 0); + validate(Accessor(dst), ref_dst, tolerance, 0); } BOOST_AUTO_TEST_SUITE_END() diff --git a/tests/validation/NEON/Fixedpoint/Reciprocal_QS8.cpp b/tests/validation/NEON/Fixedpoint/Reciprocal_QS8.cpp index 527ce722ea..4b808ce3e0 100644 --- a/tests/validation/NEON/Fixedpoint/Reciprocal_QS8.cpp +++ b/tests/validation/NEON/Fixedpoint/Reciprocal_QS8.cpp @@ -23,7 +23,7 @@ */ #include "AssetsLibrary.h" #include "Globals.h" -#include "NEON/NEAccessor.h" +#include "NEON/Accessor.h" #include "TypePrinter.h" #include "Utils.h" #include "validation/Datasets.h" @@ -43,7 +43,6 @@ using namespace arm_compute; using namespace arm_compute::test; -using namespace arm_compute::test::neon; using namespace arm_compute::test::validation; namespace @@ -80,7 +79,7 @@ Tensor compute_reciprocal_qs8(const TensorShape &shape, int fixed_point_position // Fill tensors. Keep the range between [15, 100) so the result won't // overflow. E.g. for Q2.5 reciprocal(0.001) = 1000, which cannot be represented. std::uniform_int_distribution<> distribution(15, 0x7F); - library->fill(NEAccessor(src), distribution, 0); + library->fill(Accessor(src), distribution, 0); Iterator input(&src, window); Iterator output(&dst, window); @@ -112,7 +111,7 @@ BOOST_DATA_TEST_CASE(RunSmall, Small1DShape() * boost::unit_test::data::xrange(1 RawTensor ref_dst = Reference::compute_reference_fixed_point_operation(shape, DataType::QS8, DataType::QS8, FixedPointOp::RECIPROCAL, fixed_point_position); // Validate output - validate(NEAccessor(dst), ref_dst, tolerance, 0); + validate(Accessor(dst), ref_dst, tolerance, 0); } BOOST_AUTO_TEST_SUITE_END() diff --git a/tests/validation/NEON/FullyConnectedLayer.cpp b/tests/validation/NEON/FullyConnectedLayer.cpp index fa962787d1..22572ecbf8 100644 --- a/tests/validation/NEON/FullyConnectedLayer.cpp +++ b/tests/validation/NEON/FullyConnectedLayer.cpp @@ -21,7 +21,7 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -#include "NEON/NEAccessor.h" +#include "NEON/Accessor.h" #include "TypePrinter.h" #include "dataset/FullyConnectedLayerDataset.h" #include "tests/Globals.h" @@ -38,7 +38,6 @@ using namespace arm_compute; using namespace arm_compute::test; -using namespace arm_compute::test::neon; using namespace arm_compute::test::validation; namespace @@ -88,15 +87,15 @@ Tensor compute_fully_connected_layer(const TensorShape &input_shape, const Tenso if(dt == DataType::F16 || dt == DataType::F32) { std::uniform_real_distribution<> distribution(-1.0f, 1.0f); - library->fill(NEAccessor(src), distribution, 0); - library->fill(NEAccessor(weights), distribution, 1); - library->fill(NEAccessor(bias), distribution, 2); + library->fill(Accessor(src), distribution, 0); + library->fill(Accessor(weights), distribution, 1); + library->fill(Accessor(bias), distribution, 2); } else { - library->fill_tensor_uniform(NEAccessor(src), 0); - library->fill_tensor_uniform(NEAccessor(weights), 1); - library->fill_tensor_uniform(NEAccessor(bias), 2); + library->fill_tensor_uniform(Accessor(src), 0); + library->fill_tensor_uniform(Accessor(weights), 1); + library->fill_tensor_uniform(Accessor(bias), 2); } // Compute NEFullyConnectedLayer function @@ -170,7 +169,7 @@ BOOST_DATA_TEST_CASE(RunSmall, RawTensor ref_dst = Reference::compute_reference_fully_connected_layer(fc_set.src_shape, fc_set.weights_shape, fc_set.bias_shape, fc_set.dst_shape, dt, fc_set.transpose_weights, 0); // Validate output - validate(NEAccessor(dst), ref_dst, tolerance_f16); + validate(Accessor(dst), ref_dst, tolerance_f16); } BOOST_AUTO_TEST_SUITE_END() #endif /* ARM_COMPUTE_ENABLE_FP16 */ @@ -188,7 +187,7 @@ BOOST_DATA_TEST_CASE(RunSmall, RawTensor ref_dst = Reference::compute_reference_fully_connected_layer(fc_set.src_shape, fc_set.weights_shape, fc_set.bias_shape, fc_set.dst_shape, dt, fc_set.transpose_weights, 0); // Validate output - validate(NEAccessor(dst), ref_dst, tolerance_f32); + validate(Accessor(dst), ref_dst, tolerance_f32); } BOOST_TEST_DECORATOR(*boost::unit_test::label("nightly")) @@ -203,7 +202,7 @@ BOOST_DATA_TEST_CASE(RunLarge, RawTensor ref_dst = Reference::compute_reference_fully_connected_layer(fc_set.src_shape, fc_set.weights_shape, fc_set.bias_shape, fc_set.dst_shape, dt, fc_set.transpose_weights, 0); // Validate output - validate(NEAccessor(dst), ref_dst, tolerance_f32); + validate(Accessor(dst), ref_dst, tolerance_f32); } BOOST_AUTO_TEST_SUITE_END() @@ -220,7 +219,7 @@ BOOST_DATA_TEST_CASE(RunSmall, RawTensor ref_dst = Reference::compute_reference_fully_connected_layer(fc_set.src_shape, fc_set.weights_shape, fc_set.bias_shape, fc_set.dst_shape, dt, fc_set.transpose_weights, fixed_point_position); // Validate output - validate(NEAccessor(dst), ref_dst, tolerance_q); + validate(Accessor(dst), ref_dst, tolerance_q); } BOOST_TEST_DECORATOR(*boost::unit_test::label("nightly")) @@ -235,7 +234,7 @@ BOOST_DATA_TEST_CASE(RunLarge, RawTensor ref_dst = Reference::compute_reference_fully_connected_layer(fc_set.src_shape, fc_set.weights_shape, fc_set.bias_shape, fc_set.dst_shape, dt, fc_set.transpose_weights, fixed_point_position); // Validate output - validate(NEAccessor(dst), ref_dst, tolerance_q); + validate(Accessor(dst), ref_dst, tolerance_q); } BOOST_AUTO_TEST_SUITE_END() diff --git a/tests/validation/NEON/GEMM.cpp b/tests/validation/NEON/GEMM.cpp index b7b6bf46f6..8747f0ab72 100644 --- a/tests/validation/NEON/GEMM.cpp +++ b/tests/validation/NEON/GEMM.cpp @@ -23,7 +23,7 @@ */ #include "AssetsLibrary.h" #include "Globals.h" -#include "NEON/NEAccessor.h" +#include "NEON/Accessor.h" #include "TypePrinter.h" #include "Utils.h" #include "dataset/GEMMDataset.h" @@ -44,7 +44,6 @@ using namespace arm_compute; using namespace arm_compute::test; -using namespace arm_compute::test::neon; using namespace arm_compute::test::validation; namespace @@ -80,15 +79,15 @@ Tensor compute_gemm(const TensorShape &src_shape1, const TensorShape &src_shape2 if(dt == DataType::F16 || dt == DataType::F32) { std::uniform_real_distribution<> distribution(-1.0f, 1.0f); - library->fill(NEAccessor(src1), distribution, 0); - library->fill(NEAccessor(src2), distribution, 1); - library->fill(NEAccessor(src3), distribution, 2); + library->fill(Accessor(src1), distribution, 0); + library->fill(Accessor(src2), distribution, 1); + library->fill(Accessor(src3), distribution, 2); } else { - library->fill_tensor_uniform(NEAccessor(src1), 0); - library->fill_tensor_uniform(NEAccessor(src2), 1); - library->fill_tensor_uniform(NEAccessor(src3), 2); + library->fill_tensor_uniform(Accessor(src1), 0); + library->fill_tensor_uniform(Accessor(src2), 1); + library->fill_tensor_uniform(Accessor(src3), 2); } // Compute function @@ -150,7 +149,7 @@ BOOST_DATA_TEST_CASE(SmallGEMM, SmallGEMMDataset() * boost::unit_test::data::mak Tensor dst = compute_gemm(gemm_set.shape_a, gemm_set.shape_b, gemm_set.shape_c, gemm_set.shape_d, gemm_set.alpha, gemm_set.beta, dt); // Validate output - validate(NEAccessor(dst), ref_dst, tolerance_f32); + validate(Accessor(dst), ref_dst, tolerance_f32); } BOOST_AUTO_TEST_SUITE_END() #endif /* ARM_COMPUTE_ENABLE_FP16 */ @@ -167,7 +166,7 @@ BOOST_DATA_TEST_CASE(SmallGEMM, SmallGEMMDataset() * boost::unit_test::data::mak Tensor dst = compute_gemm(gemm_set.shape_a, gemm_set.shape_b, gemm_set.shape_c, gemm_set.shape_d, gemm_set.alpha, gemm_set.beta, dt); // Validate output - validate(NEAccessor(dst), ref_dst, tolerance_f32); + validate(Accessor(dst), ref_dst, tolerance_f32); } BOOST_TEST_DECORATOR(*boost::unit_test::label("nightly")) @@ -181,7 +180,7 @@ BOOST_DATA_TEST_CASE(LargeGEMM, LargeGEMMDataset() * boost::unit_test::data::mak Tensor dst = compute_gemm(gemm_set.shape_a, gemm_set.shape_b, gemm_set.shape_c, gemm_set.shape_d, gemm_set.alpha, gemm_set.beta, dt); // Validate output - validate(NEAccessor(dst), ref_dst, tolerance_f32); + validate(Accessor(dst), ref_dst, tolerance_f32); } BOOST_AUTO_TEST_SUITE_END() @@ -197,7 +196,7 @@ BOOST_DATA_TEST_CASE(SmallGEMM, SmallGEMMDataset() * boost::unit_test::data::mak Tensor dst = compute_gemm(gemm_set.shape_a, gemm_set.shape_b, gemm_set.shape_c, gemm_set.shape_d, gemm_set.alpha, gemm_set.beta, dt, fixed_point_position); // Validate output - validate(NEAccessor(dst), ref_dst, tolerance_q); + validate(Accessor(dst), ref_dst, tolerance_q); } BOOST_TEST_DECORATOR(*boost::unit_test::label("nightly")) @@ -211,7 +210,7 @@ BOOST_DATA_TEST_CASE(LargeGEMM, LargeGEMMDataset() * boost::unit_test::data::mak Tensor dst = compute_gemm(gemm_set.shape_a, gemm_set.shape_b, gemm_set.shape_c, gemm_set.shape_d, gemm_set.alpha, gemm_set.beta, dt, fixed_point_position); // Validate output - validate(NEAccessor(dst), ref_dst, tolerance_q); + validate(Accessor(dst), ref_dst, tolerance_q); } BOOST_AUTO_TEST_SUITE_END() diff --git a/tests/validation/NEON/Gaussian3x3.cpp b/tests/validation/NEON/Gaussian3x3.cpp index b17d572761..b7f9150283 100644 --- a/tests/validation/NEON/Gaussian3x3.cpp +++ b/tests/validation/NEON/Gaussian3x3.cpp @@ -23,7 +23,7 @@ */ #include "AssetsLibrary.h" #include "Globals.h" -#include "NEON/NEAccessor.h" +#include "NEON/Accessor.h" #include "PaddingCalculator.h" #include "TypePrinter.h" #include "Utils.h" @@ -46,7 +46,6 @@ using namespace arm_compute; using namespace arm_compute::test; -using namespace arm_compute::test::neon; using namespace arm_compute::test::validation; namespace @@ -80,7 +79,7 @@ Tensor compute_gaussian3x3(const TensorShape &shape, BorderMode border_mode, uin BOOST_TEST(!dst.info()->is_resizable()); // Fill tensors - library->fill_tensor_uniform(NEAccessor(src), 0); + library->fill_tensor_uniform(Accessor(src), 0); // Compute function gaussian3x3.run(); @@ -143,7 +142,7 @@ BOOST_DATA_TEST_CASE(RunSmall, SmallShapes() * BorderModes(), shape, border_mode RawTensor ref_dst = Reference::compute_reference_gaussian3x3(shape, border_mode, border_value); // Validate output - validate(NEAccessor(dst), ref_dst, shape_to_valid_region(shape, border_mode == BorderMode::UNDEFINED, border_size)); + validate(Accessor(dst), ref_dst, shape_to_valid_region(shape, border_mode == BorderMode::UNDEFINED, border_size)); } BOOST_TEST_DECORATOR(*boost::unit_test::label("nightly")) @@ -160,7 +159,7 @@ BOOST_DATA_TEST_CASE(RunLarge, LargeShapes() * BorderModes(), shape, border_mode RawTensor ref_dst = Reference::compute_reference_gaussian3x3(shape, border_mode, border_value); // Validate output - validate(NEAccessor(dst), ref_dst, shape_to_valid_region(shape, border_mode == BorderMode::UNDEFINED, border_size)); + validate(Accessor(dst), ref_dst, shape_to_valid_region(shape, border_mode == BorderMode::UNDEFINED, border_size)); } BOOST_AUTO_TEST_SUITE_END() diff --git a/tests/validation/NEON/Gaussian5x5.cpp b/tests/validation/NEON/Gaussian5x5.cpp index 7a2a52b10f..522ececee9 100644 --- a/tests/validation/NEON/Gaussian5x5.cpp +++ b/tests/validation/NEON/Gaussian5x5.cpp @@ -23,7 +23,7 @@ */ #include "AssetsLibrary.h" #include "Globals.h" -#include "NEON/NEAccessor.h" +#include "NEON/Accessor.h" #include "PaddingCalculator.h" #include "TypePrinter.h" #include "Utils.h" @@ -48,7 +48,6 @@ using namespace arm_compute; using namespace arm_compute::test; -using namespace arm_compute::test::neon; using namespace arm_compute::test::validation; namespace @@ -82,7 +81,7 @@ Tensor compute_gaussian5x5(const TensorShape &shape, BorderMode border_mode, uin BOOST_TEST(!dst.info()->is_resizable()); // Fill tensors - library->fill_tensor_uniform(NEAccessor(src), 0); + library->fill_tensor_uniform(Accessor(src), 0); // Compute function gaussian5x5.run(); @@ -145,7 +144,7 @@ BOOST_DATA_TEST_CASE(RunSmall, SmallShapes() * BorderModes(), shape, border_mode RawTensor ref_dst = Reference::compute_reference_gaussian5x5(shape, border_mode, border_value); // Validate output - validate(NEAccessor(dst), ref_dst, shape_to_valid_region(shape, border_mode == BorderMode::UNDEFINED, border_size)); + validate(Accessor(dst), ref_dst, shape_to_valid_region(shape, border_mode == BorderMode::UNDEFINED, border_size)); } BOOST_TEST_DECORATOR(*boost::unit_test::label("nightly")) @@ -162,7 +161,7 @@ BOOST_DATA_TEST_CASE(RunLarge, LargeShapes() * BorderModes(), shape, border_mode RawTensor ref_dst = Reference::compute_reference_gaussian5x5(shape, border_mode, border_value); // Validate output - validate(NEAccessor(dst), ref_dst, shape_to_valid_region(shape, border_mode == BorderMode::UNDEFINED, border_size)); + validate(Accessor(dst), ref_dst, shape_to_valid_region(shape, border_mode == BorderMode::UNDEFINED, border_size)); } BOOST_AUTO_TEST_SUITE_END() diff --git a/tests/validation/NEON/IntegralImage.cpp b/tests/validation/NEON/IntegralImage.cpp index f03d37b77d..d5ad33e2a5 100644 --- a/tests/validation/NEON/IntegralImage.cpp +++ b/tests/validation/NEON/IntegralImage.cpp @@ -24,7 +24,7 @@ #include "AssetsLibrary.h" #include "Globals.h" -#include "NEON/NEAccessor.h" +#include "NEON/Accessor.h" #include "PaddingCalculator.h" #include "TypePrinter.h" #include "Utils.h" @@ -45,7 +45,6 @@ using namespace arm_compute; using namespace arm_compute::test; -using namespace arm_compute::test::neon; using namespace arm_compute::test::validation; namespace @@ -74,7 +73,7 @@ Tensor compute_integral_image(const TensorShape &shape) BOOST_TEST(!dst.info()->is_resizable()); // Fill tensors - library->fill_tensor_uniform(NEAccessor(src), 0); + library->fill_tensor_uniform(Accessor(src), 0); // Compute function integral_image.run(); @@ -124,7 +123,7 @@ BOOST_DATA_TEST_CASE(RunSmall, SmallShapes(), shape) RawTensor ref_dst = Reference::compute_reference_integral_image(shape); // Validate output - validate(NEAccessor(dst), ref_dst); + validate(Accessor(dst), ref_dst); } BOOST_TEST_DECORATOR(*boost::unit_test::label("nightly")) @@ -137,7 +136,7 @@ BOOST_DATA_TEST_CASE(RunLarge, LargeShapes(), shape) RawTensor ref_dst = Reference::compute_reference_integral_image(shape); // Validate output - validate(NEAccessor(dst), ref_dst); + validate(Accessor(dst), ref_dst); } BOOST_AUTO_TEST_SUITE_END() diff --git a/tests/validation/NEON/MeanStdDev.cpp b/tests/validation/NEON/MeanStdDev.cpp index c42ca46cb7..5fcd81ec95 100644 --- a/tests/validation/NEON/MeanStdDev.cpp +++ b/tests/validation/NEON/MeanStdDev.cpp @@ -23,7 +23,7 @@ */ #include "AssetsLibrary.h" #include "Globals.h" -#include "NEON/NEAccessor.h" +#include "NEON/Accessor.h" #include "PaddingCalculator.h" #include "TypePrinter.h" #include "Utils.h" @@ -44,7 +44,6 @@ using namespace arm_compute; using namespace arm_compute::test; -using namespace arm_compute::test::neon; using namespace arm_compute::test::validation; namespace @@ -74,7 +73,7 @@ std::pair compute_mean_and_standard_deviation(const TensorShape &s BOOST_TEST(!src.info()->is_resizable()); // Fill tensor - library->fill_tensor_uniform(NEAccessor(src), 0); + library->fill_tensor_uniform(Accessor(src), 0); // Compute function mean_std_dev_image.run(); diff --git a/tests/validation/NEON/MinMaxLocation.cpp b/tests/validation/NEON/MinMaxLocation.cpp index 11e96e3ff9..b1fa8cd7a9 100644 --- a/tests/validation/NEON/MinMaxLocation.cpp +++ b/tests/validation/NEON/MinMaxLocation.cpp @@ -24,8 +24,8 @@ #include "AssetsLibrary.h" #include "Globals.h" +#include "NEON/Accessor.h" #include "NEON/Helper.h" -#include "NEON/NEAccessor.h" #include "PaddingCalculator.h" #include "TypePrinter.h" #include "Utils.h" @@ -46,7 +46,6 @@ using namespace arm_compute; using namespace arm_compute::test; -using namespace arm_compute::test::neon; using namespace arm_compute::test::validation; namespace @@ -82,7 +81,7 @@ void compute_min_max_location(const TensorShape &shape, DataType dt_in, int32_t BOOST_TEST(!src.info()->is_resizable()); // Fill tensors - library->fill_tensor_uniform(NEAccessor(src), 0); + library->fill_tensor_uniform(Accessor(src), 0); // Compute function min_max_loc.run(); diff --git a/tests/validation/NEON/NonLinearFilter.cpp b/tests/validation/NEON/NonLinearFilter.cpp index 4666cdf31b..ff0a8e71f2 100644 --- a/tests/validation/NEON/NonLinearFilter.cpp +++ b/tests/validation/NEON/NonLinearFilter.cpp @@ -23,7 +23,7 @@ */ #include "AssetsLibrary.h" #include "Globals.h" -#include "NEON/NEAccessor.h" +#include "NEON/Accessor.h" #include "PaddingCalculator.h" #include "TypePrinter.h" #include "Utils.h" @@ -46,7 +46,6 @@ using namespace arm_compute; using namespace arm_compute::test; -using namespace arm_compute::test::neon; using namespace arm_compute::test::validation; namespace @@ -83,7 +82,7 @@ Tensor compute_non_linear_filter(const TensorShape &shape, NonLinearFilterFuncti BOOST_TEST(!dst.info()->is_resizable()); // Fill tensors - library->fill_tensor_uniform(NEAccessor(src), 0); + library->fill_tensor_uniform(Accessor(src), 0); // Compute function filter.run(); @@ -169,7 +168,7 @@ BOOST_DATA_TEST_CASE(RunSmall, SmallShapes() const ValidRegion valid_region = shape_to_valid_region(shape, border_mode == BorderMode::UNDEFINED, BorderSize(static_cast(mask_size / 2))); // Validate output - validate(NEAccessor(dst), ref_dst, valid_region); + validate(Accessor(dst), ref_dst, valid_region); } BOOST_TEST_DECORATOR(*boost::unit_test::label("nightly")) @@ -196,7 +195,7 @@ BOOST_DATA_TEST_CASE(RunLarge, LargeShapes() const ValidRegion valid_region = shape_to_valid_region(shape, border_mode == BorderMode::UNDEFINED, BorderSize(static_cast(mask_size / 2))); // Validate output - validate(NEAccessor(dst), ref_dst, valid_region); + validate(Accessor(dst), ref_dst, valid_region); } BOOST_AUTO_TEST_SUITE_END() diff --git a/tests/validation/NEON/NormalizationLayer.cpp b/tests/validation/NEON/NormalizationLayer.cpp index 60c2646b77..8a5db369d1 100644 --- a/tests/validation/NEON/NormalizationLayer.cpp +++ b/tests/validation/NEON/NormalizationLayer.cpp @@ -21,7 +21,7 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -#include "NEON/NEAccessor.h" +#include "NEON/Accessor.h" #include "TypePrinter.h" #include "tests/Globals.h" #include "tests/Utils.h" @@ -35,7 +35,6 @@ using namespace arm_compute; using namespace arm_compute::test; -using namespace arm_compute::test::neon; using namespace arm_compute::test::validation; namespace @@ -92,11 +91,11 @@ Tensor compute_normalization_layer(const TensorShape &shape, DataType dt, Normal { const int8_t one_fixed_point = 1 << fixed_point_position; const int8_t minus_one_fixed_point = -one_fixed_point; - library->fill_tensor_uniform(NEAccessor(src), 0, minus_one_fixed_point, one_fixed_point); + library->fill_tensor_uniform(Accessor(src), 0, minus_one_fixed_point, one_fixed_point); } else { - library->fill_tensor_uniform(NEAccessor(src), 0); + library->fill_tensor_uniform(Accessor(src), 0); } // Compute function @@ -127,7 +126,7 @@ BOOST_DATA_TEST_CASE(RunSmall, RawTensor ref_dst = Reference::compute_reference_normalization_layer(shape, dt, norm_info); // Validate output - validate(NEAccessor(dst), ref_dst, normalization_layer_tolerance(DataType::F16)); + validate(Accessor(dst), ref_dst, normalization_layer_tolerance(DataType::F16)); } BOOST_AUTO_TEST_SUITE_END() @@ -149,7 +148,7 @@ BOOST_DATA_TEST_CASE(RunSmall, RawTensor ref_dst = Reference::compute_reference_normalization_layer(shape, dt, norm_info); // Validate output - validate(NEAccessor(dst), ref_dst, normalization_layer_tolerance(DataType::F32)); + validate(Accessor(dst), ref_dst, normalization_layer_tolerance(DataType::F32)); } BOOST_AUTO_TEST_SUITE_END() @@ -169,7 +168,7 @@ BOOST_DATA_TEST_CASE(RunSmall, RawTensor ref_dst = Reference::compute_reference_normalization_layer(shape, dt, norm_info, fixed_point_position); // Validate output - validate(NEAccessor(dst), ref_dst, normalization_layer_tolerance(DataType::QS8)); + validate(Accessor(dst), ref_dst, normalization_layer_tolerance(DataType::QS8)); } BOOST_AUTO_TEST_SUITE_END() diff --git a/tests/validation/NEON/PixelWiseMultiplication.cpp b/tests/validation/NEON/PixelWiseMultiplication.cpp index 5cff90c112..c46ad6a9d7 100644 --- a/tests/validation/NEON/PixelWiseMultiplication.cpp +++ b/tests/validation/NEON/PixelWiseMultiplication.cpp @@ -23,7 +23,7 @@ */ #include "AssetsLibrary.h" #include "Globals.h" -#include "NEON/NEAccessor.h" +#include "NEON/Accessor.h" #include "PaddingCalculator.h" #include "TypePrinter.h" #include "Utils.h" @@ -44,7 +44,6 @@ using namespace arm_compute; using namespace arm_compute::test; -using namespace arm_compute::test::neon; using namespace arm_compute::test::validation; namespace @@ -84,8 +83,8 @@ Tensor compute_pixel_wise_multiplication(const TensorShape &shape, DataType dt_i BOOST_TEST(!dst.info()->is_resizable()); // Fill tensors - library->fill_tensor_uniform(NEAccessor(src1), 0); - library->fill_tensor_uniform(NEAccessor(src2), 1); + library->fill_tensor_uniform(Accessor(src1), 0); + library->fill_tensor_uniform(Accessor(src2), 1); // Compute function multiply.run(); @@ -150,7 +149,7 @@ BOOST_DATA_TEST_CASE(RunSmall, SmallShapes() * (1.f / 255.f) * ConvertPolicies() // Validate output // Allow tolerance value of 1.f to counteract imprecision due to 32-bit float conversion - validate(NEAccessor(dst), ref_dst, 1.f, 0.f, std::numeric_limits::max()); + validate(Accessor(dst), ref_dst, 1.f, 0.f, std::numeric_limits::max()); } BOOST_TEST_DECORATOR(*boost::unit_test::label("nightly")) BOOST_DATA_TEST_CASE(RunLarge, LargeShapes() * (1.f / 255.f) * ConvertPolicies() * RoundingPolicy::TO_NEAREST_UP, @@ -166,7 +165,7 @@ BOOST_DATA_TEST_CASE(RunLarge, LargeShapes() * (1.f / 255.f) * ConvertPolicies() // Validate output // Allow tolerance value of 1.f to counteract imprecision due to 32-bit float conversion - validate(NEAccessor(dst), ref_dst, 1.f, 0.f, std::numeric_limits::max()); + validate(Accessor(dst), ref_dst, 1.f, 0.f, std::numeric_limits::max()); } BOOST_AUTO_TEST_SUITE_END() @@ -199,7 +198,7 @@ BOOST_DATA_TEST_CASE(RunSmall, SmallShapes() * boost::unit_test::data::make({ 1. DataType::U8, scale, convert_policy, rounding_policy); // Validate output - validate(NEAccessor(dst), ref_dst); + validate(Accessor(dst), ref_dst); } BOOST_TEST_DECORATOR(*boost::unit_test::label("nightly")) BOOST_DATA_TEST_CASE(RunLarge, LargeShapes() * boost::unit_test::data::make({ 1.f, 1.f / 32768.f }) * ConvertPolicies() @@ -215,7 +214,7 @@ BOOST_DATA_TEST_CASE(RunLarge, LargeShapes() * boost::unit_test::data::make({ 1. DataType::U8, scale, convert_policy, rounding_policy); // Validate output - validate(NEAccessor(dst), ref_dst); + validate(Accessor(dst), ref_dst); } BOOST_AUTO_TEST_SUITE_END() BOOST_AUTO_TEST_SUITE_END() @@ -247,7 +246,7 @@ BOOST_DATA_TEST_CASE(RunSmall, SmallShapes() * boost::unit_test::data::make({ Da // Validate output // Allow tolerance value of 2.f to counteract imprecision due to 32-bit float conversion - validate(NEAccessor(dst), ref_dst, 2.f, 0.f, std::numeric_limits::max()); + validate(Accessor(dst), ref_dst, 2.f, 0.f, std::numeric_limits::max()); } BOOST_TEST_DECORATOR(*boost::unit_test::label("nightly")) BOOST_DATA_TEST_CASE(RunLarge, LargeShapes() * boost::unit_test::data::make({ DataType::U8, DataType::S16 }) * (1.f / 255.f) * ConvertPolicies() @@ -263,7 +262,7 @@ BOOST_DATA_TEST_CASE(RunLarge, LargeShapes() * boost::unit_test::data::make({ Da // Validate output // Allow tolerance value of 2.f to counteract imprecision due to 32-bit float conversion - validate(NEAccessor(dst), ref_dst, 2.f, 0.f, std::numeric_limits::max()); + validate(Accessor(dst), ref_dst, 2.f, 0.f, std::numeric_limits::max()); } BOOST_AUTO_TEST_SUITE_END() @@ -293,7 +292,7 @@ BOOST_DATA_TEST_CASE(RunSmall, SmallShapes() * boost::unit_test::data::make({ Da RawTensor ref_dst = Reference::compute_reference_pixel_wise_multiplication(shape, dt, DataType::S16, DataType::S16, scale, convert_policy, rounding_policy); // Validate output - validate(NEAccessor(dst), ref_dst); + validate(Accessor(dst), ref_dst); } BOOST_TEST_DECORATOR(*boost::unit_test::label("nightly")) BOOST_DATA_TEST_CASE(RunLarge, LargeShapes() * boost::unit_test::data::make({ DataType::U8, DataType::S16 }) * boost::unit_test::data::make({ 1.f, 1.f / 32768.f }) * ConvertPolicies() @@ -308,7 +307,7 @@ BOOST_DATA_TEST_CASE(RunLarge, LargeShapes() * boost::unit_test::data::make({ Da scale, convert_policy, rounding_policy); // Validate output - validate(NEAccessor(dst), ref_dst); + validate(Accessor(dst), ref_dst); } BOOST_AUTO_TEST_SUITE_END() BOOST_AUTO_TEST_SUITE_END() @@ -328,7 +327,7 @@ BOOST_DATA_TEST_CASE(RunSmall, SmallShapes() * (1.f / 255.f) * ConvertPolicies() // Validate output // Allow tolerance value of 1.f to counteract imprecision due to 32-bit float conversion - validate(NEAccessor(dst), ref_dst, 1.f, 0.f, std::numeric_limits::max()); + validate(Accessor(dst), ref_dst, 1.f, 0.f, std::numeric_limits::max()); } BOOST_AUTO_TEST_SUITE_END() @@ -361,7 +360,7 @@ BOOST_DATA_TEST_CASE(RunSmall, SmallShapes() * (1.f / 255.f) * ConvertPolicies() // Validate output // Allow tolerance value of 1.f to counteract imprecision due to 32-bit float conversion - validate(NEAccessor(dst), ref_dst, 1.f, 0.f, std::numeric_limits::max()); + validate(Accessor(dst), ref_dst, 1.f, 0.f, std::numeric_limits::max()); } BOOST_TEST_DECORATOR(*boost::unit_test::label("nightly")) BOOST_DATA_TEST_CASE(RunLarge, LargeShapes() * (1.f / 255.f) * ConvertPolicies() @@ -377,7 +376,7 @@ BOOST_DATA_TEST_CASE(RunLarge, LargeShapes() * (1.f / 255.f) * ConvertPolicies() // Validate output // Allow tolerance value of 1.f to counteract imprecision due to 32-bit float conversion - validate(NEAccessor(dst), ref_dst, 1.f, 0.f, std::numeric_limits::max()); + validate(Accessor(dst), ref_dst, 1.f, 0.f, std::numeric_limits::max()); } BOOST_AUTO_TEST_SUITE_END() @@ -407,7 +406,7 @@ BOOST_DATA_TEST_CASE(RunSmall, SmallShapes() * boost::unit_test::data::make({ 1. RawTensor ref_dst = Reference::compute_reference_pixel_wise_multiplication(shape, DataType::F32, DataType::F32, DataType::F32, scale, convert_policy, rounding_policy); // Validate output - validate(NEAccessor(dst), ref_dst); + validate(Accessor(dst), ref_dst); } BOOST_TEST_DECORATOR(*boost::unit_test::label("nightly")) BOOST_DATA_TEST_CASE(RunLarge, LargeShapes() * boost::unit_test::data::make({ 1.f, 1.f / 32768.f }) * ConvertPolicies() @@ -422,7 +421,7 @@ BOOST_DATA_TEST_CASE(RunLarge, LargeShapes() * boost::unit_test::data::make({ 1. scale, convert_policy, rounding_policy); // Validate output - validate(NEAccessor(dst), ref_dst); + validate(Accessor(dst), ref_dst); } BOOST_AUTO_TEST_SUITE_END() BOOST_AUTO_TEST_SUITE_END() @@ -440,7 +439,7 @@ BOOST_DATA_TEST_CASE(RunSmall, SmallShapes() * DataType::QS8 *ConvertPolicies() RawTensor ref_dst = Reference::compute_reference_fixed_point_pixel_wise_multiplication(shape, dt, dt, dt, 1.f, fixed_point_position, convert_policy, rounding_policy); // Validate output - validate(NEAccessor(dst), ref_dst); + validate(Accessor(dst), ref_dst); } BOOST_TEST_DECORATOR(*boost::unit_test::label("nightly")) @@ -454,7 +453,7 @@ BOOST_DATA_TEST_CASE(RunLarge, LargeShapes() * DataType::QS8 *ConvertPolicies() RawTensor ref_dst = Reference::compute_reference_pixel_wise_multiplication(shape, dt, dt, dt, 1.f, convert_policy, rounding_policy); // Validate output - validate(NEAccessor(dst), ref_dst); + validate(Accessor(dst), ref_dst); } BOOST_AUTO_TEST_SUITE_END() @@ -470,7 +469,7 @@ BOOST_DATA_TEST_CASE(RunSmall, SmallShapes() * DataType::QS16 *ConvertPolicies() RawTensor ref_dst = Reference::compute_reference_fixed_point_pixel_wise_multiplication(shape, dt, dt, dt, 1.f, fixed_point_position, convert_policy, rounding_policy); // Validate output - validate(NEAccessor(dst), ref_dst); + validate(Accessor(dst), ref_dst); } BOOST_TEST_DECORATOR(*boost::unit_test::label("nightly")) @@ -484,7 +483,7 @@ BOOST_DATA_TEST_CASE(RunLarge, LargeShapes() * DataType::QS16 *ConvertPolicies() RawTensor ref_dst = Reference::compute_reference_pixel_wise_multiplication(shape, dt, dt, dt, 1.f, convert_policy, rounding_policy); // Validate output - validate(NEAccessor(dst), ref_dst); + validate(Accessor(dst), ref_dst); } BOOST_AUTO_TEST_SUITE_END() BOOST_AUTO_TEST_SUITE_END() diff --git a/tests/validation/NEON/PoolingLayer.cpp b/tests/validation/NEON/PoolingLayer.cpp index 925c1ea7c1..9d6c8824ca 100644 --- a/tests/validation/NEON/PoolingLayer.cpp +++ b/tests/validation/NEON/PoolingLayer.cpp @@ -21,7 +21,7 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -#include "NEON/NEAccessor.h" +#include "NEON/Accessor.h" #include "TypePrinter.h" #include "arm_compute/runtime/NEON/functions/NEPoolingLayer.h" #include "tests/Globals.h" @@ -35,7 +35,6 @@ using namespace arm_compute; using namespace arm_compute::test; -using namespace arm_compute::test::neon; using namespace arm_compute::test::validation; namespace @@ -85,7 +84,7 @@ Tensor compute_pooling_layer(const TensorShape &shape_in, const TensorShape &sha ARM_COMPUTE_ERROR("DataType not supported."); } std::uniform_real_distribution<> distribution(min, max); - library->fill(NEAccessor(src), distribution, 0); + library->fill(Accessor(src), distribution, 0); // Compute function pool.run(); @@ -124,7 +123,7 @@ BOOST_DATA_TEST_CASE(RandomDataset, RawTensor ref_dst = Reference::compute_reference_pooling_layer(obj.src_shape, obj.dst_shape, dt, obj.info); // Validate output - validate(NEAccessor(dst), ref_dst, tolerance_f, 0); + validate(Accessor(dst), ref_dst, tolerance_f, 0); } BOOST_DATA_TEST_CASE(RunSmall7x7, @@ -141,7 +140,7 @@ BOOST_DATA_TEST_CASE(RunSmall7x7, RawTensor ref_dst = Reference::compute_reference_pooling_layer(src_shape, dst_shape, dt, pool_info); // Validate output - validate(NEAccessor(dst), ref_dst, tolerance_f, 0); + validate(Accessor(dst), ref_dst, tolerance_f, 0); } BOOST_AUTO_TEST_SUITE_END() @@ -158,7 +157,7 @@ BOOST_DATA_TEST_CASE(RandomDataset, RawTensor ref_dst = Reference::compute_reference_pooling_layer(obj.src_shape, obj.dst_shape, dt, obj.info, fixed_point_position); // Validate output - validate(NEAccessor(dst), ref_dst, tolerance_q, 0); + validate(Accessor(dst), ref_dst, tolerance_q, 0); } BOOST_AUTO_TEST_SUITE_END() diff --git a/tests/validation/NEON/ROIPoolingLayer.cpp b/tests/validation/NEON/ROIPoolingLayer.cpp index cc8c873cc9..5775db7e03 100644 --- a/tests/validation/NEON/ROIPoolingLayer.cpp +++ b/tests/validation/NEON/ROIPoolingLayer.cpp @@ -21,8 +21,8 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ +#include "NEON/Accessor.h" #include "NEON/Helper.h" -#include "NEON/NEAccessor.h" #include "TypePrinter.h" #include "arm_compute/runtime/NEON/functions/NEROIPoolingLayer.h" #include "tests/Globals.h" @@ -38,7 +38,6 @@ using namespace arm_compute; using namespace arm_compute::test; -using namespace arm_compute::test::neon; using namespace arm_compute::test::validation; namespace @@ -69,7 +68,7 @@ Tensor compute_roi_pooling_layer(const TensorShape &shape, DataType dt, const st // Fill tensors std::uniform_real_distribution<> distribution(-1, 1); - library->fill(NEAccessor(src), distribution, 0); + library->fill(Accessor(src), distribution, 0); // Compute function roi_pool.run(); @@ -100,7 +99,7 @@ BOOST_DATA_TEST_CASE(RunSmall, CNNFloatDataTypes() * boost::unit_test::data::mak RawTensor ref_dst = Reference::compute_reference_roi_pooling_layer(shape, dt, rois, pool_info); // Validate output - validate(NEAccessor(dst), ref_dst); + validate(Accessor(dst), ref_dst); } BOOST_AUTO_TEST_SUITE_END() diff --git a/tests/validation/NEON/Sobel3x3.cpp b/tests/validation/NEON/Sobel3x3.cpp index d7f3fec452..74a3144de4 100644 --- a/tests/validation/NEON/Sobel3x3.cpp +++ b/tests/validation/NEON/Sobel3x3.cpp @@ -21,10 +21,9 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ - #include "AssetsLibrary.h" #include "Globals.h" -#include "NEON/NEAccessor.h" +#include "NEON/Accessor.h" #include "TypePrinter.h" #include "Utils.h" #include "validation/Datasets.h" @@ -46,7 +45,6 @@ using namespace arm_compute; using namespace arm_compute::test; -using namespace arm_compute::test::neon; using namespace arm_compute::test::validation; namespace @@ -87,7 +85,7 @@ std::pair compute_sobel_3x3(const TensorShape &shape, BorderMode BOOST_TEST(!dst_y.info()->is_resizable()); // Fill tensors - library->fill_tensor_uniform(NEAccessor(src), 0); + library->fill_tensor_uniform(Accessor(src), 0); // Compute function sobel_3x3.run(); @@ -169,8 +167,8 @@ BOOST_DATA_TEST_CASE(RunSmall, SmallShapes() * BorderModes(), shape, border_mode const ValidRegion valid_region = shape_to_valid_region(shape, border_mode == BorderMode::UNDEFINED, border_size); // Validate output - validate(NEAccessor(dst.first), ref_dst.first, valid_region); - validate(NEAccessor(dst.second), ref_dst.second, valid_region); + validate(Accessor(dst.first), ref_dst.first, valid_region); + validate(Accessor(dst.second), ref_dst.second, valid_region); } BOOST_TEST_DECORATOR(*boost::unit_test::label("nightly")) @@ -196,8 +194,8 @@ BOOST_DATA_TEST_CASE(RunLarge, LargeShapes() * BorderModes(), shape, border_mode const ValidRegion valid_region = shape_to_valid_region(shape, border_mode == BorderMode::UNDEFINED, border_size); // Validate output - validate(NEAccessor(dst.first), ref_dst.first, valid_region); - validate(NEAccessor(dst.second), ref_dst.second, valid_region); + validate(Accessor(dst.first), ref_dst.first, valid_region); + validate(Accessor(dst.second), ref_dst.second, valid_region); } BOOST_AUTO_TEST_SUITE_END() diff --git a/tests/validation/NEON/Sobel5x5.cpp b/tests/validation/NEON/Sobel5x5.cpp index e3ef8316cf..d4d48f6afa 100644 --- a/tests/validation/NEON/Sobel5x5.cpp +++ b/tests/validation/NEON/Sobel5x5.cpp @@ -24,7 +24,7 @@ #include "AssetsLibrary.h" #include "Globals.h" -#include "NEON/NEAccessor.h" +#include "NEON/Accessor.h" #include "PaddingCalculator.h" #include "TypePrinter.h" #include "Utils.h" @@ -46,7 +46,6 @@ using namespace arm_compute; using namespace arm_compute::test; -using namespace arm_compute::test::neon; using namespace arm_compute::test::validation; namespace @@ -87,7 +86,7 @@ std::pair compute_sobel_5x5(const TensorShape &shape, BorderMode BOOST_TEST(!dst_y.info()->is_resizable()); // Fill tensors - library->fill_tensor_uniform(NEAccessor(src), 0); + library->fill_tensor_uniform(Accessor(src), 0); // Compute function sobel_5x5.run(); @@ -169,8 +168,8 @@ BOOST_DATA_TEST_CASE(RunSmall, SmallShapes() * BorderModes(), shape, border_mode const ValidRegion valid_region = shape_to_valid_region(shape, border_mode == BorderMode::UNDEFINED, border_size); // Validate output - validate(NEAccessor(dst.first), ref_dst.first, valid_region); - validate(NEAccessor(dst.second), ref_dst.second, valid_region); + validate(Accessor(dst.first), ref_dst.first, valid_region); + validate(Accessor(dst.second), ref_dst.second, valid_region); } BOOST_TEST_DECORATOR(*boost::unit_test::label("nightly")) @@ -196,8 +195,8 @@ BOOST_DATA_TEST_CASE(RunLarge, LargeShapes() * BorderModes(), shape, border_mode const ValidRegion valid_region = shape_to_valid_region(shape, border_mode == BorderMode::UNDEFINED, border_size); // Validate output - validate(NEAccessor(dst.first), ref_dst.first, valid_region); - validate(NEAccessor(dst.second), ref_dst.second, valid_region); + validate(Accessor(dst.first), ref_dst.first, valid_region); + validate(Accessor(dst.second), ref_dst.second, valid_region); } BOOST_AUTO_TEST_SUITE_END() diff --git a/tests/validation/NEON/SoftmaxLayer.cpp b/tests/validation/NEON/SoftmaxLayer.cpp index 020efc0419..92ca673f17 100644 --- a/tests/validation/NEON/SoftmaxLayer.cpp +++ b/tests/validation/NEON/SoftmaxLayer.cpp @@ -23,7 +23,7 @@ */ #include "AssetsLibrary.h" #include "Globals.h" -#include "NEON/NEAccessor.h" +#include "NEON/Accessor.h" #include "PaddingCalculator.h" #include "TypePrinter.h" #include "Utils.h" @@ -44,7 +44,6 @@ using namespace arm_compute; using namespace arm_compute::test; -using namespace arm_compute::test::neon; using namespace arm_compute::test::validation; namespace @@ -83,13 +82,13 @@ Tensor compute_softmax_layer(const TensorShape &shape, DataType dt, int fixed_po if(arm_compute::is_data_type_float(dt)) { std::uniform_real_distribution<> distribution(-1000.f, 1000.f); - library->fill(NEAccessor(src), distribution, 0); + library->fill(Accessor(src), distribution, 0); } else { int one_fixed = 1 << fixed_point_position; std::uniform_int_distribution<> distribution(-one_fixed, one_fixed); - library->fill(NEAccessor(src), distribution, 0); + library->fill(Accessor(src), distribution, 0); } // Compute function @@ -143,7 +142,7 @@ BOOST_DATA_TEST_CASE(RunSmall, SmallShapes() * CNNFloatDataTypes(), shape, dt) RawTensor ref_dst = Reference::compute_reference_softmax_layer(shape, dt); // Validate output - validate(NEAccessor(dst), ref_dst, tolerance); + validate(Accessor(dst), ref_dst, tolerance); } BOOST_TEST_DECORATOR(*boost::unit_test::label("nightly")) @@ -156,7 +155,7 @@ BOOST_DATA_TEST_CASE(RunLarge, LargeShapes() * CNNFloatDataTypes(), shape, dt) RawTensor ref_dst = Reference::compute_reference_softmax_layer(shape, dt); // Validate output - validate(NEAccessor(dst), ref_dst, tolerance); + validate(Accessor(dst), ref_dst, tolerance); } BOOST_AUTO_TEST_SUITE_END() @@ -174,7 +173,7 @@ BOOST_DATA_TEST_CASE(RunSmall, SmallShapes() * boost::unit_test::data::xrange(1, RawTensor ref_dst = Reference::compute_reference_softmax_layer(shape, DataType::QS8, fixed_point_position); // Validate output - validate(NEAccessor(dst), ref_dst, tolerance_fixed_point); + validate(Accessor(dst), ref_dst, tolerance_fixed_point); } BOOST_TEST_DECORATOR(*boost::unit_test::label("nightly")) @@ -188,7 +187,7 @@ BOOST_DATA_TEST_CASE(RunLarge, LargeShapes() * boost::unit_test::data::xrange(1, RawTensor ref_dst = Reference::compute_reference_softmax_layer(shape, DataType::QS8, fixed_point_position); // Validate output - validate(NEAccessor(dst), ref_dst, tolerance_fixed_point); + validate(Accessor(dst), ref_dst, tolerance_fixed_point); } BOOST_AUTO_TEST_SUITE_END() @@ -205,7 +204,7 @@ BOOST_DATA_TEST_CASE(RunSmall, SmallShapes() * boost::unit_test::data::xrange(1, RawTensor ref_dst = Reference::compute_reference_softmax_layer(shape, DataType::QS16, fixed_point_position); // Validate output - validate(NEAccessor(dst), ref_dst, tolerance_fixed_point); + validate(Accessor(dst), ref_dst, tolerance_fixed_point); } BOOST_TEST_DECORATOR(*boost::unit_test::label("nightly")) @@ -219,7 +218,7 @@ BOOST_DATA_TEST_CASE(RunLarge, LargeShapes() * boost::unit_test::data::xrange(1, RawTensor ref_dst = Reference::compute_reference_softmax_layer(shape, DataType::QS16, fixed_point_position); // Validate output - validate(NEAccessor(dst), ref_dst, tolerance_fixed_point); + validate(Accessor(dst), ref_dst, tolerance_fixed_point); } BOOST_AUTO_TEST_SUITE_END() BOOST_AUTO_TEST_SUITE_END() diff --git a/tests/validation/NEON/TableLookup.cpp b/tests/validation/NEON/TableLookup.cpp index 862e13a8b6..70b767eb16 100644 --- a/tests/validation/NEON/TableLookup.cpp +++ b/tests/validation/NEON/TableLookup.cpp @@ -23,9 +23,9 @@ */ #include "AssetsLibrary.h" #include "Globals.h" +#include "NEON/Accessor.h" #include "NEON/Helper.h" -#include "NEON/NEAccessor.h" -#include "NEON/NELutAccessor.h" +#include "NEON/LutAccessor.h" #include "PaddingCalculator.h" #include "RawLutAccessor.h" #include "TypePrinter.h" @@ -48,7 +48,6 @@ using namespace arm_compute; using namespace arm_compute::test; -using namespace arm_compute::test::neon; using namespace arm_compute::test::validation; namespace @@ -79,7 +78,7 @@ Tensor compute_table_lookup(const TensorShape &shape, DataType data_type, Lut &l BOOST_TEST(!dst.info()->is_resizable()); // Fill tensors - library->fill_tensor_uniform(NEAccessor(src), 0); + library->fill_tensor_uniform(Accessor(src), 0); // Compute function table_lookup.run(); @@ -102,11 +101,11 @@ BOOST_DATA_TEST_CASE(Configuration, (SmallShapes() + LargeShapes()) * boost::uni if(data_type == DataType::U8) { - fill_lookuptable(NELutAccessor(lut)); + fill_lookuptable(LutAccessor(lut)); } else { - fill_lookuptable(NELutAccessor(lut)); + fill_lookuptable(LutAccessor(lut)); } // Create tensors @@ -146,7 +145,7 @@ BOOST_DATA_TEST_CASE(RunSmall, std::map rawlut; //Fill the Lut - fill_lookuptable(NELutAccessor(lut)); + fill_lookuptable(LutAccessor(lut)); fill_lookuptable(RawLutAccessor(rawlut)); // Compute function @@ -156,7 +155,7 @@ BOOST_DATA_TEST_CASE(RunSmall, RawTensor ref_dst = Reference::compute_reference_table_lookup(shape, data_type, rawlut); // Validate output - validate(NEAccessor(dst), ref_dst); + validate(Accessor(dst), ref_dst); } else { @@ -164,7 +163,7 @@ BOOST_DATA_TEST_CASE(RunSmall, std::map rawlut; //Fill the Lut - fill_lookuptable(NELutAccessor(lut)); + fill_lookuptable(LutAccessor(lut)); fill_lookuptable(RawLutAccessor(rawlut)); // Compute function @@ -174,7 +173,7 @@ BOOST_DATA_TEST_CASE(RunSmall, RawTensor ref_dst = Reference::compute_reference_table_lookup(shape, data_type, rawlut); // Validate output - validate(NEAccessor(dst), ref_dst); + validate(Accessor(dst), ref_dst); } } @@ -193,7 +192,7 @@ BOOST_DATA_TEST_CASE(RunLarge, std::map rawlut; //Fill the Lut - fill_lookuptable(NELutAccessor(lut)); + fill_lookuptable(LutAccessor(lut)); fill_lookuptable(RawLutAccessor(rawlut)); // Compute function @@ -203,7 +202,7 @@ BOOST_DATA_TEST_CASE(RunLarge, RawTensor ref_dst = Reference::compute_reference_table_lookup(shape, data_type, rawlut); // Validate output - validate(NEAccessor(dst), ref_dst); + validate(Accessor(dst), ref_dst); } else { @@ -211,7 +210,7 @@ BOOST_DATA_TEST_CASE(RunLarge, std::map rawlut; //Fill the Lut - fill_lookuptable(NELutAccessor(lut)); + fill_lookuptable(LutAccessor(lut)); fill_lookuptable(RawLutAccessor(rawlut)); // Compute function @@ -221,7 +220,7 @@ BOOST_DATA_TEST_CASE(RunLarge, RawTensor ref_dst = Reference::compute_reference_table_lookup(shape, data_type, rawlut); // Validate output - validate(NEAccessor(dst), ref_dst); + validate(Accessor(dst), ref_dst); } } diff --git a/tests/validation/NEON/Threshold.cpp b/tests/validation/NEON/Threshold.cpp index e5305eec6e..f5382d4bfa 100644 --- a/tests/validation/NEON/Threshold.cpp +++ b/tests/validation/NEON/Threshold.cpp @@ -23,7 +23,7 @@ */ #include "AssetsLibrary.h" #include "Globals.h" -#include "NEON/NEAccessor.h" +#include "NEON/Accessor.h" #include "PaddingCalculator.h" #include "TypePrinter.h" #include "Utils.h" @@ -45,7 +45,6 @@ using namespace arm_compute; using namespace arm_compute::test; -using namespace arm_compute::test::neon; using namespace arm_compute::test::validation; namespace @@ -79,7 +78,7 @@ Tensor compute_threshold(const TensorShape &shape, uint8_t threshold, uint8_t fa BOOST_TEST(!dst.info()->is_resizable()); // Fill tensors - library->fill_tensor_uniform(NEAccessor(src1), 0); + library->fill_tensor_uniform(Accessor(src1), 0); // Compute function thrsh.run(); @@ -131,7 +130,7 @@ BOOST_DATA_TEST_CASE(RunSmall, RawTensor ref_dst = Reference::compute_reference_threshold(shape, thrshConf.threshold, thrshConf.false_value, thrshConf.true_value, thrshConf.type, thrshConf.upper); // Validate output - validate(NEAccessor(dst), ref_dst); + validate(Accessor(dst), ref_dst); } BOOST_TEST_DECORATOR(*boost::unit_test::label("nightly")) @@ -146,7 +145,7 @@ BOOST_DATA_TEST_CASE(RunLarge, RawTensor ref_dst = Reference::compute_reference_threshold(shape, thrshConf.threshold, thrshConf.false_value, thrshConf.true_value, thrshConf.type, thrshConf.upper); // Validate output - validate(NEAccessor(dst), ref_dst); + validate(Accessor(dst), ref_dst); } BOOST_AUTO_TEST_SUITE_END() diff --git a/tests/validation/system_tests/CL/AlexNet.cpp b/tests/validation/system_tests/CL/AlexNet.cpp index 15e16d3272..2b1d31f65f 100644 --- a/tests/validation/system_tests/CL/AlexNet.cpp +++ b/tests/validation/system_tests/CL/AlexNet.cpp @@ -62,7 +62,6 @@ using namespace arm_compute; using namespace arm_compute::test; -using namespace arm_compute::test::cl; using namespace arm_compute::test::validation; namespace diff --git a/tests/validation/system_tests/CL/LeNet5.cpp b/tests/validation/system_tests/CL/LeNet5.cpp index bf3be10e13..4b3d969a1d 100644 --- a/tests/validation/system_tests/CL/LeNet5.cpp +++ b/tests/validation/system_tests/CL/LeNet5.cpp @@ -58,7 +58,6 @@ using namespace arm_compute; using namespace arm_compute::test; -using namespace arm_compute::test::cl; using namespace arm_compute::test::validation; namespace diff --git a/tests/validation/system_tests/NEON/AlexNet.cpp b/tests/validation/system_tests/NEON/AlexNet.cpp index 3a3e983ade..20a612fd64 100644 --- a/tests/validation/system_tests/NEON/AlexNet.cpp +++ b/tests/validation/system_tests/NEON/AlexNet.cpp @@ -45,7 +45,7 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -#include "NEON/NEAccessor.h" +#include "NEON/Accessor.h" #include "validation/Validation.h" #include "arm_compute/runtime/NEON/functions/NEActivationLayer.h" @@ -62,7 +62,6 @@ using namespace arm_compute; using namespace arm_compute::test; -using namespace arm_compute::test::neon; using namespace arm_compute::test::validation; namespace @@ -70,7 +69,7 @@ namespace using NEAlexNetModel = model_objects::AlexNet