Visible to Intel only — GUID: GUID-40BCB6B6-59C7-4EFE-B57D-876392D155BD
Visible to Intel only — GUID: GUID-40BCB6B6-59C7-4EFE-B57D-876392D155BD
Enabling Debugging in OpenCL™ Runtime
To enable debugging mode in the Intel® OpenCL™ Runtime for compiling OpenCL code using Intel® SDK for OpenCL™ Applications - Debugger plug-in for Microsoft Visual Studio* IDE, do the following:
- Add the -g flag to the build options string parameter in the clBuildProgram function.
Specify full path to the file in the build options string parameter to the clBuildProgram function accordingly (including the CL file name):
-s <full path to the OpenCL source file>
If the path includes spaces, enclose the entire path with double quotes.
For example:
err = clBuildProgram( g_program, 0, NULL, "-g -s \"<path_to_opencl_source_file>\"", NULL, NULL);
According to the OpenCL standard, work-items execute OpenCL kernels simultaneously. The Debugger requires setting the global ID of the work-item to debug before the debugging session starts. The Debugger stops on breakpoints in OpenCL code only when the pre-set work-item reaches them.