diff options
-rw-r--r-- | src/core/CL/kernels/CLReductionOperationKernel.cpp | 4 | ||||
-rw-r--r-- | tests/validation/CL/ReductionOperation.cpp | 14 |
2 files changed, 7 insertions, 11 deletions
diff --git a/src/core/CL/kernels/CLReductionOperationKernel.cpp b/src/core/CL/kernels/CLReductionOperationKernel.cpp index 1347a9bc94..355dc7948e 100644 --- a/src/core/CL/kernels/CLReductionOperationKernel.cpp +++ b/src/core/CL/kernels/CLReductionOperationKernel.cpp @@ -98,10 +98,6 @@ void CLReductionOperationKernel::configure(const ICLTensor *input, ICLTensor *ou { ARM_COMPUTE_ERROR_ON_NULLPTR(input, output); - // Output tensor auto initialization if not yet initialized - TensorShape output_shape{ input->info()->tensor_shape() }; - output_shape.set(axis, 1); - ARM_COMPUTE_ERROR_THROW_ON(validate_arguments(input->info(), output->info(), axis, op)); const unsigned int num_elems_processed_per_iteration = 16; diff --git a/tests/validation/CL/ReductionOperation.cpp b/tests/validation/CL/ReductionOperation.cpp index a2a5eff4de..a48e2f9d5f 100644 --- a/tests/validation/CL/ReductionOperation.cpp +++ b/tests/validation/CL/ReductionOperation.cpp @@ -60,19 +60,19 @@ DATA_TEST_CASE(Validate, framework::DatasetMode::ALL, zip(zip(zip( TensorInfo(TensorShape(128U, 64U), 1, DataType::F32), // Axis > 0 TensorInfo(TensorShape(128U, 64U), 1, DataType::F32) }), - framework::dataset::make("OutputInfo", { TensorInfo(TensorShape(128U, 64U), 1, DataType::F16), - TensorInfo(TensorShape(128U, 64U), 1, DataType::F32), - TensorInfo(TensorShape(128U, 64U), 1, DataType::S16), - TensorInfo(TensorShape(128U, 64U), 1, DataType::F32), - TensorInfo(TensorShape(128U, 64U), 1, DataType::F32), - TensorInfo(TensorShape(128U, 64U), 1, DataType::F32) + framework::dataset::make("OutputInfo", { TensorInfo(TensorShape(1U, 64U), 1, DataType::F16), + TensorInfo(TensorShape(1U, 64U), 1, DataType::F32), + TensorInfo(TensorShape(1U, 64U), 1, DataType::S16), + TensorInfo(TensorShape(1U, 64U), 1, DataType::F32), + TensorInfo(TensorShape(1U, 64U), 1, DataType::F32), + TensorInfo(TensorShape(1U, 64U), 1, DataType::F32) })), framework::dataset::make("Axis", { 0U, 0U, 0U, static_cast<unsigned int>(TensorShape::num_max_dimensions), 1U, 0U })), framework::dataset::make("Expected", { false, false, false, false, false, true })), input_info, output_info, axis, expected) { bool is_valid = bool(CLReductionOperation::validate(&input_info.clone()->set_is_resizable(false), - &output_info.clone()->set_is_resizable(false), + &output_info.clone()->set_is_resizable(true), axis, ReductionOperation::SUM_SQUARE)); ARM_COMPUTE_EXPECT(is_valid == expected, framework::LogLevel::ERRORS); |