From c1745c5c8a2d3bcb9e8945b9c8b8fe67100db176 Mon Sep 17 00:00:00 2001 From: Victor Lopez Date: Fri, 22 Jun 2018 17:09:02 +0200 Subject: [PATCH] Disable OpenCL context release on finalization Close #1244 --- src/arch/opencl/openclprocessor.cpp | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/src/arch/opencl/openclprocessor.cpp b/src/arch/opencl/openclprocessor.cpp index 0da9cd22b..4219244b5 100644 --- a/src/arch/opencl/openclprocessor.cpp +++ b/src/arch/opencl/openclprocessor.cpp @@ -96,12 +96,15 @@ OpenCLAdapter::~OpenCLAdapter() ++i ) clReleaseProgram( i->second ); - errCode = clReleaseContext( _ctx ); - - //Invalid context means it was already released by another thread - if( errCode != CL_SUCCESS && errCode != CL_INVALID_CONTEXT){ - warning0( "Unable to release the context" ); - } + + /* Disabling context relase. See #1244 + */ + /* errCode = clReleaseContext( _ctx ); */ + + /* //Invalid context means it was already released by another thread */ + /* if( errCode != CL_SUCCESS && errCode != CL_INVALID_CONTEXT){ */ + /* warning0( "Unable to release the context" ); */ + /* } */ } bool OpenCLAdapter::outOfOrderSupport(){ -- GitLab