From 5e9521ce5eac717b25844f9da4849b1fc2082f76 Mon Sep 17 00:00:00 2001 From: Sadik Armagan Date: Fri, 12 Jul 2019 13:55:57 +0100 Subject: IVGCVSW-3458 Fix VTS sub dynamic_output_shape test failures Signed-off-by: Sadik Armagan Change-Id: Ia6e2a082ed4a0255d8c9c10375590553e6ede9f0 --- 1.1/HalPolicy.cpp | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to '1.1') diff --git a/1.1/HalPolicy.cpp b/1.1/HalPolicy.cpp index 9f2c9be1..fbd2e08e 100644 --- a/1.1/HalPolicy.cpp +++ b/1.1/HalPolicy.cpp @@ -178,10 +178,11 @@ bool HalPolicy::ConvertSub(const Operation& operation, const Model& model, Conve return false; } - const armnn::TensorInfo& outputInfo = GetTensorInfoForOperand(*outputOperand); + armnn::TensorInfo outputInfo = GetTensorInfoForOperand(*outputOperand); if (IsDynamicOutput(outputInfo)) { - return Fail("%s: Dynamic output not supported", __func__); + ALOGD("Output shape not set, will infer from inputs"); + outputInfo.SetShape(InferSubOutputShape(input0.GetTensorInfo().GetShape(), input1.GetTensorInfo().GetShape())); } if (!IsLayerSupportedForAnyBackend(__func__, @@ -203,7 +204,12 @@ bool HalPolicy::ConvertSub(const Operation& operation, const Model& model, Conve if (endLayer) { BroadcastTensor(input0, input1, startLayer, *data.m_Network); - return SetupAndTrackLayerOutputSlot(operation, 0, *endLayer, model, data); + return SetupAndTrackLayerOutputSlot(operation, + 0, + *endLayer, + model, + data, + armnn::Optional(outputInfo)); } return Fail("%s: ProcessActivation failed", __func__); -- cgit v1.2.1