aboutsummaryrefslogtreecommitdiff
path: root/src/backends/tosaReference/TosaRefLayerSupport.cpp
diff options
context:
space:
mode:
authorCathal Corbett <cathal.corbett@arm.com>2022-12-09 12:17:27 +0000
committerTeresaARM <teresa.charlinreyes@arm.com>2022-12-13 12:13:20 +0000
commit3b9acd515918ac1af5498b3e7501c0b16a88a8e0 (patch)
treea537cbdd7c45fea1772cbb34f8a23ecc7dbd6e1a /src/backends/tosaReference/TosaRefLayerSupport.cpp
parent8107ccce5167f160b9c98a6042878dd0408220b5 (diff)
downloadarmnn-3b9acd515918ac1af5498b3e7501c0b16a88a8e0.tar.gz
IVGCVSW-7342 Add Slice support to TOSA Reference Backend
Signed-off-by: Cathal Corbett <cathal.corbett@arm.com> Change-Id: I8be286b69bebd4cd36033e3145632bb043938d16
Diffstat (limited to 'src/backends/tosaReference/TosaRefLayerSupport.cpp')
-rw-r--r--src/backends/tosaReference/TosaRefLayerSupport.cpp19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/backends/tosaReference/TosaRefLayerSupport.cpp b/src/backends/tosaReference/TosaRefLayerSupport.cpp
index 5cda85af20..daa27f63dc 100644
--- a/src/backends/tosaReference/TosaRefLayerSupport.cpp
+++ b/src/backends/tosaReference/TosaRefLayerSupport.cpp
@@ -303,6 +303,24 @@ static bool IsTosaLayerSupported(TosaSerializationOperator* op,
return RunTosaLayerChecksSingleDataType(
op, inputs, outputs, supportedAttributes, supportedTypes, reasonIfUnsupported);
}
+ case tosa::Op_SLICE:
+ {
+ std::vector<Attribute> supportedAttributes = { Attribute_SliceAttribute };
+
+ std::vector<DType> supportedTypes =
+ {
+ DType_FP16,
+ DType_FP32,
+ DType_INT8,
+ DType_INT16,
+ DType_INT32,
+ DType_BOOL
+ };
+
+ // Check the attribute, data types and bounds for inputs and outputs.
+ return RunTosaLayerChecksSingleDataType(
+ op, inputs, outputs, supportedAttributes, supportedTypes, reasonIfUnsupported);
+ }
default:
SetValueChecked(reasonIfUnsupported, "Operation is currently unsupported by the TOSA Reference Backend.");
return false;
@@ -351,6 +369,7 @@ bool TosaRefLayerSupport::IsLayerSupported(const LayerType& type,
}
case LayerType::Pooling2d:
case LayerType::Reshape:
+ case LayerType::Slice:
// Setup inputs and outputs
inputInfos.push_back(&infos[0]);
outputInfos.push_back(&infos[1]);