-
Notifications
You must be signed in to change notification settings - Fork 451
[PyTorch Debug] More advanced stats for Quantized Tensors #1897
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
base: main
Are you sure you want to change the base?
Conversation
for more information, see https://pre-commit.ci
Signed-off-by: Pawel Gadzinski <pgadzinski@nvidia.com>
for more information, see https://pre-commit.ci
for more information, see https://pre-commit.ci
for more information, see https://pre-commit.ci
for more information, see https://pre-commit.ci
for more information, see https://pre-commit.ci
30688dd
to
b78a504
Compare
for more information, see https://pre-commit.ci
@@ -231,6 +233,9 @@ def inspect_tensor( | |||
tp_group: torch.distributed.ProcessGroup, | |||
) -> None: | |||
""" | |||
This is legacy call, we advise to use *inspect_tensor_all* and *inspect_tensor_all_enabled* instead. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we don't want users to call inspect_tensor
and other legacy functions, we should raise a deprecation warning.
Also, it seems like a shame to so quickly abandon these function names and replace them with clunky _all
variants. Is there a way to maintain backward compatibility? Maybe have kwargs like high_precision_tensors
and quantized_tensors
, and have quantized_tensors=False
by default.
It allows to inspect both quantized and high precision tensors. | ||
The feature LogFp8TensorStats uses this call to collect FP8 statistics after the quantization. | ||
|
||
If tensor and the transpose are quantized differently |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Accidentally deleted some of the docstring?
Description
This PR adds more statistics for Quantized Tensors that can be used to debug FP8 convergence issues.
It also adds inspect_tensor_all api call, which was necessary to support this features.
Type of change
Documentation change (change only to the documentation, either a fix or a new content)
Bug fix (non-breaking change which fixes an issue)
New feature (non-breaking change which adds functionality)
Breaking change (fix or feature that would cause existing functionality to not work as expected)
Infra/Build change
Code refactoring
I have read and followed the contributing guidelines
The functionality is complete
I have commented my code, particularly in hard-to-understand areas
I have made corresponding changes to the documentation
My changes generate no new warnings
I have added tests that prove my fix is effective or that my feature works
New and existing unit tests pass locally with my changes