You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
start = time.time()
for step in range(num_steps):
run_model()
xm.mark_step()
end = time.time()
Then end - start will only measure the tracing time. We'll need to do torch_xla.sync(wait=True) to block on device execution to measure the execution time.
We should document this in some "common FAQs/sharp edges" maybe
The text was updated successfully, but these errors were encountered:
📚 Documentation
If we write a loop like
Then
end - start
will only measure the tracing time. We'll need to dotorch_xla.sync(wait=True)
to block on device execution to measure the execution time.We should document this in some "common FAQs/sharp edges" maybe
The text was updated successfully, but these errors were encountered: