aboutsummaryrefslogtreecommitdiff
path: root/src/runtime/CL
diff options
context:
space:
mode:
authorSiCong Li <sicong.li@arm.com>2023-11-14 15:17:10 +0000
committerSiCong Li <sicong.li@arm.com>2023-11-15 14:03:18 +0000
commitd4650e9e98c8f854776ae78fb6d3e46e7fe4ba20 (patch)
treed6b9d344884e3fae80561322f176c23903bf9707 /src/runtime/CL
parentec2afd695381d90eb3aabf4a61059ff313f9a0d2 (diff)
downloadComputeLibrary-d4650e9e98c8f854776ae78fb6d3e46e7fe4ba20.tar.gz
Fix various coverity issues
Resolves COMPMID-6677 Signed-off-by: SiCong Li <sicong.li@arm.com> Change-Id: I99bf2385f6edc0836faacb31f5c66ed4fb051e40 Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/10729 Benchmark: Arm Jenkins <bsgcomp@arm.com> Reviewed-by: Viet-Hoa Do <viet-hoa.do@arm.com> Comments-Addressed: Arm Jenkins <bsgcomp@arm.com> Tested-by: Arm Jenkins <bsgcomp@arm.com>
Diffstat (limited to 'src/runtime/CL')
-rw-r--r--src/runtime/CL/CLMemoryRegion.cpp11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/runtime/CL/CLMemoryRegion.cpp b/src/runtime/CL/CLMemoryRegion.cpp
index 835958b816..c9ddf9b85c 100644
--- a/src/runtime/CL/CLMemoryRegion.cpp
+++ b/src/runtime/CL/CLMemoryRegion.cpp
@@ -26,6 +26,8 @@
#include "arm_compute/core/Error.h"
#include "arm_compute/runtime/CL/CLScheduler.h"
+#include "src/common/utils/Log.h"
+
namespace arm_compute
{
ICLMemoryRegion::ICLMemoryRegion(size_t size)
@@ -72,7 +74,14 @@ CLBufferMemoryRegion::~CLBufferMemoryRegion()
// Flush the command queue to ensure all commands that may use this memory buffer are scheduled to be finished before
// this buffer is freed
// Do not call finish as it is a blocking call which affects the performance
- CLScheduler::get().queue().flush();
+ try
+ {
+ CLScheduler::get().queue().flush();
+ }
+ catch (const std::exception &e)
+ {
+ ARM_COMPUTE_LOG_ERROR_ACL(e.what());
+ }
}
void *CLBufferMemoryRegion::ptr()