Hi,
As I said above, the cuda API is fully asynchronous. So it is expected that measuring time without synch is “very fast” but then the synchronization is “slower”.
That’s because the first time just measure how long it takes to queue work for your GPU while the second waits for the computations to actually happen.
Depending on your GPU and the exact computations you do, 800ms to compute a batch of 512 samples isn’t that surprising really.