IVGCVSW-3458 Fix VTS sub dynamic_output_shape test failures

Signed-off-by: Sadik Armagan <sadik.armagan@arm.com>
Change-Id: Ia6e2a082ed4a0255d8c9c10375590553e6ede9f0
diff --git a/1.1/HalPolicy.cpp b/1.1/HalPolicy.cpp
index 9f2c9be..fbd2e08 100644
--- a/1.1/HalPolicy.cpp
+++ b/1.1/HalPolicy.cpp
@@ -178,10 +178,11 @@
         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 @@
     if (endLayer)
     {
         BroadcastTensor(input0, input1, startLayer, *data.m_Network);
-        return SetupAndTrackLayerOutputSlot<hal_1_1::HalPolicy>(operation, 0, *endLayer, model, data);
+        return SetupAndTrackLayerOutputSlot<hal_1_1::HalPolicy>(operation,
+                                                                0,
+                                                                *endLayer,
+                                                                model,
+                                                                data,
+                                                                armnn::Optional<armnn::TensorInfo>(outputInfo));
     }
 
     return Fail("%s: ProcessActivation failed", __func__);