cancel
Showing results for 
Search instead for 
Did you mean: 

Archives Discussions

ThomasUCF
Journeyman III

Multiple GPU opencl programming problem

where is the buffer belong to?

 

  Hello, here I have a problem that is bothering me:

I have 4 GPUs in my system, they share the context, prlgram, buffer.

But it seems that only GPU[0] can use this buffer, other GPUs can not use the buffer.

So which GPU exactly does that buffer belongs to ? Can anyone help me.

Thank you.

0 Likes
5 Replies
ThomasUCF
Journeyman III

By the way, the "simpleMultidevice" in the SDK sample seems not correct.

0 Likes

The buffer is created on all the devices which share a context. Why do you think the sample SimpleMultiDevice is incorrect?

0 Likes

 

  Hi Priyadarshi:

     Please take a look at the kernel code, the first argument is  * output, the second argument is * input, it is reversed.

   Can you explain that?

Thanks a lot.

0 Likes

I have a question about this topic too, just for clarification.

 

1. If I create a Context using say a CPU and 2 GPUs and create a buffer object in this context, it will be created in all Devices, right?

2. If I enqueue a kernel using one of the Devices and it modifies the buffer will the information sync? I mean will the information be updated in all Devices?

Thanks

0 Likes

1. yes.

2. yes but you need sync this kernels ith event if they depend on each other.

0 Likes