diff options
author | Sadik Armagan <sadik.armagan@arm.com> | 2021-06-01 09:24:52 +0100 |
---|---|---|
committer | Sadik Armagan <sadik.armagan@arm.com> | 2021-06-02 13:00:56 +0000 |
commit | 483c811ea6fd0e7801aac1afd979ed02a649064b (patch) | |
tree | a0969c8786528334b62043b40983fa21d54d524e /src/backends/backendsCommon/test/layerTests/DebugTestImpl.cpp | |
parent | 31f86bfeb311ccc0c6ed94c35a78a51551148ea4 (diff) | |
download | armnn-483c811ea6fd0e7801aac1afd979ed02a649064b.tar.gz |
IVGCVSW-5962 Remove boost::multi_array
* Replaced all instances of boost::multi_array with flat vectors.
* Updated LayerTestResult struct with new member variables.
* Updated CompareTensor function to compare flat vectors and the shape.
* Removed MakeTensor function from TensorHelpers.hpp.
* Removed GetTensorShapeAsArray function from LayerTestResult.hpp.
* Removed boost::array usage.
* Removed boost::extents usages.
* Removed boost::random usages.
Signed-off-by: Matthew Sloyan <matthew.sloyan@arm.com>
Signed-off-by: Sadik Armagan <sadik.armagan@arm.com>
Change-Id: Iccde9d6640b534940292ff048fb80c00b38c4743
Diffstat (limited to 'src/backends/backendsCommon/test/layerTests/DebugTestImpl.cpp')
-rw-r--r-- | src/backends/backendsCommon/test/layerTests/DebugTestImpl.cpp | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/src/backends/backendsCommon/test/layerTests/DebugTestImpl.cpp b/src/backends/backendsCommon/test/layerTests/DebugTestImpl.cpp index f2127c0f0c..97204750d0 100644 --- a/src/backends/backendsCommon/test/layerTests/DebugTestImpl.cpp +++ b/src/backends/backendsCommon/test/layerTests/DebugTestImpl.cpp @@ -40,12 +40,10 @@ LayerTestResult<T, Dim> DebugTestImpl( outputTensorInfo.SetQuantizationOffset(qOffset); } - boost::multi_array<T, Dim> input = - MakeTensor<T, Dim>(inputTensorInfo, armnnUtils::QuantizedVector<T>(inputData, qScale, qOffset)); + std::vector<T> input = armnnUtils::QuantizedVector<T>(inputData, qScale, qOffset); - LayerTestResult<T, Dim> ret(outputTensorInfo); - ret.outputExpected = - MakeTensor<T, Dim>(outputTensorInfo, armnnUtils::QuantizedVector<T>(outputExpectedData, qScale, qOffset)); + std::vector<T> actualOutput(outputTensorInfo.GetNumElements()); + std::vector<T> expectedOutput = armnnUtils::QuantizedVector<T>(outputExpectedData, qScale, qOffset); ARMNN_NO_DEPRECATE_WARN_BEGIN std::unique_ptr<armnn::ITensorHandle> inputHandle = workloadFactory.CreateTensorHandle(inputTensorInfo); @@ -73,9 +71,12 @@ LayerTestResult<T, Dim> DebugTestImpl( BOOST_TEST(oss.str() == expectedStringOutput); - CopyDataFromITensorHandle(ret.output.data(), outputHandle.get()); + CopyDataFromITensorHandle(actualOutput.data(), outputHandle.get()); - return ret; + return LayerTestResult<T, Dim>(actualOutput, + expectedOutput, + outputHandle->GetShape(), + outputTensorInfo.GetShape()); } template <armnn::DataType ArmnnType, typename T = armnn::ResolveType<ArmnnType>> |