Results 1 to 6 of 6

Thread: Async kernel execution and data copy

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

    Async kernel execution and data copy

    Hi all,

    Is it possible to copy data to the gpu while a kernel is executing? As there is no concurrent kernel execution so far this would be better than nothing...

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

    Re: Async kernel execution and data copy

    If you have a command queue that is out-of-order, then OpenCL is free to do this if the hardware and runtime support it. Additionally, in-order queues could legally do this if they can prove that the memory model will remain consistent. However, this is an optimization that is entirely up to the vendor, so there is no specific way (short of specifying an out-or-order command queue) to do this.

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

    Re: Async kernel execution and data copy

    I have CL_QUEUE_OUT_OF_ORDER_EXEC_MODE_ENABLE as one of the queue properties, so I think I'm good.

    So what you're saying is that there's no way of controlling it and it depends on the implementation? I'm confused, because in CUDA this can be done but you need to define a couple of streams and, as far as I knows, it only works with mapped memory...

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

    Re: Async kernel execution and data copy

    That's correct. The OpenCL model is inherently asynchronous (hence the clEnqueue... commands) so if the implementation is well optimized and the hardware supports it you should get that automatically.

  5. #5

    Re: Async kernel execution and data copy

    How to check if the hardwords support it ? Sorry just curious and I'm such a newbie...

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

    Re: Async kernel execution and data copy

    You'd have to ask the vendors what the particular device supports. I know many GPUs have at least some DMA capability, but whether that is used by OpenCL is a completely different issue. Given how new OpenCL is I doubt this optimization has been done yet.

Similar Threads

  1. Does glTexImage2D copy the texture data?
    By maximus-dev in forum OpenGL ES 1.X - fixed function hardware
    Replies: 2
    Last Post: 04-27-2010, 07:00 AM
  2. Replies: 10
    Last Post: 02-12-2010, 04:56 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
  •