Open source OpenCL logging tool
Open source OpenCL logging tool
- Subject: Open source OpenCL logging tool
- From: Garrick Meeker <email@hidden>
- Date: Tue, 14 May 2013 10:31:10 -0700
With all this recent OpenCL discussion, I'd like to mention that Digital Anarchy has just released an open source OpenCL logging and tracking tool. While it's marked as beta, I have used it with Beauty Box and it's already a useful tool.
http://sourceforget.net/projects/clintercept
CLIntercept inserts itself between a program and the OpenCL library. It bares a resemblance to GLIntercept or certain malloc implementations. CLIntercept can currently perform the following tasks:
- Log all OpenCL calls (to a file, the console, or using NSLog).
- Log only OpenCL errors.
- Time all "expensive" OpenCL calls, or just the kernel execution.
- List OpenCL devices and attributes (at startup, or with a separate "clinfo" executable).
- Modify the devices or extensions that are returned to the program.
It can also track OpenCL objects, and perform checks for leaks, mismatched calls to retain/release, situations that are not thread safe, errors with mapped images or buffers, including buffer overwrites. Any of these can be missed by the OpenCL implementation and led to incorrect behavior or even crash the system.
The following are not implemented yet:
- Kernel bounds checking is not implemented. (That would require a full OpenCL source code parser and preprocessor, and it's easier to modify kernel source code manually to do this.)
- Detect cases where an object is referenced by a second thread before associated OpenCL commands have finished.
This is not a general debugger for OpenCL kernel code.
Example:
For a quick demonstration you can run the test program like this:
DYLD_INSERT_LIBRARIES=/my/install/path/libCLIntercept.dylib CLINT_CHECK_ALL=1 CLINT_EMBEDDED=1 ./test_clint all
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Pro-apps-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden