Hi,
I have the following code :
int updateDataSet = MustUpdateDataSet(...);
if (updateDataSet)
kernel->setArg(i++, *dataSet);
What I would like is to avoid to send each time the 'dataset' to the GPU because it has already been sent !
So, my question is... can I do this this ? or I MUST ALWAYS set the argument ?
But if I must always use 'setArgs' ... how can I avoid to re-transfer each time the huge (a same) set of datas ?
kernel remeber kernel arguments between invocations. so you need set args only once.
second even if you set arg you do not send that dataset to the card if they are on the card allready. buffers are sended at kernel launch.
Thanks,
Ok, but then... if I change the content of my buffer... how I FORCE the memory transfer ?
You say 'buffers are sended at kernel launch'... you mean 'at the first launch' because I call several time the same kernel.
if you enqueue write into buffer then it must send over buffer over PCIe. use events to get proper synchronization.
I don't understand 😛 sorry...
If I modify something in a char buffer
charbuffer[52] = '*';
How can I force an update ?
Thanks