aboutsummaryrefslogtreecommitdiff
path: root/tests/framework
diff options
context:
space:
mode:
authorAnthony Barbier <anthony.barbier@arm.com>2018-08-21 16:16:04 +0100
committerAnthony Barbier <anthony.barbier@arm.com>2018-11-02 16:54:54 +0000
commit80040bce896357fa15b7a6f05a624b9e18ee5821 (patch)
tree0a9bd5bf8fcf9d73134c97acc055c9d6f4723d05 /tests/framework
parent84cb75db5da157977a9c5b2dc5221d45dcdb926e (diff)
downloadComputeLibrary-80040bce896357fa15b7a6f05a624b9e18ee5821.tar.gz
COMPMID-1246: Check OpenCL is available before re-creating the CL Context and Queue
Change-Id: I0b0be0a86d43d87ea8225f6d5e5b02b0f80e6e3a Reviewed-on: https://eu-gerrit-1.euhpc.arm.com/145034 Reviewed-by: Michele DiGiorgio <michele.digiorgio@arm.com> Reviewed-by: Georgios Pinitas <georgios.pinitas@arm.com> Tested-by: Jenkins <bsgcomp@arm.com>
Diffstat (limited to 'tests/framework')
-rw-r--r--tests/framework/Framework.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/framework/Framework.cpp b/tests/framework/Framework.cpp
index 182e0babcd..eea7745230 100644
--- a/tests/framework/Framework.cpp
+++ b/tests/framework/Framework.cpp
@@ -532,7 +532,7 @@ bool Framework::run()
{
#ifdef ARM_COMPUTE_CL
// Every 5000 tests, reset the OpenCL context to release the allocated memory
- if((id_run_test % 5000) == 0)
+ if(opencl_is_available() && (id_run_test % 5000) == 0)
{
auto ctx_properties = CLScheduler::get().context().getInfo<CL_CONTEXT_PROPERTIES>(nullptr);
auto queue_properties = CLScheduler::get().queue().getInfo<CL_QUEUE_PROPERTIES>(nullptr);