aboutsummaryrefslogtreecommitdiff
path: root/delegate/opaque/src/Convolution.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'delegate/opaque/src/Convolution.hpp')
-rw-r--r--delegate/opaque/src/Convolution.hpp60
1 files changed, 2 insertions, 58 deletions
diff --git a/delegate/opaque/src/Convolution.hpp b/delegate/opaque/src/Convolution.hpp
index 163290b542..50c57d1d1f 100644
--- a/delegate/opaque/src/Convolution.hpp
+++ b/delegate/opaque/src/Convolution.hpp
@@ -47,31 +47,11 @@ TfLiteStatus VisitConv2dOperator(DelegateData& delegateData,
{
return kTfLiteError;
}
- if (IsDynamicTensor(tfLiteInputTensor))
- {
- TF_LITE_OPAQUE_MAYBE_KERNEL_LOG(
- tfLiteContext,
- "TfLiteArmnnOpaqueDelegate: Dynamic input tensors are not supported in operator #%d node #%d: ",
- operatorCode, nodeIndex);
- return kTfLiteError;
- }
// Use input indices to get filter tensor.
const TfLiteOpaqueTensor* tfLiteFilterTensor = TfLiteOpaqueContextGetOpaqueTensor(tfLiteContext, inputTensors[1]);
- if(!IsValid(tfLiteFilterTensor))
- {
- TF_LITE_OPAQUE_MAYBE_KERNEL_LOG(
- tfLiteContext,
- "TfLiteArmnnOpaqueDelegate: Invalid filter tensor in operator #%d node #%d: ",
- operatorCode, nodeIndex);
- return kTfLiteError;
- }
- if (IsDynamicTensor(tfLiteFilterTensor))
+ if (!IsValid(tfLiteContext, tfLiteFilterTensor, operatorCode, nodeIndex))
{
- TF_LITE_OPAQUE_MAYBE_KERNEL_LOG(
- tfLiteContext,
- "TfLiteArmnnOpaqueDelegate: Dynamic filter tensors are not supported in node #%d: ",
- nodeIndex);
return kTfLiteError;
}
@@ -92,14 +72,6 @@ TfLiteStatus VisitConv2dOperator(DelegateData& delegateData,
{
return kTfLiteError;
}
- if (IsDynamicTensor(tfLiteOutputTensor))
- {
- TF_LITE_OPAQUE_MAYBE_KERNEL_LOG(
- tfLiteContext,
- "TfLiteArmnnOpaqueDelegate: Dynamic output tensors are not supported in operator #%d node #%d: ",
- operatorCode, nodeIndex);
- return kTfLiteError;
- }
const armnn::TensorInfo& inputTensorInfo = GetTensorInfoForTfLiteOpaqueTensor(tfLiteInputTensor);
const armnn::TensorInfo& filterTensorInfo = GetTensorInfoForTfLiteOpaqueTensor(tfLiteFilterTensor);
@@ -281,31 +253,11 @@ TfLiteStatus VisitDepthwiseConv2dOperator(DelegateData& delegateData,
{
return kTfLiteError;
}
- if (IsDynamicTensor(tfLiteInputTensor))
- {
- TF_LITE_OPAQUE_MAYBE_KERNEL_LOG(
- tfLiteContext,
- "TfLiteArmnnOpaqueDelegate: Dynamic input tensors are not supported in operator #%d node #%d: ",
- operatorCode, nodeIndex);
- return kTfLiteError;
- }
// Use input indices to get filter tensor.
const TfLiteOpaqueTensor* tfLiteFilterTensor = TfLiteOpaqueContextGetOpaqueTensor(tfLiteContext, inputTensors[1]);
- if(!IsValid(tfLiteFilterTensor))
- {
- TF_LITE_OPAQUE_MAYBE_KERNEL_LOG(
- tfLiteContext,
- "TfLiteArmnnOpaqueDelegate: Invalid filter tensor in operator #%d node #%d: ",
- operatorCode, nodeIndex);
- return kTfLiteError;
- }
- if (IsDynamicTensor(tfLiteFilterTensor))
+ if (!IsValid(tfLiteContext, tfLiteFilterTensor, operatorCode, nodeIndex))
{
- TF_LITE_OPAQUE_MAYBE_KERNEL_LOG(
- tfLiteContext,
- "TfLiteArmnnOpaqueDelegate: Dynamic filter tensors are not supported in node #%d: ",
- nodeIndex);
return kTfLiteError;
}
@@ -326,14 +278,6 @@ TfLiteStatus VisitDepthwiseConv2dOperator(DelegateData& delegateData,
{
return kTfLiteError;
}
- if (IsDynamicTensor(tfLiteOutputTensor))
- {
- TF_LITE_OPAQUE_MAYBE_KERNEL_LOG(
- tfLiteContext,
- "TfLiteArmnnOpaqueDelegate: Dynamic output tensors are not supported in operator #%d node #%d: ",
- operatorCode, nodeIndex);
- return kTfLiteError;
- }
const armnn::TensorInfo& inputTensorInfo = GetTensorInfoForTfLiteOpaqueTensor(tfLiteInputTensor);
const armnn::TensorInfo& filterTensorInfo = GetTensorInfoForTfLiteOpaqueTensor(tfLiteFilterTensor);