From ac2770a4bb6461bfbddec928bb6208f26f898f02 Mon Sep 17 00:00:00 2001 From: Narumol Prangnawarat Date: Wed, 1 Apr 2020 16:51:23 +0100 Subject: IVGCVSW-4485 Remove Boost assert * Change boost assert to armnn assert * Change include file to armnn assert * Fix ARMNN_ASSERT_MSG issue with multiple conditions * Change BOOST_ASSERT to BOOST_TEST where appropriate * Remove unused include statements Signed-off-by: Narumol Prangnawarat Change-Id: I5d0fa3a37b7c1c921216de68f0073aa34702c9ff --- src/armnn/layers/Convolution2dLayer.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/armnn/layers/Convolution2dLayer.cpp') diff --git a/src/armnn/layers/Convolution2dLayer.cpp b/src/armnn/layers/Convolution2dLayer.cpp index 55a243aa0b..d82908a128 100644 --- a/src/armnn/layers/Convolution2dLayer.cpp +++ b/src/armnn/layers/Convolution2dLayer.cpp @@ -49,7 +49,7 @@ void Convolution2dLayer::SerializeLayerParameters(ParameterStringifyFunction& fn std::unique_ptr Convolution2dLayer::CreateWorkload(const IWorkloadFactory& factory) const { // on this level constant data should not be released.. - BOOST_ASSERT_MSG(m_Weight != nullptr, "Convolution2dLayer: Weights data should not be null."); + ARMNN_ASSERT_MSG(m_Weight != nullptr, "Convolution2dLayer: Weights data should not be null."); Convolution2dQueueDescriptor descriptor; @@ -57,7 +57,7 @@ std::unique_ptr Convolution2dLayer::CreateWorkload(const IWorkloadFac if (m_Param.m_BiasEnabled) { - BOOST_ASSERT_MSG(m_Bias != nullptr, "Convolution2dLayer: Bias data should not be null."); + ARMNN_ASSERT_MSG(m_Bias != nullptr, "Convolution2dLayer: Bias data should not be null."); descriptor.m_Bias = m_Bias.get(); } return factory.CreateConvolution2d(descriptor, PrepInfoAndDesc(descriptor)); @@ -79,12 +79,12 @@ Convolution2dLayer* Convolution2dLayer::Clone(Graph& graph) const std::vector Convolution2dLayer::InferOutputShapes(const std::vector& inputShapes) const { - BOOST_ASSERT(inputShapes.size() == 2); + ARMNN_ASSERT(inputShapes.size() == 2); const TensorShape& inputShape = inputShapes[0]; const TensorShape filterShape = inputShapes[1]; // If we support multiple batch dimensions in the future, then this assert will need to change. - BOOST_ASSERT_MSG(inputShape.GetNumDimensions() == 4, "Convolutions will always have 4D input."); + ARMNN_ASSERT_MSG(inputShape.GetNumDimensions() == 4, "Convolutions will always have 4D input."); DataLayoutIndexed dataLayoutIndex(m_Param.m_DataLayout); @@ -117,13 +117,13 @@ void Convolution2dLayer::ValidateTensorShapesFromInputs() VerifyLayerConnections(1, CHECK_LOCATION()); // check if we m_Weight data is not nullptr - BOOST_ASSERT_MSG(m_Weight != nullptr, "Convolution2dLayer: Weights data should not be null."); + ARMNN_ASSERT_MSG(m_Weight != nullptr, "Convolution2dLayer: Weights data should not be null."); auto inferredShapes = InferOutputShapes({ GetInputSlot(0).GetConnection()->GetTensorInfo().GetShape(), m_Weight->GetTensorInfo().GetShape() }); - BOOST_ASSERT(inferredShapes.size() == 1); + ARMNN_ASSERT(inferredShapes.size() == 1); ConditionalThrowIfNotEqual( "Convolution2dLayer: TensorShape set on OutputSlot[0] does not match the inferred shape.", -- cgit v1.2.1