diff options
Diffstat (limited to '1.1')
-rw-r--r-- | 1.1/HalPolicy.cpp | 12 |
1 files changed, 9 insertions, 3 deletions
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<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__); |