Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Document the difference between tracing time and execution time #8858

Open
tengyifei opened this issue Mar 19, 2025 · 0 comments
Open

Document the difference between tracing time and execution time #8858

tengyifei opened this issue Mar 19, 2025 · 0 comments
Labels
documentation enhancement New feature or request

Comments

@tengyifei
Copy link
Collaborator

📚 Documentation

If we write a loop like

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

@ysiraichi ysiraichi added the enhancement New feature or request label Mar 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants