Hi Andreas, On Tue, 23 Nov 2010 02:20:49 +0100, Andreas <[email protected]> wrote: > 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. [ 3 more citation lines. Click/Enter to toggle visibility. ] > 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.
Events (and most other things) are cleaned up automatically by the
garbage collector--there shouldn't be any left behind. There is (by
design!) no way to release events while they're still being referenced.
If you want to check whether PyOpenCL did all the cleanup properly, just
enable CL_TRACE=1 in siteconf.py, do 'rm -Rf build' and then reinstall.
> 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).
I can't reproduce this at this point, in a large part because I'm
currently using Nvidia's CL 1.1 conformance candidate. In addition, the
command line profiler (used by setting {CL_,COMPUTE_}PROFILE=1) works
like a charm on your code.
Hope this helps at least a bit,
Andreas
pgpekIC0cj1ip.pgp
Description: PGP signature
_______________________________________________ PyOpenCL mailing list [email protected] http://lists.tiker.net/listinfo/pyopencl
