From 1c1b3aa470f3854000be22edb61991f6210e5605 Mon Sep 17 00:00:00 2001 From: Michele Di Giorgio Date: Thu, 2 Apr 2020 17:35:42 +0100 Subject: COMPMID-3236: Implement CLQLSTMLayer COMPMID-3081: Extend CLQLSTMLayer with enhancements Change-Id: Idb7aaaacdba957e5ad61e94edeab2e898730a109 Signed-off-by: Michele Di Giorgio Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/3057 Tested-by: Arm Jenkins Reviewed-by: Sang-Hoon Park Comments-Addressed: Arm Jenkins --- src/core/CL/kernels/CLGEMMLowpReductionKernel.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'src/core/CL/kernels/CLGEMMLowpReductionKernel.cpp') diff --git a/src/core/CL/kernels/CLGEMMLowpReductionKernel.cpp b/src/core/CL/kernels/CLGEMMLowpReductionKernel.cpp index e81ab2ffba..9fa253a55a 100644 --- a/src/core/CL/kernels/CLGEMMLowpReductionKernel.cpp +++ b/src/core/CL/kernels/CLGEMMLowpReductionKernel.cpp @@ -36,7 +36,7 @@ namespace Status validate_arguments_matrix_a_reduction(const ITensorInfo *input, const ITensorInfo *output) { ARM_COMPUTE_RETURN_ERROR_ON_NULLPTR(input, output); - ARM_COMPUTE_RETURN_ERROR_ON_DATA_TYPE_CHANNEL_NOT_IN(input, 1, DataType::QASYMM8, DataType::QASYMM8_SIGNED); + ARM_COMPUTE_RETURN_ERROR_ON_DATA_TYPE_CHANNEL_NOT_IN(input, 1, DataType::QASYMM8, DataType::QASYMM8_SIGNED, DataType::QSYMM8); if(output->total_size() > 0) { @@ -49,7 +49,7 @@ Status validate_arguments_matrix_a_reduction(const ITensorInfo *input, const ITe Status validate_arguments_matrix_b_reduction(const ITensorInfo *input, const ITensorInfo *output) { ARM_COMPUTE_RETURN_ERROR_ON_NULLPTR(input, output); - ARM_COMPUTE_RETURN_ERROR_ON_DATA_TYPE_CHANNEL_NOT_IN(input, 1, DataType::QASYMM8, DataType::QASYMM8_SIGNED); + ARM_COMPUTE_RETURN_ERROR_ON_DATA_TYPE_CHANNEL_NOT_IN(input, 1, DataType::QASYMM8, DataType::QASYMM8_SIGNED, DataType::QSYMM8); if(output->total_size() > 0) { @@ -63,6 +63,9 @@ std::pair validate_and_configure_window_matrix_b_reduction(ITens { constexpr unsigned int num_elems_processed_per_iteration = 16; + // Output auto initialization if not yet initialized + auto_init_if_empty(*output, TensorShape(input->dimension(0)), 1, DataType::S32); + // Configure kernel window Window win = calculate_max_window(*output, Steps(num_elems_processed_per_iteration)); @@ -94,6 +97,9 @@ void CLGEMMLowpMatrixAReductionKernel::configure(CLCompileContext &compile_conte ARM_COMPUTE_ERROR_ON_NULLPTR(mtx_a, vector_sum_row); ARM_COMPUTE_ERROR_THROW_ON(validate_arguments_matrix_a_reduction(mtx_a->info(), vector_sum_row->info())); + // Output auto initialization if not yet initialized + auto_init_if_empty(*vector_sum_row->info(), TensorShape(mtx_a->info()->dimension(1)), 1, DataType::S32); + _input = mtx_a; _output = vector_sum_row; -- cgit v1.2.1