aboutsummaryrefslogtreecommitdiff
path: root/ConversionUtils.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'ConversionUtils.hpp')
-rw-r--r--ConversionUtils.hpp16
1 files changed, 14 insertions, 2 deletions
diff --git a/ConversionUtils.hpp b/ConversionUtils.hpp
index f2f95ac8..51727a31 100644
--- a/ConversionUtils.hpp
+++ b/ConversionUtils.hpp
@@ -1287,10 +1287,22 @@ LayerInputHandle ConvertToLayerInputHandle(const ::android::hardware::neuralnetw
try
{
armnn::TensorInfo operandTensorInfo = GetTensorInfoForOperand(*operand);
+
if (IsDynamicTensor(operandTensorInfo))
{
- Fail("%s: dynamic input tensors are not supported", __func__);
- return LayerInputHandle();
+ const uint32_t operandIndex = operation.inputs[inputIndex];
+
+ // Check if the dynamic input tensors have been inferred by one of the previous layers
+ // If not we can't support them
+ if(data.m_OutputSlotForOperand.size() >= operandIndex && data.m_OutputSlotForOperand[operandIndex])
+ {
+ operandTensorInfo = data.m_OutputSlotForOperand[operandIndex]->GetTensorInfo();
+ }
+ else
+ {
+ Fail("%s: Type 2 dynamic input tensors are not supported", __func__);
+ return LayerInputHandle();
+ }
}
switch (operand->lifetime)