pyopencl icon indicating copy to clipboard operation
pyopencl copied to clipboard

Maximum number of events in an array

Open tverho opened this issue 6 years ago • 2 comments

Currently the add_event() method in cl.array has a hard coded limit of 12 for the number of queued events. I think it would be better if this was a configurable property. I'm trying to use gpyfft while using the build-in event management in cl.array. However, gpyfft has a hard-coded limit DEF MAX_WAITFOR_EVENTS = 10 which is lower than in add_event() (and leads to an assertion error), basically forcing me to periodically call cl.array.finish() which is nonideal. I would like to be able to do

arr.set_max_events(10)

tverho avatar Dec 04 '19 21:12 tverho

I sympathize with this. Do you think this should be a global or per-array setting?

inducer avatar Dec 05 '19 23:12 inducer

Good point, maybe global. At least I cannot easily imagine a case where one would need to control it on a per array basis. Ultimately, I think it can be either way, it probably wouldn't be too cumbersome to set it for each array either, at least not in my case (I have only 2 arrays that are passed to gpyfft).

tverho avatar Dec 06 '19 01:12 tverho