Skip to content

[DO NOT REVIEW] debug float8 all-gather numerics - #873

Open
weifengpy wants to merge 27 commits into
pytorch:mainfrom
weifengpy:numerics
Open

weifengpy wants to merge 27 commits into
pytorch:mainfrom
weifengpy:numerics

Conversation

@weifengpy

@weifengpy weifengpy commented Sep 11, 2024 •

Copy link
Copy Markdown
Contributor

repro numeric difference with single Float8Linear module with/without float8 all-gather

repro: TORCH_LOGS="output_code" pytest -s test/float8/test_fsdp2/test_fsdp2.py -k test_float8_linear_parity 2>&1 | tee test_float8_linear_parity.log

patch pytorch with following

diff --git a/torch/distributed/_composable/fsdp/_fsdp_collectives.py b/torch/distributed/_composable/fsdp/_fsdp_collectives.py
index 4e10f4594c..150752b2f5 100644
--- a/torch/distributed/_composable/fsdp/_fsdp_collectives.py
+++ b/torch/distributed/_composable/fsdp/_fsdp_collectives.py
@@ -442,6 +442,8 @@ def _get_all_gather_input_metadatas(
             input_numels.append(all_gather_input.numel())
         param_all_gather_input_dtypes.append(input_dtypes)
         param_all_gather_input_numels.append(input_numels)
+    if all_gather_dtype == torch.float8_e4m3fn:
+        all_gather_dtype = torch.uint8
     return (
         param_all_gather_input_dtypes,
         param_all_gather_input_numels,

P1585298991

Summary:

Test Plan:

Reviewers:

Subscribers:

Tasks:

Tags:
@pytorch-bot

pytorch-bot Bot commented Sep 11, 2024 •

Copy link
Copy Markdown

🔗 Helpful Links

🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/ao/873

Note: Links to docs will display an error until the docs builds have been completed.

❌ 10 New Failures

As of commit fc6063c with merge base 85d03de (image):

NEW FAILURES - The following jobs have failed:

This comment was automatically generated by Dr. CI and updates every 15 minutes.

@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Sep 11, 2024
@weifengpy weifengpy changed the title [DO NOT REV]debug numerics [DO NOT REVIEW] debug float8 all-gather numerics Sep 11, 2024
Summary:

Test Plan:

Reviewers:

Subscribers:

Tasks:

Tags:
Summary:

Test Plan:

Reviewers:

Subscribers:

Tasks:

Tags:
Summary:

Test Plan:

Reviewers:

Subscribers:

Tasks:

Tags:
Comment thread test/float8/test_fsdp2/fsdp2_common.py Resolved
Summary:

Test Plan:

Reviewers:

Subscribers:

Tasks:

Tags:
Summary:

Test Plan:

Reviewers:

Subscribers:

Tasks:

Tags:
Summary:

Test Plan:

Reviewers:

Subscribers:

Tasks:

Tags:
Summary:

Test Plan:

Reviewers:

Subscribers:

Tasks:

Tags:
Summary:

Test Plan:

Reviewers:

Subscribers:

Tasks:

Tags:
Summary:

Test Plan:

Reviewers:

Subscribers:

Tasks:

Tags:
Summary:

Test Plan:

Reviewers:

Subscribers:

Tasks:

Tags:
Summary:

Test Plan:

Reviewers:

Subscribers:

Tasks:

Tags:
Summary:

Test Plan:

Reviewers:

Subscribers:

Tasks:

Tags:
Summary:

Test Plan:

Reviewers:

Subscribers:

Tasks:

Tags:
Summary:

Test Plan:

Reviewers:

Subscribers:

Tasks:

Tags:
Summary:

Test Plan:

Reviewers:

Subscribers:

Tasks:

Tags:
Summary:

Test Plan:

Reviewers:

Subscribers:

Tasks:

Tags:
transformer
Summary:

Test Plan:

Reviewers:

Subscribers:

Tasks:

Tags:
simple transformer root
Summary:

Test Plan:

Reviewers:

Subscribers:

Tasks:

Tags:
Summary:

Test Plan:

Reviewers:

Subscribers:

Tasks:

Tags:
Summary:

Test Plan:

Reviewers:

Subscribers:

Tasks:

Tags:
Summary:

Test Plan:

Reviewers:

Subscribers:

Tasks:

Tags:
Summary:

Test Plan:

Reviewers:

Subscribers:

Tasks:

Tags:
Summary:

Test Plan:

Reviewers:

Subscribers:

Tasks:

Tags:
Summary:

Test Plan:

Reviewers:

Subscribers:

Tasks:

Tags:
Summary:

Test Plan:

Reviewers:

Subscribers:

Tasks:

Tags:
Summary:

Test Plan:

Reviewers:

Subscribers:

Tasks:

Tags:
yanbing-j pushed a commit to yanbing-j/ao that referenced this pull request Dec 9, 2024
…ytorch#873)

* [Dist][Inference] U-haul TP and distribute utils code to TorchChat

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants