Results 1 to 3 of 3

Thread: How to kill a hung/slow kernel

  1. #1
    Junior Member
    Join Date
    Nov 2009
    Posts
    2

    How to kill a hung/slow kernel

    Hi, newbie question here. I have started playing around with OpenCL. The application I'm thinking of would run an OpenCL kernel which will perform a possibly long computation that depends on user input. I want to give the user the option of aborting the computation if it takes too long (theoretically it could become stuck in an infinite loop, for example). However, in the OpenCL specification I see no documented way of killing an OpenCL kernel that is currently running, only the clFinish function call which just waits for the kernel to finish. Am I missing something here? Is it possible to do this? If not, why not, and is this something that might be added in the future?

  2. #2
    Senior Member
    Join Date
    Jul 2009
    Location
    Northern Europe
    Posts
    311

    Re: How to kill a hung/slow kernel

    This is not possible to do at the moment. You need to ensure that your kernels do not take too long. This is particularly true on systems where the display is sharing the GPU. In that case the operating system will generally impose a hard limit on how long your kernel can run, resulting in your program crashing if you run too long.

  3. #3
    Junior Member
    Join Date
    Nov 2009
    Posts
    2

    Re: How to kill a hung/slow kernel

    Thanks! Guess I'll have to be more careful about my architecture design. Would be nice if this option were added, though...

Similar Threads

  1. OpenCL slow compiling of multiple kernel code
    By chammakchallo in forum OpenCL
    Replies: 3
    Last Post: 02-13-2012, 08:45 AM
  2. HELP! SLOW
    By vega in forum OpenGL ES general technical discussions
    Replies: 1
    Last Post: 08-01-2005, 08:48 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •