diff options
author | Michalis Spyrou <michalis.spyrou@arm.com> | 2017-12-18 14:34:53 +0000 |
---|---|---|
committer | Anthony Barbier <anthony.barbier@arm.com> | 2018-11-02 16:42:33 +0000 |
commit | 6e993b5b8ea9c31ac4856b72d969dce704f82396 (patch) | |
tree | 5b52d6d63e75c29d6880dc58f708dae2e62f92e5 /tests/benchmark/NEON | |
parent | 1d1c0267e72017d40458e38886ff87b2179c4219 (diff) | |
download | ComputeLibrary-6e993b5b8ea9c31ac4856b72d969dce704f82396.tar.gz |
COMPMID-761 Add CL/NEON QuantizationLayer benchmark tests
Change-Id: Ib50687139e6083a7fcc90cbc6d2e78aad9876c2b
Reviewed-on: https://eu-gerrit-1.euhpc.arm.com/113748
Reviewed-by: Pablo Tello <pablo.tello@arm.com>
Tested-by: Jenkins <bsgcomp@arm.com>
Diffstat (limited to 'tests/benchmark/NEON')
-rw-r--r-- | tests/benchmark/NEON/QuantizationLayer.cpp | 56 |
1 files changed, 56 insertions, 0 deletions
diff --git a/tests/benchmark/NEON/QuantizationLayer.cpp b/tests/benchmark/NEON/QuantizationLayer.cpp new file mode 100644 index 0000000000..8db67287d2 --- /dev/null +++ b/tests/benchmark/NEON/QuantizationLayer.cpp @@ -0,0 +1,56 @@ +/* + * 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. + */ +#include "arm_compute/core/Types.h" +#include "arm_compute/runtime/NEON/functions/NEQuantizationLayer.h" +#include "arm_compute/runtime/Tensor.h" +#include "arm_compute/runtime/TensorAllocator.h" +#include "tests/NEON/Accessor.h" +#include "tests/benchmark/fixtures/QuantizationLayerFixture.h" +#include "tests/datasets/ShapeDatasets.h" +#include "tests/framework/Macros.h" +#include "tests/framework/datasets/Datasets.h" +#include "utils/TypePrinter.h" + +namespace arm_compute +{ +namespace test +{ +namespace benchmark +{ +namespace +{ +const auto data_types = framework::dataset::make("DataType", { DataType::F32 }); +} // namespace + +using NEQuantizationLayerFixture = QuantizationLayerFixture<Tensor, NEQuantizationLayer, Accessor>; + +TEST_SUITE(NEON) + +REGISTER_FIXTURE_DATA_TEST_CASE(QuantizationLayer, NEQuantizationLayerFixture, framework::DatasetMode::ALL, + framework::dataset::combine(datasets::Small3DShapes(), data_types)); + +TEST_SUITE_END() +} // namespace benchmark +} // namespace test +} // namespace arm_compute |