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

use torch.float8_e8m0fnu in mx_formats #1882

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open

use torch.float8_e8m0fnu in mx_formats #1882

wants to merge 5 commits into from

Conversation

vkuzo
Copy link
Contributor

@vkuzo vkuzo commented Mar 13, 2025

Summary:

Switches our MX code to use the new torch.float8_e8m0fnu dtype
directly where appropriate. This will allow for easier numerical
debugging of scales, as we can easily see the numerical values when they
are printed.

Test Plan:

pytest test/prototype/mx_formats/ -s -x

Reviewers:

Subscribers:

Tasks:

Tags:

[ghstack-poisoned]
@vkuzo
Copy link
Contributor Author

vkuzo commented Mar 13, 2025

vkuzo added a commit that referenced this pull request Mar 13, 2025
Summary:

Switches our MX code to use the new `torch.float8_e8m0fnu` dtype
directly where appropriate. This will allow for easier numerical
debugging of scales, as we can easily see the numerical values when they
are printed.

Test Plan:

```
pytest test/prototype/mx_formats/ -s -x
```

Reviewers:

Subscribers:

Tasks:

Tags:

ghstack-source-id: e0d000742ad9a0d1fa5019f6d6391955ef3cc001
ghstack-comment-id: 2721705057
Pull Request resolved: #1882
Copy link

pytorch-bot bot commented Mar 13, 2025

🔗 Helpful Links

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

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

❌ 1 New Failure, 2 Unrelated Failures

As of commit ba470ae with merge base 9ef2f06 (image):

NEW FAILURE - The following job has failed:

BROKEN TRUNK - The following jobs failed but were present on the merge base:

👉 Rebase onto the `viable/strict` branch to avoid these failures

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 Mar 13, 2025
@vkuzo vkuzo added the topic: improvement Use this tag if this PR is an improvement (doesn't fit into any of the other categories) label Mar 13, 2025
[ghstack-poisoned]
vkuzo added a commit that referenced this pull request Mar 13, 2025
Summary:

Switches our MX code to use the new `torch.float8_e8m0fnu` dtype
directly where appropriate. This will allow for easier numerical
debugging of scales, as we can easily see the numerical values when they
are printed.

Test Plan:

```
pytest test/prototype/mx_formats/ -s -x
```

Reviewers:

Subscribers:

Tasks:

Tags:

ghstack-source-id: 1c0c2babc58a91c832ad6872668c68268818abe2
ghstack-comment-id: 2721705057
Pull Request resolved: #1882
@vkuzo
Copy link
Contributor Author

vkuzo commented Mar 13, 2025

need to fix CI

@vkuzo
Copy link
Contributor Author

vkuzo commented Mar 13, 2025

need to reverse #1608 and get a fresh nightly for this to work, will take a look

vkuzo added 2 commits March 14, 2025 16:26
[ghstack-poisoned]
[ghstack-poisoned]
@vkuzo
Copy link
Contributor Author

vkuzo commented Mar 17, 2025

Looks like this needs something like the inductor changes from pytorch/pytorch#148461 for tests to pass

[ghstack-poisoned]
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. topic: improvement Use this tag if this PR is an improvement (doesn't fit into any of the other categories)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants