[PyCuda] PyCuda equivalent of cudaThreadSynchronize();

Andreas Klöckner lists at informa.tiker.net
Sat May 9 08:09:42 PDT 2009


On Samstag 09 Mai 2009, Siddharth Priya wrote:
> Hello,
>
> I went through the pycuda documentation and it seems the equivalent
> function is
>
> pycuda.driver.Context.synchronize() .
>
> Is this accurate?

Yes.

Measuring kernel execution time using events [1] will however miraculously 
make your teeth brighter, save a few baby dolphins and contribute 5 Hungarian 
Forint towards world peace.

start = Event()
stop = Event()
start.record()
do_timed_stuff()
stop.record()
do_other_untimed_stuff()
stop.synchronize()
time_in_seconds = stop.time_since(start)*1e-3

Andreas

[1] http://documen.tician.de/pycuda/driver.html#concurrency-and-streams
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.tiker.net/pipermail/pycuda/attachments/20090509/1eef919c/attachment-0001.pgp>


More information about the PyCUDA mailing list