From 483c811ea6fd0e7801aac1afd979ed02a649064b Mon Sep 17 00:00:00 2001 From: Sadik Armagan Date: Tue, 1 Jun 2021 09:24:52 +0100 Subject: 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 Signed-off-by: Sadik Armagan Change-Id: Iccde9d6640b534940292ff048fb80c00b38c4743 --- src/armnnUtils/ParserPrototxtFixture.hpp | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'src/armnnUtils') diff --git a/src/armnnUtils/ParserPrototxtFixture.hpp b/src/armnnUtils/ParserPrototxtFixture.hpp index ad991efa36..0ff7e59ac2 100644 --- a/src/armnnUtils/ParserPrototxtFixture.hpp +++ b/src/armnnUtils/ParserPrototxtFixture.hpp @@ -193,12 +193,12 @@ void ParserPrototxtFixture::RunTest(const std::map> outputStorage; + std::map> outputStorage; armnn::OutputTensors outputTensors; for (auto&& it : expectedOutputData) { armnn::BindingPointInfo bindingInfo = m_Parser->GetNetworkOutputBindingInfo(it.first); - outputStorage.emplace(it.first, MakeTensor(bindingInfo.second)); + outputStorage.emplace(it.first, std::vector(bindingInfo.second.GetNumElements())); outputTensors.push_back( { bindingInfo.first, armnn::Tensor(bindingInfo.second, outputStorage.at(it.first).data()) }); } @@ -252,15 +252,16 @@ void ParserPrototxtFixture::RunTest(const std::map(bindingInfo.second, it.second); + auto outputExpected = it.second; + auto shape = bindingInfo.second.GetShape(); if (std::is_same::value) { - auto result = CompareTensors(outputExpected, outputStorage[it.first], true); + auto result = CompareTensors(outputExpected, outputStorage[it.first], shape, shape, true); BOOST_TEST(result.m_Result, result.m_Message.str()); } else { - auto result = CompareTensors(outputExpected, outputStorage[it.first]); + auto result = CompareTensors(outputExpected, outputStorage[it.first], shape, shape); BOOST_TEST(result.m_Result, result.m_Message.str()); } } -- cgit v1.2.1