diff options
author | Mike Kelly <mike.kelly@arm.com> | 2023-03-08 10:08:20 +0000 |
---|---|---|
committer | Kevin May <kevin.may@arm.com> | 2023-03-08 13:57:20 +0000 |
commit | 084cb4dcb9eca3eac3fc634f052ddb7d7fcc0bb4 (patch) | |
tree | 9cdbb9ca9855f9655ba1bbf97691b25a671c5821 /Utils.hpp | |
parent | 0637bf38b24bba3a3d88f34ed956111a3abddda2 (diff) | |
download | android-nn-driver-branches/android-nn-driver_23_02.tar.gz |
IVGCVSW-7404 Out of bounds detectionv23.02branches/android-nn-driver_23_02
* Added test to ensure that all inputs and outputs do not go out of
bounds.
Signed-off-by: Mike Kelly <mike.kelly@arm.com>
Change-Id: Ia97e85f71e46cd2203306243e4dcbc23e0f29ec1
Diffstat (limited to 'Utils.hpp')
-rw-r--r-- | Utils.hpp | 9 |
1 files changed, 8 insertions, 1 deletions
@@ -1,5 +1,5 @@ // -// Copyright © 2017 Arm Ltd. All rights reserved. +// Copyright © 2017-2021,2023 Arm Ltd and Contributors. All rights reserved. // SPDX-License-Identifier: MIT // @@ -11,6 +11,8 @@ #include <NeuralNetworks.h> #include <Utils.h> +#include <fmt/format.h> + #include <vector> #include <string> #include <fstream> @@ -194,4 +196,9 @@ inline V1_2::OutputShape ComputeShape(const armnn::TensorInfo& info) void CommitPools(std::vector<::android::nn::RunTimePoolInfo>& memPools); +template <typename ErrorStatus, typename Request> +ErrorStatus ValidateRequestArgument(const Request& request, + const armnn::TensorInfo& tensorInfo, + const V1_0::RequestArgument& requestArgument, + std::string descString); } // namespace armnn_driver |