Results 1 to 5 of 5

Thread: cl_mem and devices inside a context...

  1. #1
    Junior Member
    Join Date
    Mar 2009
    Posts
    12

    cl_mem and devices inside a context...

    I have a basic doubt about cl_mem thing..

    Say, I have a context made out of 2 CUDA GPUs. Now I create a cl_mem structure on top of it...

    Later, I issue a clEnqueueRead... request to read that buffer...

    Now, how much of that buffer comes from device 0 and how much comes from device 1?

  2. #2
    Junior Member
    Join Date
    Jun 2009
    Posts
    4

    Re: cl_mem and devices inside a context...


  3. #3
    Junior Member
    Join Date
    Mar 2009
    Posts
    12

    Re: cl_mem and devices inside a context...

    pmdinu, Thanks for your reply.

    I still have some questions...

    Now, I understand that cl_mem buffer is associated with both devices...in the context. Fine.

    So, when I spawn a kernel, and if the kernel that runs on both the devices update this buffer -- what happens??

    WIll it not result in confusion?

    Glad if some1 could help me out here. Thanks!

  4. #4
    Junior Member
    Join Date
    Jun 2009
    Posts
    4

    Re: cl_mem and devices inside a context...

    Hi Sarnath,
    clEnqueueRead has a one to one mapping with a device trough the clQueue object.

    pmdinu

  5. #5
    Junior Member
    Join Date
    Mar 2009
    Posts
    12

    Re: cl_mem and devices inside a context...

    pmdinu,

    You opened my eyes.. I did not realize that command queue is device specific... Hmm....

    Interesting... So, it is logically like dividing a buffer across multiple devices...

    Okay, Thanks for the info!!!

    That REALLY helped!

    Best Regards,
    Sarnath

Similar Threads

  1. Creating context using multiple devices from openGL context
    By ducese in forum OpenCL - parallel programming of heterogeneous systems
    Replies: 2
    Last Post: 04-26-2010, 08:38 PM
  2. Buffer and context with multi devices
    By matrem in forum OpenCL - parallel programming of heterogeneous systems
    Replies: 2
    Last Post: 12-12-2009, 08:22 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
  •