View Full Version : cl_mem and devices inside a context...
07-26-2009, 04:59 AM
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?
07-27-2009, 09:41 AM
07-29-2009, 06:46 AM
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!
07-29-2009, 03:01 PM
clEnqueueRead has a one to one mapping with a device trough the clQueue object.
07-29-2009, 10:29 PM
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!
Powered by vBulletin® Version 4.2.2 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.