Results 1 to 4 of 4

Thread: Is write/read buffer a work on cpu or gpu side?

  1. #1
    Junior Member
    Join Date
    Aug 2011
    Posts
    20

    Is write/read buffer a work on cpu or gpu side?

    When I execute clEnqueueReadBuffer/clEnqueueWriteBuffer, does CPU or GPU handle the work (i.e. which device perform the copy when it is necessary)?

    If CPU handle that job, what is it doing when I try to read one buffer after another. Does it wait for the first one to finish? Does it create another CPU thread to copy the data concurrently?

  2. #2
    Senior Member
    Join Date
    May 2010
    Location
    Toronto, Canada
    Posts
    845

    Re: Is write/read buffer a work on cpu or gpu side?

    When I execute clEnqueueReadBuffer/clEnqueueWriteBuffer, does CPU or GPU handle the work (i.e. which device perform the copy when it is necessary)?
    That is implementation-dependent. It will depend on a number of factors. It's actually fairly complicated.

    If CPU handle that job, what is it doing when I try to read one buffer after another. Does it wait for the first one to finish? Does it create another CPU thread to copy the data concurrently?
    Whether it has to wait for the first one to finish or not will depend on whether the application made a blocking read or a non-blocking read. If the first read was non-blocking it's possible that the second read will happen concurrently with the first.
    Disclaimer: Employee of Qualcomm Canada. Any opinions expressed here are personal and do not necessarily reflect the views of my employer. LinkedIn profile.

  3. #3
    Junior Member
    Join Date
    Aug 2011
    Posts
    20

    Re: Is write/read buffer a work on cpu or gpu side?

    Quote Originally Posted by david.garcia
    Quote:
    That is implementation-dependent. It will depend on a number of factors. It's actually fairly complicated.
    Can you give me examples?

  4. #4
    Senior Member
    Join Date
    May 2010
    Location
    Toronto, Canada
    Posts
    845

    Re: Is write/read buffer a work on cpu or gpu side?

    [quote:1z38s8nc]That is implementation-dependent. It will depend on a number of factors. It's actually fairly complicated.
    Can you give me examples?[/quote:1z38s8nc]

    Sorry, that would be proprietary information. In any case that information would not be useful to someone writing an application.
    Disclaimer: Employee of Qualcomm Canada. Any opinions expressed here are personal and do not necessarily reflect the views of my employer. LinkedIn profile.

Similar Threads

  1. Unittesting Image Read an write
    By clint3112 in forum OpenCL
    Replies: 1
    Last Post: 02-09-2013, 08:21 AM
  2. OpenCL Image Read/Write problem
    By Xor in forum OpenCL
    Replies: 2
    Last Post: 03-27-2012, 11:51 PM

Posting Permissions

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