It would have eventually, if you'd run more iterations: each iteration leaks ~450 bytes before https://cgit.freedesktop.org/beignet/commit/?id=7ae1517cfc373847f168ffb3e41b635861af19c7 but ~20,000 bytes after. I suspect the reason for this is that events no longer release exec_data.gpgpu on completion (cl_enqueue.c part of that commit), to allow profiling timestamps to be read from it.
If you want a RAII interface, use opencl-clhpp-headers. (Or in theory pyopencl, but bug 1354086 also looks like an event object leak...)
It would have eventually, if you'd run more iterations: each iteration leaks ~450 bytes before https:/ /cgit.freedeskt op.org/ beignet/ commit/ ?id=7ae1517cfc3 73847f168ffb3e4 1b635861af19c7 but ~20,000 bytes after. I suspect the reason for this is that events no longer release exec_data.gpgpu on completion (cl_enqueue.c part of that commit), to allow profiling timestamps to be read from it.
If you want a RAII interface, use opencl- clhpp-headers. (Or in theory pyopencl, but bug 1354086 also looks like an event object leak...)