diff options
author | Francis Murtagh <francis.murtagh@arm.com> | 2022-05-18 11:46:10 +0100 |
---|---|---|
committer | Francis Murtagh <francis.murtagh@arm.com> | 2022-05-18 11:56:15 +0100 |
commit | aeb4a9c8ecc0707e0d82f886c07b300fe00920dc (patch) | |
tree | b085b6ecb066e20090d1ac16d31b30ad62690dbe | |
parent | 8bd536064f32b1ce521875e2bc8dd24044c4f5c3 (diff) | |
download | armnn-aeb4a9c8ecc0707e0d82f886c07b300fe00920dc.tar.gz |
BugFix: Overload Deprecated IsUnidirectionalSequenceLstmSupported
* Signature change is ABI/API break, overloaded and forwarded to new function.
Signed-off-by: Francis Murtagh <francis.murtagh@arm.com>
Change-Id: I8590a6fd65986b5aeff905c1e761cb5c51042e99
-rw-r--r-- | include/armnn/BackendHelper.hpp | 13 | ||||
-rw-r--r-- | src/armnn/BackendHelper.cpp | 26 |
2 files changed, 39 insertions, 0 deletions
diff --git a/include/armnn/BackendHelper.hpp b/include/armnn/BackendHelper.hpp index 8bcdbc4d3c..87b99f03f0 100644 --- a/include/armnn/BackendHelper.hpp +++ b/include/armnn/BackendHelper.hpp @@ -411,6 +411,19 @@ public: const TransposeDescriptor& descriptor, Optional<std::string&> reasonIfUnsupported = EmptyOptional()); + ARMNN_DEPRECATED_MSG_REMOVAL_DATE("This function has been deprecated, please use function without " + "Optional TensorInfos", "23.02") + bool IsUnidirectionalSequenceLstmSupported( + const TensorInfo& input, + const TensorInfo& outputStateIn, + const TensorInfo& cellStateIn, + const TensorInfo& output, + const Optional<TensorInfo>& hiddenStateOutput, + const Optional<TensorInfo>& cellStateOutput, + const LstmDescriptor& descriptor, + const LstmInputParamsInfo& paramsInfo, + Optional<std::string&> reasonIfUnsupported = EmptyOptional()); + bool IsUnidirectionalSequenceLstmSupported( const TensorInfo& input, const TensorInfo& outputStateIn, diff --git a/src/armnn/BackendHelper.cpp b/src/armnn/BackendHelper.cpp index 9f97c26a75..2d70d7add0 100644 --- a/src/armnn/BackendHelper.cpp +++ b/src/armnn/BackendHelper.cpp @@ -1406,6 +1406,32 @@ bool LayerSupportHandle::IsTransposeSupported(const TensorInfo& input, reasonIfUnsupported); } +// Forwarding function to maintain ABI stability +bool LayerSupportHandle::IsUnidirectionalSequenceLstmSupported(const TensorInfo& input, + const TensorInfo& outputStateIn, + const TensorInfo& cellStateIn, + const TensorInfo& output, + const Optional<TensorInfo>& hiddenStateOutput, + const Optional<TensorInfo>& cellStateOutput, + const LstmDescriptor& descriptor, + const LstmInputParamsInfo& paramsInfo, + Optional<std::string&> reasonIfUnsupported) +{ + TensorInfo hiddenStateOutputVal = hiddenStateOutput.has_value() ? hiddenStateOutput.value() : TensorInfo(); + TensorInfo cellStateOutputVal = cellStateOutput.has_value() ? cellStateOutput.value() : TensorInfo(); + TensorInfos infos{input, outputStateIn, cellStateIn, hiddenStateOutputVal, cellStateOutputVal, output}; + + return IsUnidirectionalSequenceLstmSupported(input, + outputStateIn, + cellStateIn, + hiddenStateOutputVal, + cellStateOutputVal, + output, + descriptor, + paramsInfo, + reasonIfUnsupported); +} + bool LayerSupportHandle::IsUnidirectionalSequenceLstmSupported(const TensorInfo& input, const TensorInfo& outputStateIn, const TensorInfo& cellStateIn, |