I've been trying to instrument an OpenCL application today to get in-application profiling. The application can be profiled without problems using CodeXL. However, when I try to use the GPUPerfAPI, I get a bluescreen. More specifically:
- Initialization works fine
- After the OpenCL command queue is created, I call GPA_OpenContext ()
- I can successfully query the performance counters
- I enabled one performance counter, "FetchSize"
- GPA_BeginSession (), GPA_BeginPass (), GPA_BeginSample () work fine
- Kernel executes correctly
- GPA_EndSession (), GPA_EndPass (), GPA_EndSample () work fine
- Calling GPA_IsSessionReady () results in a bluescreen, triggered from the PerfAPI DLL. Note: If I call clWaitForEvent on an event created before the kernel execution, I also get a bluescreen. Not sure if this problem is related.
All API calls returns success. The application is not started as elevated; starting it with administrator rights also results in a bluescreen. Is there some minimal example how to use the PerfAPI for OpenCL?