aboutsummaryrefslogtreecommitdiff
path: root/tests/validate_examples
diff options
context:
space:
mode:
Diffstat (limited to 'tests/validate_examples')
-rw-r--r--tests/validate_examples/RunExample.cpp3
-rw-r--r--tests/validate_examples/cl_gemm.cpp39
-rw-r--r--tests/validate_examples/graph_validate_utils.h22
3 files changed, 27 insertions, 37 deletions
diff --git a/tests/validate_examples/RunExample.cpp b/tests/validate_examples/RunExample.cpp
index 5066e9663d..36bf587551 100644
--- a/tests/validate_examples/RunExample.cpp
+++ b/tests/validate_examples/RunExample.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2018-2021 Arm Limited.
+ * Copyright (c) 2018-2021, 2023 Arm Limited.
*
* SPDX-License-Identifier: MIT
*
@@ -29,6 +29,7 @@
#include "ValidateExample.h"
#include "arm_compute/runtime/CL/CLHelpers.h"
#include "arm_compute/runtime/Scheduler.h"
+#include "arm_compute/core/Version.h"
#include "tests/AssetsLibrary.h"
#include "tests/Globals.h"
#include "tests/framework/Framework.h"
diff --git a/tests/validate_examples/cl_gemm.cpp b/tests/validate_examples/cl_gemm.cpp
index 717ba77e17..8189b228c2 100644
--- a/tests/validate_examples/cl_gemm.cpp
+++ b/tests/validate_examples/cl_gemm.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2017-2021 Arm Limited.
+ * Copyright (c) 2017-2022 Arm Limited.
*
* SPDX-License-Identifier: MIT
*
@@ -32,20 +32,19 @@
#include "arm_compute/runtime/CL/functions/CLGEMM.h"
#include "arm_compute/runtime/CL/functions/CLGEMMLowpMatrixMultiplyCore.h"
#include "arm_compute/runtime/CL/functions/CLGEMMLowpOutputStage.h"
-#include "src/core/CL/kernels/CLDepthConvertLayerKernel.h"
#include "src/core/CL/kernels/CLFillBorderKernel.h"
-#include "src/core/CL/kernels/CLGEMMLowpMatrixMultiplyNativeKernel.h"
-#include "src/core/CL/kernels/CLGEMMLowpMatrixMultiplyReshapedOnlyRHSKernel.h"
-#include "src/core/CL/kernels/CLGEMMLowpOffsetContributionKernel.h"
-#include "src/core/CL/kernels/CLGEMMLowpOffsetContributionOutputStageKernel.h"
-#include "src/core/CL/kernels/CLGEMMLowpReductionKernel.h"
-#include "src/core/CL/kernels/CLGEMMMatrixMultiplyKernel.h"
-#include "src/core/CL/kernels/CLGEMMMatrixMultiplyReshapedKernel.h"
-#include "src/core/CL/kernels/CLGEMMMatrixMultiplyReshapedOnlyRHSKernel.h"
-#include "src/core/CL/kernels/CLGEMMReshapeLHSMatrixKernel.h"
-#include "src/core/CL/kernels/CLGEMMReshapeRHSMatrixKernel.h"
-#include "src/core/CL/kernels/CLIm2ColKernel.h"
-#include "src/core/CL/kernels/CLWeightsReshapeKernel.h"
+#include "src/gpu/cl/kernels/ClCastKernel.h"
+#include "src/gpu/cl/kernels/ClGemmLowpMatrixMultiplyNativeKernel.h"
+#include "src/gpu/cl/kernels/ClGemmLowpMatrixMultiplyReshapedOnlyRhsKernel.h"
+#include "src/gpu/cl/kernels/ClGemmLowpOffsetContributionKernel.h"
+#include "src/gpu/cl/kernels/ClGemmLowpOffsetContributionOutputStageKernel.h"
+#include "src/gpu/cl/kernels/ClGemmLowpReductionKernel.h"
+#include "src/gpu/cl/kernels/ClGemmMatrixMultiplyReshapedKernel.h"
+#include "src/gpu/cl/kernels/ClGemmMatrixMultiplyReshapedOnlyRhsKernel.h"
+#include "src/gpu/cl/kernels/ClGemmReshapeLhsMatrixKernel.h"
+#include "src/gpu/cl/kernels/ClGemmReshapeRhsMatrixKernel.h"
+#include "src/gpu/cl/kernels/ClIm2ColKernel.h"
+#include "src/gpu/cl/kernels/ClWeightsReshapeKernel.h"
#include "tests/AssetsLibrary.h"
#include "tests/CL/CLAccessor.h"
#include "tests/Globals.h"
@@ -205,7 +204,11 @@ public:
mm_gemmlowp.configure(&src0, &src1, nullptr, &tmp_dst);
// Configure GEMMlowp output stage
- mm_gemmlowp_output_stage.configure(&tmp_dst, add_bias ? &biases : nullptr, &dst, dst_multiplier, dst_shift, offset_dst);
+ GEMMLowpOutputStageInfo gemm_info{};
+ gemm_info.gemmlowp_multiplier = dst_multiplier;
+ gemm_info.gemmlowp_shift = dst_shift;
+ gemm_info.gemmlowp_offset = offset_dst;
+ mm_gemmlowp_output_stage.configure(&tmp_dst, add_bias ? &biases : nullptr, &dst, gemm_info);
tmp_dst.allocator()->allocate();
biases.allocator()->allocate();
fill(CLAccessor(biases), 3);
@@ -393,9 +396,9 @@ private:
CLTensor src0{}, src1{}, src2{}, dst{};
CLTensor tmp_dst{}, biases{};
- CLGEMM mm_gemm{};
- CLGEMMLowpMatrixMultiplyCore mm_gemmlowp{};
- CLGEMMLowpQuantizeDownInt32ToUint8ScaleByFixedPoint mm_gemmlowp_output_stage{};
+ CLGEMM mm_gemm{};
+ CLGEMMLowpMatrixMultiplyCore mm_gemmlowp{};
+ CLGEMMLowpOutputStage mm_gemmlowp_output_stage{};
size_t M{ 7 }, N{ 3 }, K{ 5 }, B{ 1 };
DataType data_type{ DataType::F32 };
diff --git a/tests/validate_examples/graph_validate_utils.h b/tests/validate_examples/graph_validate_utils.h
index 0921fbfdef..c1a83d1f40 100644
--- a/tests/validate_examples/graph_validate_utils.h
+++ b/tests/validate_examples/graph_validate_utils.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2019-2020 Arm Limited.
+ * Copyright (c) 2019-2020, 2023 Arm Limited.
*
* SPDX-License-Identifier: MIT
*
@@ -22,8 +22,8 @@
* SOFTWARE.
*/
-#ifndef GRAPH_VALIDATE_UTILS_H
-#define GRAPH_VALIDATE_UTILS_H
+#ifndef ACL_TESTS_VALIDATE_EXAMPLES_GRAPH_VALIDATE_UTILS_H
+#define ACL_TESTS_VALIDATE_EXAMPLES_GRAPH_VALIDATE_UTILS_H
#include "arm_compute/graph.h"
@@ -287,7 +287,6 @@ public:
* @param[out] os Output stream.
* @param[in] common_params Example parameters to output
*
- * @return None.
*/
virtual void print_parameters(::std::ostream &os, const ExampleParams &common_params)
{
@@ -309,8 +308,6 @@ public:
*
* @param[in] options Options to consume
* @param[out] common_params params structure to consume.
- *
- * @return consume_common_graph_parameters structure containing the common graph parameters
*/
void consume_common_graph_parameters(CommonGraphValidateOptions &options, CommonParams &common_params)
{
@@ -396,7 +393,6 @@ public:
* @param[out] bias The tensor with the bias data.
* @param[in] tensor Tensor result of the actual operation passed into the Accessor.
*
- * @return None.
*/
virtual void create_tensors(arm_compute::test::SimpleTensor<D> &src,
arm_compute::test::SimpleTensor<D> &weights,
@@ -445,8 +441,6 @@ public:
* @param[in] seed seed for the randomization function
* @param[in] low lower bound for random values
* @param[in] high upper bound for random values
- *
- * @return None.
*/
void fill_tensor(arm_compute::test::SimpleTensor<uint8_t> &tensor, std::random_device::result_type seed, uint8_t low, uint8_t high)
{
@@ -473,8 +467,6 @@ public:
* @param[in] seed seed for the randomization function
* @param[in] low lower bound for random values
* @param[in] high upper bound for random values
- *
- * @return None.
*/
void fill_tensor(arm_compute::test::SimpleTensor<int32_t> &tensor, std::random_device::result_type seed, int32_t low, int32_t high)
{
@@ -494,8 +486,6 @@ public:
* @param[in] seed seed for the randomization function
* @param[in] low lower bound for random values
* @param[in] high upper bound for random values
- *
- * @return None.
*/
void fill_tensor(arm_compute::test::SimpleTensor<float> &tensor, std::random_device::result_type seed, float low, float high)
{
@@ -516,8 +506,6 @@ public:
* @param[in] seed seed for the randomization function
* @param[in] low lower bound for random values
* @param[in] high upper bound for random values
- *
- * @return None.
*/
void fill_tensor(arm_compute::test::SimpleTensor<half> &tensor, std::random_device::result_type seed, half low, half high)
{
@@ -559,8 +547,6 @@ public:
*
* @param[in] tensor Tensor result of the actual operation passed into the Accessor.
* @param[in] output Tensor result of the reference implementation.
- *
- * @return None.
*/
void validate(ITensor &tensor, arm_compute::test::SimpleTensor<D> output)
{
@@ -692,4 +678,4 @@ public:
} // graph_validate_utils
} // arm_compute
-#endif //GRAPH_VALIDATE_UTILS_H
+#endif // ACL_TESTS_VALIDATE_EXAMPLES_GRAPH_VALIDATE_UTILS_H