diff options
author | Francis Murtagh <francis.murtagh@arm.com> | 2022-05-18 11:46:10 +0100 |
---|---|---|
committer | Ryan OShea <ryan.oshea3@arm.com> | 2022-05-18 14:26:37 +0100 |
commit | 3570a3896d629a41c4e032880fca193c333dd3cf (patch) | |
tree | e597c8c42a5a03e3185f8f3f3e8261da574462d0 | |
parent | f440e0e1ce883b3ea11be8babcd871340d0ec7c0 (diff) | |
download | armnn-3570a3896d629a41c4e032880fca193c333dd3cf.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 03f32ac191..fde979ba41 100644 --- a/src/armnn/BackendHelper.cpp +++ b/src/armnn/BackendHelper.cpp @@ -1381,6 +1381,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, |