CPU <-> GPU transfers change/deviations of values possible?

Hello everyone,

I have a program with many transfers between CPU and GPU.
I do one calculation step on GPU, then I transfer the calculated values back to CPU to make some updates there. Then I transfer it to GPU again to make another calculation step; and so on…

I have recognized that there occur deviations of the values (floats) I transfer!
i. e. the more transfers I do, the more deviations of the transfered values occur.
Is that possible and normal? I don’t understand it, because on CPU the values are floats and on GPU the values are floats, too. (especially float4 but that shouldn’t matter, should it?)
Can these deviations take place by many GPU<–>CPU transfers or must there be another error I just haven’t found already?

Greetings,
Mirja

Most likely, it is a bug elsewhere in your code, possibly a use of uninitialized memory or writing past the end of an array. I have never found a CPU<->GPU memory copy to produce incorrect results.

If you are running on linux, you can compile in device emulation mode with debugging enabled and run your app through valgrind to discover uses of initialized memory or locations where you write past the end of an array.

Thank you for your answer!
Finally I’ve found an error elsewhere in my code. Now it works fine! :))
It’s good to know, that there won’t be deviations of values by CPU<->GPU transfers. :)