- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
My kernel works on AMD and NVIDIA OpenCL, but for some specific test, it fails on Intel ocl with i7-7700k. it threw a segfault and crashed.
I want to find out where in my code had caused the issue. I wish there are some debugging tools, like valgrind, to print out the offending lines.
I installed oclgrind on my Ubuntu 16.04 box, for a small workload, it worked without any issue, no error was captured. but for large enough workload, oclgrind crashed too without printing anything useful related to my kernel!
simulation run# 1 ... /usr/bin/oclgrind: line 145: 7204 Killed LD_LIBRARY_PATH=$LIBDIR:$LD_LIBRARY_PATH LD_PRELOAD=$LIBDIR/liboclgrind-rt.so "$@"
does Intel OCL sdk have any tool for this purpose? I don't have a windows machine installed with intel ocl, so a command line tool is preferred.
thanks
PS: if you are interested in testing, here is my code
git clone https://github.com/fangq/mcxcl.git cd mcxcl/src make cd ../example/benchmark ../../bin/mcxcl -L ./run_benchmark2.sh -G ???
where ??? is an 01 string to select the CPU. for example, if the mcxcl -L command above lists 3 devices, the CPU is the 1st, you should use -G 1; if it is the 2nd, you should give -G 01, if it is the 3rd, use -G 001 and so on. You should see a segfault when running the last command.
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I added the "-g -s /path/to/kernel.cl" in the clbuildprogram options, and tried to run this in gdb, but every time gdb gives me a crash before the kernel is compiled
Program received signal SIGSEGV, Segmentation fault.
0x00007fffdf681148 in ?? ()
is this method obsolete? I tried both Ubuntu's default gdb and the gdb inside the sdk .../gt_debugger_2016.0/bin/gdb, same error.
please let me know how to debug cl code these days? thanks

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page