cancel
Showing results for 
Search instead for 
Did you mean: 

Archives Discussions

dvora
Adept I

OpenCL communication management on APU

Hi,

I am new to OpenCL and there is something that I do not really understand about OpenCL programming on APUs.

I know that on a classic CPU+GPU combination, I will have to add explicit communications to describe the data movement between the CPU and the GPU. But is it the same for APUs ? or the fact that they are both on the same chip implies that explicit communications aren't required anymore ?

Thanks a lot!

1 Solution
dipak
Big Boss

From OpenCL point of view, GPU device of the APU is still a separate GPU device which is very similar to any other dGPU. OpenCL does not treat APU as any special device and hence, programming is very similar as normal CPU + GPU system.

However, programmers can considers the architectural improvements made on APUs and, based on the targeted APUs, can use certain assumptions/techniques which may boost the data sharing between host and GPU. For example, on certain systems, memory mapping/un-mapping would be faster than memory copy as the runtime may handle it more efficiently.

Whatever may be the procedure, users need to call the required synchronization APIs to maintain the data consistency mentioned by the OpenCL spec. Otherwise, the program may loose portability and correctness on other systems or even across drivers/runtimes.

Regards,

View solution in original post

4 Replies
pinform
Staff

Hi,

I have white-listed you, so you should be able to post in the OpenCL (or any other dev forum) directly. I'm moving this post to the OpenCL forum -- the experts there should help.

--Prasad

0 Likes

Thank you !!!

0 Likes
dipak
Big Boss

From OpenCL point of view, GPU device of the APU is still a separate GPU device which is very similar to any other dGPU. OpenCL does not treat APU as any special device and hence, programming is very similar as normal CPU + GPU system.

However, programmers can considers the architectural improvements made on APUs and, based on the targeted APUs, can use certain assumptions/techniques which may boost the data sharing between host and GPU. For example, on certain systems, memory mapping/un-mapping would be faster than memory copy as the runtime may handle it more efficiently.

Whatever may be the procedure, users need to call the required synchronization APIs to maintain the data consistency mentioned by the OpenCL spec. Otherwise, the program may loose portability and correctness on other systems or even across drivers/runtimes.

Regards,

Thank you so much for the answer, that really helps me a lot !!

0 Likes