diff options
author | Gian Marco Iodice <gianmarco.iodice@arm.com> | 2018-05-08 12:01:57 +0100 |
---|---|---|
committer | Anthony Barbier <anthony.barbier@arm.com> | 2018-11-02 16:51:50 +0000 |
commit | 750641dd6aab1e5e62d1875b97b230312bb87959 (patch) | |
tree | b3b180c07d7769cb32a6f35b6d0df2384a4638b0 /src/core/CL/kernels/CLGEMMMatrixAdditionKernel.cpp | |
parent | aa3240d3e2a575c436ec60ea0a31e8375d997425 (diff) | |
download | ComputeLibrary-750641dd6aab1e5e62d1875b97b230312bb87959.tar.gz |
COMPMID-1052 - Rework validate method in CLGEMM
Change-Id: Iece5bd6478b5fac5164abff30c1e63e8a77291a9
Reviewed-on: https://eu-gerrit-1.euhpc.arm.com/130374
Reviewed-by: Anthony Barbier <anthony.barbier@arm.com>
Tested-by: Jenkins <bsgcomp@arm.com>
Diffstat (limited to 'src/core/CL/kernels/CLGEMMMatrixAdditionKernel.cpp')
-rw-r--r-- | src/core/CL/kernels/CLGEMMMatrixAdditionKernel.cpp | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/src/core/CL/kernels/CLGEMMMatrixAdditionKernel.cpp b/src/core/CL/kernels/CLGEMMMatrixAdditionKernel.cpp index 4b4814f15d..4538812baa 100644 --- a/src/core/CL/kernels/CLGEMMMatrixAdditionKernel.cpp +++ b/src/core/CL/kernels/CLGEMMMatrixAdditionKernel.cpp @@ -58,16 +58,15 @@ std::pair<Status, Window> validate_and_configure_window(ITensorInfo *input, ITen namespace { -Status validate_arguments(const ITensorInfo *input, const ITensorInfo *output, const float beta) +Status validate_arguments(const ITensorInfo *input, const ITensorInfo *output, float beta) { ARM_COMPUTE_RETURN_ERROR_ON_NULLPTR(input, output); + ARM_COMPUTE_UNUSED(input, output, beta); ARM_COMPUTE_RETURN_ERROR_ON_DATA_TYPE_CHANNEL_NOT_IN(input, 1, DataType::QS8, DataType::QS16, DataType::F16, DataType::F32); ARM_COMPUTE_RETURN_ERROR_ON_MISMATCHING_DATA_TYPES(input, output); - ARM_COMPUTE_RETURN_ERROR_ON(input->dimension(0) != output->dimension(0)); - ARM_COMPUTE_RETURN_ERROR_ON(input->dimension(1) != output->dimension(1)); + ARM_COMPUTE_RETURN_ERROR_ON_MISMATCHING_SHAPES(input, output); - ARM_COMPUTE_UNUSED(beta); return Status{}; } } // namespace @@ -114,11 +113,10 @@ void CLGEMMMatrixAdditionKernel::configure(const ICLTensor *input, ICLTensor *ou ICLKernel::configure(win_config.second); } -Status CLGEMMMatrixAdditionKernel::validate(const ITensorInfo *input, const ITensorInfo *output, const float beta) +Status CLGEMMMatrixAdditionKernel::validate(const ITensorInfo *input, const ITensorInfo *output, float beta) { - ARM_COMPUTE_ERROR_ON_NULLPTR(input, output); - ARM_COMPUTE_RETURN_ERROR_ON(validate_arguments(input, output, beta)); - ARM_COMPUTE_RETURN_ERROR_ON(validate_and_configure_window(input->clone().get(), output->clone().get()).first); + ARM_COMPUTE_RETURN_ON_ERROR(validate_arguments(input, output, beta)); + ARM_COMPUTE_RETURN_ON_ERROR(validate_and_configure_window(input->clone().get(), output->clone().get()).first); return Status{}; } |