Repository navigation
[LTC] Replace XLA_VALUE_METRIC with TORCH_LAZY_VALUE_METRIC - #4245
Merged
Merged
Conversation
alanwaketan
marked this pull request as draft
November 24, 2022 01:15
alanwaketan
force-pushed
the
alanwaketan/metrics
branch
from
November 24, 2022 01:21
991bf20 to
bd5ceb6
Compare
alanwaketan
marked this pull request as ready for review
November 24, 2022 01:22
alanwaketan
force-pushed
the
alanwaketan/metrics
branch
from
November 24, 2022 08:05
3934ffe to
11868b0
Compare
Summary: This pull request replaces all XLA_VALUE_METRIC in pytorch/xla with upstream TORCH_LAZY_VALUE_METRIC. Test Plan: PJRT_DEVICE=CPU python test/test_metrics.py
alanwaketan
force-pushed
the
alanwaketan/metrics
branch
from
November 24, 2022 21:25
11868b0 to
640a5b8
Compare
JackCaoG
reviewed
Nov 28, 2022
| # TODO(jwtan): Add test to cover TrimIrGraph, SyncTensorsToData, TransferToServerAsync, IrValueTensorToXlaData | ||
| xla_device = xm.xla_device() | ||
| t1 = torch.tensor(1456, device=xla_device) | ||
| t1 = torch.tensor(2077, device=xla_device) |
Collaborator
Author
There was a problem hiding this comment.
It looks like somehow we cache the device data in the server? If we reuse the same value for the scalar tensor, TransferToServerTime will be omitted in some of the tests.
pytorchmergebot
pushed a commit
to pytorch/pytorch
that referenced
this pull request
Nov 28, 2022
Summary: This change allow MetricsArena to ResetMetrics too. And then rename Reset to ResetCounters given that's what it does for real. This matches pytorch/xla#4109, and is paired with pytorch/xla#4245. Test Plan: CI. Pull Request resolved: #89606 Approved by: https://github.com/JackCaoG
alanwaketan
added a commit
that referenced
this pull request
Nov 28, 2022
Summary: This patch just simply replaces XLA_TIMED with TORCH_LAZY_TIMED. TORCH_LAZY_TIMED means timed metrics. Most of the work has been done by #4245. Test Plan: PJRT_DEVICE=CPU python test/test_metrics.py
alanwaketan
added a commit
that referenced
this pull request
Nov 29, 2022
Summary: This patch just simply replaces XLA_TIMED with TORCH_LAZY_TIMED. TORCH_LAZY_TIMED means timed metrics. Most of the work has been done by #4245. Test Plan: PJRT_DEVICE=CPU python test/test_metrics.py
kulinseth
pushed a commit
to kulinseth/pytorch
that referenced
this pull request
Dec 10, 2022
Summary: This change allow MetricsArena to ResetMetrics too. And then rename Reset to ResetCounters given that's what it does for real. This matches pytorch/xla#4109, and is paired with pytorch/xla#4245. Test Plan: CI. Pull Request resolved: pytorch#89606 Approved by: https://github.com/JackCaoG
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary:
This pull request replaces all XLA_VALUE_METRIC in pytorch/xla with upstream
TORCH_LAZY_VALUE_METRIC.
This is paired with pytorch/pytorch#89606.
Test Plan:
PJRT_DEVICE=CPU python test/test_metrics.py