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

Record the lazy tracing time(C++) in metrics #5757

Merged
merged 3 commits into from
Nov 14, 2023
Merged

Conversation

JackCaoG
Copy link
Collaborator

@JackCaoG JackCaoG commented Nov 2, 2023

This way we at least know how long it takes to trace the op in C++ PyTorch/XLA land.

upstream pr pytorch/pytorch#112679 (comment)

Copy link
Collaborator

@wonjoolee95 wonjoolee95 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! Kokoro CI seems to fail because it can't recognize the new metric name, is this expected because it requires an upstream PyTorch pin?

@JackCaoG
Copy link
Collaborator Author

JackCaoG commented Nov 2, 2023

hmm, not sure I can rerun the CI once upstream thing merged

t1 = torch.tensor(156, device=xla_device)
t2 = t1 + 100
self.assertIn('LazyTracing', met.metric_names())
self.assertGreater(met.metric_data('LazyTracing')[0], 1)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So the op counter will still be int? But adding another LazyTracing metrics?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yea.

Copy link
Collaborator

@alanwaketan alanwaketan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

@JackCaoG JackCaoG merged commit 58ce7e1 into master Nov 14, 2023
17 of 18 checks passed
mbzomowski pushed a commit to mbzomowski-test-org/xla that referenced this pull request Nov 16, 2023
* Record the lazy tracing time(C++) in metrics

* Delete torch_patches/.torch_pin
zpcore pushed a commit that referenced this pull request Nov 21, 2023
* Record the lazy tracing time(C++) in metrics

* Delete torch_patches/.torch_pin
lsy323 pushed a commit to lsy323/xla that referenced this pull request Nov 28, 2023
* Record the lazy tracing time(C++) in metrics

* Delete torch_patches/.torch_pin
chunnienc pushed a commit to chunnienc/xla that referenced this pull request Dec 14, 2023
* Record the lazy tracing time(C++) in metrics

* Delete torch_patches/.torch_pin
golechwierowicz pushed a commit that referenced this pull request Jan 12, 2024
* Record the lazy tracing time(C++) in metrics

* Delete torch_patches/.torch_pin
bhavya01 pushed a commit that referenced this pull request Apr 22, 2024
* Record the lazy tracing time(C++) in metrics

* Delete torch_patches/.torch_pin
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants