diff options
-rw-r--r-- | src/cpu/kernels/CpuElementwiseUnaryKernel.cpp | 2 | ||||
-rw-r--r-- | src/cpu/kernels/elementwise_unary/generic/neon/impl.cpp | 8 | ||||
-rw-r--r-- | src/cpu/kernels/elementwise_unary/list.h | 3 | ||||
-rw-r--r-- | tests/validation/NEON/ElementwiseLog.cpp | 2 |
4 files changed, 12 insertions, 3 deletions
diff --git a/src/cpu/kernels/CpuElementwiseUnaryKernel.cpp b/src/cpu/kernels/CpuElementwiseUnaryKernel.cpp index 4b61ee3a1e..dbb752aef3 100644 --- a/src/cpu/kernels/CpuElementwiseUnaryKernel.cpp +++ b/src/cpu/kernels/CpuElementwiseUnaryKernel.cpp @@ -191,7 +191,7 @@ static const std::vector<CpuElementwiseUnaryKernel::ElementwiseUnaryKernel> avai { return data.dt == DataType::QASYMM8_SIGNED; }, - REGISTER_QASYMM8_NEON(neon_qasymm8_signed_elementwise_unary), + REGISTER_QASYMM8_SIGNED_NEON(neon_qasymm8_signed_elementwise_unary), nullptr, }, { diff --git a/src/cpu/kernels/elementwise_unary/generic/neon/impl.cpp b/src/cpu/kernels/elementwise_unary/generic/neon/impl.cpp index 2b23e46f40..1b449340ba 100644 --- a/src/cpu/kernels/elementwise_unary/generic/neon/impl.cpp +++ b/src/cpu/kernels/elementwise_unary/generic/neon/impl.cpp @@ -183,6 +183,10 @@ void elementwise_op<int8_t>(const ITensor *in, ITensor *out, const Window &windo { tmp_f = (127 - qi_out.offset) * qi_out.scale; } + else + { + tmp_f = elementwise_op_scalar_imp<float>(op, tmp_f); + } } else { @@ -263,6 +267,10 @@ void elementwise_op<uint8_t>(const ITensor *in, ITensor *out, const Window &wind { tmp_f = (255 - qi_out.offset) * qi_out.scale; } + else + { + tmp_f = elementwise_op_scalar_imp<float>(op, tmp_f); + } } else { diff --git a/src/cpu/kernels/elementwise_unary/list.h b/src/cpu/kernels/elementwise_unary/list.h index c1cfbb8a3a..432fabf4af 100644 --- a/src/cpu/kernels/elementwise_unary/list.h +++ b/src/cpu/kernels/elementwise_unary/list.h @@ -42,9 +42,10 @@ DECLARE_ELEMETWISE_UNARY_KERNEL(neon_fp32_elementwise_unary); DECLARE_ELEMETWISE_UNARY_KERNEL(neon_fp16_elementwise_unary); DECLARE_ELEMETWISE_UNARY_KERNEL(neon_s32_elementwise_unary); DECLARE_ELEMETWISE_UNARY_KERNEL(neon_q8_elementwise_unary); +#ifndef __aarch64__ DECLARE_ELEMETWISE_UNARY_KERNEL(neon_qasymm8_signed_elementwise_unary); DECLARE_ELEMETWISE_UNARY_KERNEL(neon_qasymm8_elementwise_unary); - +#endif // __aarch64__ #undef DECLARE_ELEMETWISE_UNARY_KERNEL } // namespace cpu diff --git a/tests/validation/NEON/ElementwiseLog.cpp b/tests/validation/NEON/ElementwiseLog.cpp index 320ece2e73..1175903dac 100644 --- a/tests/validation/NEON/ElementwiseLog.cpp +++ b/tests/validation/NEON/ElementwiseLog.cpp @@ -106,7 +106,7 @@ TEST_SUITE(QASYMM8) FIXTURE_DATA_TEST_CASE(RunSmall, NELogLayerQuantizedFixture<uint8_t>, framework::DatasetMode::ALL, combine(combine(combine( datasets::SmallShapes(), framework::dataset::make("DataType", DataType::QASYMM8)), - framework::dataset::make("InputQInfo", { QuantizationInfo(10.5, 0) })), + framework::dataset::make("InputQInfo", { QuantizationInfo(10.5, 0), QuantizationInfo(0.5, -10) })), framework::dataset::make("OutputQInfo", { QuantizationInfo(5, 10) }))) { // Validate output |