From d7d7e9035ca28b1b5200b20a73825397d46830fc Mon Sep 17 00:00:00 2001 From: Georgios Pinitas Date: Wed, 18 Dec 2019 15:40:54 +0000 Subject: COMPMID-2819: Update data type auto_init in Elementwise kernels. Auto initialization functionality is updated in elementwise kernels to check both data types in order to reason for the output data type configuration. Signed-off-by: Georgios Pinitas Change-Id: Ic08b5567d08a3aaca00942acbdbc8aee19686617 Reviewed-on: https://review.mlplatform.org/c/2495 Tested-by: Arm Jenkins Reviewed-by: Giorgio Arena Comments-Addressed: Arm Jenkins --- src/core/NEON/kernels/NEArithmeticAdditionKernel.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/core/NEON/kernels/NEArithmeticAdditionKernel.cpp') diff --git a/src/core/NEON/kernels/NEArithmeticAdditionKernel.cpp b/src/core/NEON/kernels/NEArithmeticAdditionKernel.cpp index 947be18b80..3532526eb8 100644 --- a/src/core/NEON/kernels/NEArithmeticAdditionKernel.cpp +++ b/src/core/NEON/kernels/NEArithmeticAdditionKernel.cpp @@ -403,7 +403,7 @@ void add_QASYMM8_SIGNED_QASYMM8_SIGNED_QASYMM8_SIGNED(const ITensor *in1, const int x = window_start_x; for(; x <= (window_end_x - window_step_x); x += window_step_x) { - const int8x16_t a = vld1q_s8(non_broadcast_input_ptr + x); + const int8x16_t a = vld1q_s8(non_broadcast_input_ptr + x); const float32x4x4_t af = { { @@ -875,7 +875,7 @@ std::pair validate_and_configure_window(ITensorInfo &input1, ITe { set_format_if_unknown(output, Format::S16); } - else if(input1.data_type() == DataType::F16 && input2.data_type() == DataType::F16) + else if(input1.data_type() == DataType::F16 || input2.data_type() == DataType::F16) { set_format_if_unknown(output, Format::F16); } @@ -883,15 +883,15 @@ std::pair validate_and_configure_window(ITensorInfo &input1, ITe { set_format_if_unknown(output, Format::F32); } - else if(input1.data_type() == DataType::QASYMM8) + else if(input1.data_type() == DataType::QASYMM8 || input2.data_type() == DataType::QASYMM8) { set_data_type_if_unknown(output, DataType::QASYMM8); } - else if(input1.data_type() == DataType::QASYMM8_SIGNED) + else if(input1.data_type() == DataType::QASYMM8_SIGNED || input2.data_type() == DataType::QASYMM8_SIGNED) { set_data_type_if_unknown(output, DataType::QASYMM8_SIGNED); } - else if(input1.data_type() == DataType::QSYMM16) + else if(input1.data_type() == DataType::QSYMM16 || input2.data_type() == DataType::QSYMM16) { set_data_type_if_unknown(output, DataType::QSYMM16); } -- cgit v1.2.1