AnsweredAssumed Answered

subbuffer not working as expected

Question asked by zoli0726 on Dec 1, 2015
Latest reply on Dec 1, 2015 by nibal

Hi!

 

I want to use subbuffers to split work between devices.

The concept seems to fit my needs, but somehow, its not working as it is expected.

 

I implemented an app to test subbuffer usage, but it didn't work as i wanted.

I have a book called OpenCL Progamming Guide which was writted by OpenCL authorities, and i found a sample implementation in it  in demonstrating subbuffers, and the results are the same.

 

Could somebody check this sample source code, and tell me, what is wrong with it?

 

I would expect, and the authors too, that at the end, when the buffer was readed back, the calculation was split between the devices, and acts like one device did the calculation.

 

However its not what happens. The subbuffer results wont apear in the parent buffer.

 

The souce code can be downloaded from bgaster/opencl-book-samples · GitHub chapter 7. The NUM_BUFFER_ELEMENTS needs to be changed to 128 because of the memory alignment.

 

Thanks!

Outcomes