From bc24679916e52b2f7282eb8b1dc1761eb134016f Mon Sep 17 00:00:00 2001 From: =?utf8?q?=EC=9C=A4=EC=A7=80=EC=98=81/=EB=8F=99=EC=9E=91=EC=A0=9C?= =?utf8?q?=EC=96=B4Lab=28SR=29/Engineer/=EC=82=BC=EC=84=B1=EC=A0=84?= =?utf8?q?=EC=9E=90?= Date: Tue, 4 Dec 2018 15:46:20 +0900 Subject: [PATCH] Update pack input parameters (#3848) The values_count is added by nnapi_delegate but it is not necessary because it can be replaced with ifm_indexes.size() So it will be ignored Signed-off-by: Jiyoung Yun --- runtimes/pure_arm_compute/src/internal/op/Pack.cc | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/runtimes/pure_arm_compute/src/internal/op/Pack.cc b/runtimes/pure_arm_compute/src/internal/op/Pack.cc index e5be0f8..73f89b8 100644 --- a/runtimes/pure_arm_compute/src/internal/op/Pack.cc +++ b/runtimes/pure_arm_compute/src/internal/op/Pack.cc @@ -49,13 +49,18 @@ Param::Param(uint32_t inputCount, const uint32_t *inputs, uint32_t outputCount, { assert(outputCount == 1); + // Each input should be interpreted as follows: + // + // 0 .. n - 3 -> Input Tensor Index + // n - 2 -> Input Tensor counts (will be ignored) + // n - 1 -> Input Axis Index ofm_index = outputs[0]; + axis_index = inputs[inputCount - 1]; // last input is axis along which packing is required - for (uint32_t n = 0; n < inputCount - 1; ++n) + for (uint32_t n = 0; n < inputCount - 2; ++n) { ifm_indexes.emplace_back(inputs[n]); } - axis_index = inputs[inputCount - 1]; } } // namespace Pack -- 2.7.4