aboutsummaryrefslogtreecommitdiff
path: root/test/1.1
diff options
context:
space:
mode:
authorSadik Armagan <sadik.armagan@arm.com>2021-02-12 17:16:42 +0000
committerKevin May <kevin.may@arm.com>2021-02-15 16:50:24 +0000
commit188675fd7e7239f56212d72f8ac10598de87e76a (patch)
tree611876f7c43f81c88b8dec19ae86afcb6d6a1a64 /test/1.1
parentcd639c98c347c1addae8c65eb1f4d8e75b468fdb (diff)
downloadandroid-nn-driver-188675fd7e7239f56212d72f8ac10598de87e76a.tar.gz
IVGCVSW-5665 Basic NN Driver support for next OS Version
Signed-off-by: Kevin May <kevin.may@arm.com> Signed-off-by: Sadik Armagan <sadik.armagan@arm.com> Change-Id: I1e1db52322092c6b1b7ac6183c3adc90aabcec24
Diffstat (limited to 'test/1.1')
-rw-r--r--test/1.1/Mean.cpp29
-rw-r--r--test/1.1/Transpose.cpp29
2 files changed, 30 insertions, 28 deletions
diff --git a/test/1.1/Mean.cpp b/test/1.1/Mean.cpp
index 8c52d23d..c9a5a6d3 100644
--- a/test/1.1/Mean.cpp
+++ b/test/1.1/Mean.cpp
@@ -19,6 +19,7 @@ using namespace driverTestHelpers;
using namespace armnn_driver;
using HalPolicy = hal_1_1::HalPolicy;
+using RequestArgument = V1_0::RequestArgument;
namespace
{
@@ -61,22 +62,22 @@ void MeanTestImpl(const TestTensor& input,
android::sp<V1_0::IPreparedModel> preparedModel = PrepareModel(model, *driver);
// The request's memory pools will follow the same order as the inputs
- DataLocation inLoc = {};
- inLoc.poolIndex = 0;
- inLoc.offset = 0;
- inLoc.length = input.GetNumElements() * sizeof(float);
- RequestArgument inArg = {};
- inArg.location = inLoc;
- inArg.dimensions = input.GetDimensions();
+ V1_0::DataLocation inLoc = {};
+ inLoc.poolIndex = 0;
+ inLoc.offset = 0;
+ inLoc.length = input.GetNumElements() * sizeof(float);
+ RequestArgument inArg = {};
+ inArg.location = inLoc;
+ inArg.dimensions = input.GetDimensions();
// An additional memory pool is needed for the output
- DataLocation outLoc = {};
- outLoc.poolIndex = 1;
- outLoc.offset = 0;
- outLoc.length = expectedOutput.GetNumElements() * sizeof(float);
- RequestArgument outArg = {};
- outArg.location = outLoc;
- outArg.dimensions = expectedOutput.GetDimensions();
+ V1_0::DataLocation outLoc = {};
+ outLoc.poolIndex = 1;
+ outLoc.offset = 0;
+ outLoc.length = expectedOutput.GetNumElements() * sizeof(float);
+ RequestArgument outArg = {};
+ outArg.location = outLoc;
+ outArg.dimensions = expectedOutput.GetDimensions();
// Make the request based on the arguments
V1_0::Request request = {};
diff --git a/test/1.1/Transpose.cpp b/test/1.1/Transpose.cpp
index 9d240004..206f9b98 100644
--- a/test/1.1/Transpose.cpp
+++ b/test/1.1/Transpose.cpp
@@ -24,6 +24,7 @@ using namespace driverTestHelpers;
using namespace armnn_driver;
using HalPolicy = hal_1_1::HalPolicy;
+using RequestArgument = V1_0::RequestArgument;
namespace
{
@@ -58,22 +59,22 @@ void TransposeTestImpl(const TestTensor & inputs, int32_t perm[],
// the request's memory pools will follow the same order as
// the inputs
- DataLocation inloc = {};
- inloc.poolIndex = 0;
- inloc.offset = 0;
- inloc.length = inputs.GetNumElements() * sizeof(float);
- RequestArgument input = {};
- input.location = inloc;
- input.dimensions = inputs.GetDimensions();
+ V1_0::DataLocation inloc = {};
+ inloc.poolIndex = 0;
+ inloc.offset = 0;
+ inloc.length = inputs.GetNumElements() * sizeof(float);
+ RequestArgument input = {};
+ input.location = inloc;
+ input.dimensions = inputs.GetDimensions();
// and an additional memory pool is needed for the output
- DataLocation outloc = {};
- outloc.poolIndex = 1;
- outloc.offset = 0;
- outloc.length = expectedOutputTensor.GetNumElements() * sizeof(float);
- RequestArgument output = {};
- output.location = outloc;
- output.dimensions = expectedOutputTensor.GetDimensions();
+ V1_0::DataLocation outloc = {};
+ outloc.poolIndex = 1;
+ outloc.offset = 0;
+ outloc.length = expectedOutputTensor.GetNumElements() * sizeof(float);
+ RequestArgument output = {};
+ output.location = outloc;
+ output.dimensions = expectedOutputTensor.GetDimensions();
// make the request based on the arguments
V1_0::Request request = {};