From 81f27fdb53511c8f377ca2d82fc8436ebf675e76 Mon Sep 17 00:00:00 2001 From: Kevin May Date: Thu, 20 Aug 2020 10:22:53 +0100 Subject: IVGCVSW-5224 Fix for UnknownDimensionsTest in CpuRef and GpuAcc * Correctly handle HalOperandLifeTime::NO_VALUE in ConvertTranspose Signed-off-by: Kevin May Change-Id: I36790a90b5a3eac3da9e4edafc96387bb4375db9 --- ConversionUtils.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ConversionUtils.hpp b/ConversionUtils.hpp index 51727a31..27d07200 100644 --- a/ConversionUtils.hpp +++ b/ConversionUtils.hpp @@ -3872,6 +3872,7 @@ template(operation, 0, model, data); if (!input.IsValid()) @@ -3891,9 +3892,8 @@ bool ConvertTranspose(const HalOperation& operation, const HalModel& model, Conv const HalOperand* permOperand = GetInputOperand(operation, 1, model, false); std::vector perm(rank); - if (!permOperand) + if (!permOperand || (permOperand->lifetime == HalOperandLifeTime::NO_VALUE)) { - // NOTE: If perm is not given, it is set to (n-1...0), where n is the rank of the tensor for (unsigned int i = rank; i > 0; i--) { perm[rank - i] = boost::numeric_cast (i - 1); -- cgit v1.2.1