Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

enqueueXXX with events true extreamly slow after many iterations (NVIDIA) #47

Open
jeremydiviney opened this issue Jul 6, 2016 · 1 comment

Comments

@jeremydiviney
Copy link

after a few thousand iterations of this kind of loop

{
kernel_events = cl.enqueueNDRangeKernel(.......,true)
read_event =cl.enqueueReadBuffer(.......,true)
cl.waitForEvents([read_event]);
}

on my NVIDIA SDK/hardward (GTX 970), it start getting very very slow, like 1000x slower than the loop take for the first few thousand iteration.

The only thing that prevents this is passing false on the last parament, so no events are returned, this it runs fine for basically unlimited iterations.

on a side now, it also seems like with the NVIDIA SDK, the enqeueXXX functions block on their own without doing waitForEvents or cl.finish etc...

@mikeseven
Copy link
Owner

You must release events when you don't use them otherwise it will wait for thousands of events that will also creep memory.

-- mike

On Wed, Jul 6, 2016 at 12:15 AM -0700, "jeremydiviney" <[email protected]mailto:[email protected]> wrote:

after a few thousand iterations of this kind of loop

{
kernel_events = cl.enqueueNDRangeKernel(.......,true)
read_event =cl.enqueueReadBuffer(.......,true)
cl.waitForEvents([read_event]);
}

on my NVIDIA SDK/hardward (GTX 970), it start getting very very slow, like 1000x slower than the loop take for the first few thousand iteration.

The only thing that prevents this is passing false on the last parament, so no events are returned, this it runs fine for basically unlimited iterations.

on a side now, it also seems like with the NVIDIA SDK, the enqeueXXX functions block on their own without doing waitForEvents or cl.finish etc...

You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHubhttps://github.com//issues/47, or mute the threadhttps://github.com/notifications/unsubscribe/AAxYLEcsD7x-3f3Odswu8Mw3MkF1CYRrks5qS1X2gaJpZM4JFz-o.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants