diff options
author | Jim Flynn <jim.flynn@arm.com> | 2019-05-22 14:24:13 +0100 |
---|---|---|
committer | Jim Flynn <jim.flynn@arm.com> | 2019-05-28 17:50:33 +0100 |
commit | e242f2dc646f41e9162aaaf74e057ce39fcb92df (patch) | |
tree | d6c49b559c34d1d306b1e901501dded1c18f71c5 /src/backends/reference/RefLayerSupport.cpp | |
parent | 2f2778f36e59537bbd47fb8b21e73c6c5a949584 (diff) | |
download | armnn-e242f2dc646f41e9162aaaf74e057ce39fcb92df.tar.gz |
IVGCVSW-3119 Rename MergerLayer to ConcatLayer
!android-nn-driver:1210
Change-Id: I940b3b9e421c92bfd55ae996f7bc54ac077f2604
Signed-off-by: Jim Flynn <jim.flynn@arm.com>
Diffstat (limited to 'src/backends/reference/RefLayerSupport.cpp')
-rw-r--r-- | src/backends/reference/RefLayerSupport.cpp | 55 |
1 files changed, 27 insertions, 28 deletions
diff --git a/src/backends/reference/RefLayerSupport.cpp b/src/backends/reference/RefLayerSupport.cpp index 2adcb1099d..9a691a6fa7 100644 --- a/src/backends/reference/RefLayerSupport.cpp +++ b/src/backends/reference/RefLayerSupport.cpp @@ -316,18 +316,38 @@ bool RefLayerSupport::IsBatchToSpaceNdSupported(const TensorInfo& input, bool RefLayerSupport::IsConcatSupported(const std::vector<const TensorInfo*> inputs, const TensorInfo& output, - const OriginsDescriptor& descriptor, + const ConcatDescriptor& descriptor, Optional<std::string&> reasonIfUnsupported) const { - ARMNN_NO_DEPRECATE_WARN_BEGIN - return IsMergerSupported(inputs, output, descriptor, reasonIfUnsupported); - ARMNN_NO_DEPRECATE_WARN_END + ignore_unused(descriptor); + + bool supported = true; + std::array<DataType,3> supportedTypes = + { + DataType::Float32, + DataType::QuantisedAsymm8, + DataType::QuantisedSymm16 + }; + + supported &= CheckSupportRule(TypeAnyOf(output, supportedTypes), reasonIfUnsupported, + "Reference concatenation: output type not supported"); + for (const TensorInfo* input : inputs) + { + supported &= CheckSupportRule(TypeAnyOf(*input, supportedTypes), reasonIfUnsupported, + "Reference concatenation: input type not supported"); + + supported &= CheckSupportRule(TypesAreEqual(*input, output), reasonIfUnsupported, + "Reference concatenation: input and output types mismatched."); + } + + return supported; } bool RefLayerSupport::IsConstantSupported(const TensorInfo& output, Optional<std::string&> reasonIfUnsupported) const { - std::array<DataType,4> supportedTypes = { + std::array<DataType,4> supportedTypes = + { DataType::Float32, DataType::Signed32, DataType::QuantisedAsymm8, @@ -815,31 +835,10 @@ bool RefLayerSupport::IsMeanSupported(const TensorInfo& input, bool RefLayerSupport::IsMergerSupported(const std::vector<const TensorInfo*> inputs, const TensorInfo& output, - const OriginsDescriptor& descriptor, + const MergerDescriptor& descriptor, Optional<std::string&> reasonIfUnsupported) const { - ignore_unused(descriptor); - - bool supported = true; - std::array<DataType,3> supportedTypes = - { - DataType::Float32, - DataType::QuantisedAsymm8, - DataType::QuantisedSymm16 - }; - - supported &= CheckSupportRule(TypeAnyOf(output, supportedTypes), reasonIfUnsupported, - "Reference concatenation: output type not supported"); - for (const TensorInfo* input : inputs) - { - supported &= CheckSupportRule(TypeAnyOf(*input, supportedTypes), reasonIfUnsupported, - "Reference concatenation: input type not supported"); - - supported &= CheckSupportRule(TypesAreEqual(*input, output), reasonIfUnsupported, - "Reference concatenation: input and output types mismatched."); - } - - return supported; + return IsConcatSupported(inputs, output, descriptor, reasonIfUnsupported); } bool RefLayerSupport::IsMemCopySupported(const TensorInfo &input, |