From 4cefc4135f7fbf5c2ba532a4f5b14d2811f9ed9e Mon Sep 17 00:00:00 2001 From: Matthew Bentham Date: Tue, 18 Jun 2019 16:14:34 +0100 Subject: IVGCVSW-3307 Introduce RefTensorHandle Use it for intermediate tensors on reference backend. Lays the groundwork for memory management in the reference backend. Change-Id: I7d3ee132cac31bde70ae6e1b815f4f0b03d550a6 Signed-off-by: Matthew Bentham --- src/armnnUtils/TensorIOUtils.hpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'src/armnnUtils/TensorIOUtils.hpp') diff --git a/src/armnnUtils/TensorIOUtils.hpp b/src/armnnUtils/TensorIOUtils.hpp index bf5a37b00f..47e0a320b8 100644 --- a/src/armnnUtils/TensorIOUtils.hpp +++ b/src/armnnUtils/TensorIOUtils.hpp @@ -37,7 +37,11 @@ inline armnn::InputTensors MakeInputTensors( { if (value.size() != inputBinding.second.GetNumElements()) { - throw armnn::Exception("Input tensor has incorrect size"); + std::ostringstream msg; + msg << "Input tensor has incorrect size (expected " + << inputBinding.second.GetNumElements() << " got " + << value.size(); + throw armnn::Exception(msg.str()); } armnn::ConstTensor inputTensor(inputBinding.second, value.data()); @@ -84,4 +88,4 @@ inline armnn::OutputTensors MakeOutputTensors( return outputTensors; } -} // namespace armnnUtils \ No newline at end of file +} // namespace armnnUtils -- cgit v1.2.1