AnsweredAssumed Answered

Pinned memory transfer completion

Question asked by corry on May 9, 2012
Latest reply on May 9, 2012 by nou

So, after having some issues with kernels constantly transfering data, I switched over to pinned buffers...I thought I read they were automatically synchronized...and sure enough, eventually they are, but if you have something like

run kernel

do some CPU stuff

wait for kernel completion

map ram (which just returns the host pointer you provided)

the results from the previous kernel invocation aren't there yet.  Break in the debugger, and they're there.  Heck, sometimes by the time my CPU code to work with the results runs, the data is there, but sometimes not...I thought maybe it was a caching issue?  But the cached flag wasn't on for the buffer, and I even declared the buffer volatile with no go.

I tried looking on here for information, but didn't find much.  I even tried specifically copying the memory back, but ended up with all 0's!  Can someone tell me how to determine the transfer is complete/caches updated/whatever else might be taking time has completed?