I want to debug my OpenCL Code via Intel SDK and visual studio 2013, but the debugger don't stop at the breakpoints. I enabled OpenCL Kernel debugging and set the buildoption to -g -s and added a breakpoint in the opencl code (I also do't use any offset).
I've also tried all the voodoo mentioned elsewhere including.
- Setting a breakpoint at (/behind) the creation of the context.*
- Using only Visual Studio Instance the same time
- spitting three times beyond the left shoulder before starting debugging
- ...
but nothing worked. Any suggestions?
*This leads to the following, before reaching the breakpoint the OCL-Breakpoints are marked as non-reachable and afterwards they are shown reachable with file and line of code.
Which Device do you use for debug? Only intel CPU is allowed for debugging with intel SDK. intel graphics wont work.
Check the following: Do you use the intel compiler instead of MSVC compiler? right click the project -> convert to opencl project / use intel c++ compiler
Compiler settings: Code_builder menue -> opencl debugger -> options
check "enable opencl kernel debugging" specify a work item you want to debug (0,0,0 is fine and the frist thread if you only use a global workgrp size and no local)
tab api debugger: check enable opencl api debugger
after -g -s you must add the path to the kernel like:
Did you hand over the options char* to the clBuildProgram like this?
Make sure you use the intel opencl libs and not any other opencl libs.
For correct setup with Vstudio look here:
intel guide