diff options
Diffstat (limited to 'opencl')
-rw-r--r-- | opencl/opencltest/main.cxx | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/opencl/opencltest/main.cxx b/opencl/opencltest/main.cxx index 0b1292e3e7a3..a499032f8c05 100644 --- a/opencl/opencltest/main.cxx +++ b/opencl/opencltest/main.cxx @@ -110,9 +110,9 @@ static void runTest(const char* deviceName, const char* devicePlatform) cl_program program = clCreateProgramWithSource(context, 1, source, sourceSize, &state); openclcheck(state); state = clBuildProgram(program, 1, &deviceId, nullptr, nullptr, nullptr); +#ifdef DBG_UTIL if (state != CL_SUCCESS) { -#ifdef DBG_UTIL size_t length; status = clGetProgramBuildInfo(program, deviceId, CL_PROGRAM_BUILD_LOG, 0, nullptr, &length); @@ -122,10 +122,9 @@ static void runTest(const char* deviceName, const char* devicePlatform) error[length] = '\0'; cerr << "OpenCL driver check build error:" << error.data() << endl; abort(); -#else - openclcheck(state); -#endif } +#endif + openclcheck(state); cl_kernel kernel = clCreateKernel(program, "testFunction", &state); openclcheck(state); |