I think it depends a bit what you actually want to measure. If you want to measure the entire runtime of the script you could run it via time python script.py and make sure the execution is indeed finished e.g. by manually synchronizing or by printing a value of the result.
Manual syncs are needed, if you want to measure the actual GPU runtime since CUDA code is executed asynchronously.