I'm trying to profile some PyOpenCL scripts using NVIDIA's Compute
Visual Profiler. However, I always receive an error suggesting I might
not have released some resources properly.
Some people at NVIDIA's OpenCL forum have run into the same error and
reported that including clReleaseEvent(event-name) at the end of their
code solved the problem.
I can't find a binding for this function in the PyOpenCL documentation,
and I'm curious if this feature is implemented or if anyone could send
me a script that currently works for their profiler.
I have included a condensed version of my code plus a file that can be
used to run the script through the profiler (the script was made to
investigate how strided access of global memory affects memory bandwidth).
The exact error message reads: "Compute Visual Profiler Error. Profiler
data file "path".csv does not contain profiler output. This can happen
when: a) Profiling is disabled... b)The application does not invoke any
kernels or memory transfers. c) The application does not release
resources (contexts, events, etc.). The program needs to be modified to
properly free up all resources before termination.
The PyOpenCL examples included in the download give similar errors.
- Andreas Reiten