From c8a149cf9557c90a55ad53fef514b5df26587d86 Mon Sep 17 00:00:00 2001 From: Georgios Pinitas Date: Mon, 18 Feb 2019 15:16:14 +0000 Subject: COMPMID-2005: Tensors have different quantization information. NEGEMMInterleavedKernel quantization information were unset when using the respective convolution functions. Change-Id: I1fd2af33aaadcfe3eda8bf20a0e56afa9b77c9bb Signed-off-by: Georgios Pinitas Reviewed-on: https://review.mlplatform.org/722 Reviewed-by: Isabella Gottardi Tested-by: Arm Jenkins --- src/runtime/NEON/functions/NEGEMM.cpp | 6 +++--- src/runtime/NEON/functions/NEGEMMLowpMatrixMultiplyCore.cpp | 10 +++++----- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/runtime/NEON/functions/NEGEMM.cpp b/src/runtime/NEON/functions/NEGEMM.cpp index 72a3e80330..99cddc2920 100644 --- a/src/runtime/NEON/functions/NEGEMM.cpp +++ b/src/runtime/NEON/functions/NEGEMM.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017-2018 ARM Limited. + * Copyright (c) 2017-2019 ARM Limited. * * SPDX-License-Identifier: MIT * @@ -91,8 +91,8 @@ void NEGEMM::configure(const ITensor *a, const ITensor *b, const ITensor *c, ITe shape_tmp_b.set(0, b->info()->dimension(1) * transpose_w); shape_tmp_b.set(1, std::ceil(b->info()->dimension(0) / static_cast(transpose_w))); - TensorInfo info_a(shape_tmp_a, 1, a->info()->data_type()); - TensorInfo info_b(shape_tmp_b, 1, b->info()->data_type()); + TensorInfo info_a = a->info()->clone()->set_tensor_shape(shape_tmp_a); + TensorInfo info_b = b->info()->clone()->set_tensor_shape(shape_tmp_b); _tmp_a.allocator()->init(info_a); _tmp_b.allocator()->init(info_b); diff --git a/src/runtime/NEON/functions/NEGEMMLowpMatrixMultiplyCore.cpp b/src/runtime/NEON/functions/NEGEMMLowpMatrixMultiplyCore.cpp index 4b026948b9..98bd95d7df 100644 --- a/src/runtime/NEON/functions/NEGEMMLowpMatrixMultiplyCore.cpp +++ b/src/runtime/NEON/functions/NEGEMMLowpMatrixMultiplyCore.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017-2018 ARM Limited. + * Copyright (c) 2017-2019 ARM Limited. * * SPDX-License-Identifier: MIT * @@ -97,9 +97,9 @@ void NEGEMMLowpMatrixMultiplyCore::configure(const ITensor *a, const ITensor *b, else { // The interleaved output matrix will have the following shape: [ a_height * 4, ceil(a_width / 4.0f) ] - TensorInfo info_a(compute_interleaved_shape(*a->info()), 1, a->info()->data_type()); + TensorInfo info_a = a->info()->clone()->set_tensor_shape(compute_interleaved_shape(*a->info())); // The transpose1xW output matrix will have the following shape: [ b_height * 16, ceil(b_width / 16.0f) ] - TensorInfo info_b(compute_transpose1xW_shape(*b->info()), 1, b->info()->data_type()); + TensorInfo info_b = b->info()->clone()->set_tensor_shape(compute_transpose1xW_shape(*b->info())); _tmp_a.allocator()->init(info_a); _tmp_b.allocator()->init(info_b); _memory_group.manage(&_tmp_a); @@ -241,8 +241,8 @@ Status NEGEMMLowpMatrixMultiplyCore::validate(const ITensorInfo *a, const ITenso shape_tmp_b.set(0, b->dimension(1) * 16); shape_tmp_b.set(1, std::ceil(b->dimension(0) / 16.f)); - TensorInfo info_a(shape_tmp_a, 1, a->data_type()); - TensorInfo info_b(shape_tmp_b, 1, b->data_type()); + TensorInfo info_a = a->clone()->set_tensor_shape(shape_tmp_a); + TensorInfo info_b = b->clone()->set_tensor_shape(shape_tmp_b); ARM_COMPUTE_RETURN_ON_ERROR(NEGEMMInterleave4x4Kernel::validate(a, &info_a)); ARM_COMPUTE_RETURN_ON_ERROR(NEGEMMTranspose1xWKernel::validate(b, &info_b)); -- cgit v1.2.1