diff options
Diffstat (limited to 'src/backends/cl/workloads/ClConstantWorkload.cpp')
-rw-r--r-- | src/backends/cl/workloads/ClConstantWorkload.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/backends/cl/workloads/ClConstantWorkload.cpp b/src/backends/cl/workloads/ClConstantWorkload.cpp index bbf6476c0a..619c0f8a11 100644 --- a/src/backends/cl/workloads/ClConstantWorkload.cpp +++ b/src/backends/cl/workloads/ClConstantWorkload.cpp @@ -1,5 +1,5 @@ // -// Copyright © 2017-2018,2020-2023 Arm Ltd and Contributors. All rights reserved. +// Copyright © 2017-2018,2020-2024 Arm Ltd and Contributors. All rights reserved. // SPDX-License-Identifier: MIT // @@ -61,7 +61,7 @@ void ClConstantWorkload::Execute() const { const ConstantQueueDescriptor& data = this->m_Data; - ARMNN_ASSERT(data.m_LayerOutput != nullptr); + ARMNN_THROW_INVALIDARG_MSG_IF_FALSE(data.m_LayerOutput, "Output tensor handle is null."); arm_compute::CLTensor& output = static_cast<ClTensorHandle*>(data.m_Outputs[0])->GetTensor(); arm_compute::DataType computeDataType = static_cast<ClTensorHandle*>(data.m_Outputs[0])->GetDataType(); @@ -105,8 +105,7 @@ void ClConstantWorkload::Execute() const } default: { - ARMNN_ASSERT_MSG(false, "Unknown data type"); - break; + throw InvalidArgumentException("Unknown data type."); } } |