-
Notifications
You must be signed in to change notification settings - Fork 207
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
mx: add ceil and RNE rounding modes to the cast from fp32 to e8m0 #1620
Open
vkuzo
wants to merge
3
commits into
gh/vkuzo/18/head
Choose a base branch
from
gh/vkuzo/20/head
base: gh/vkuzo/18/head
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains 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
Stack from ghstack (oldest at bottom): |
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/ao/1620
Note: Links to docs will display an error until the docs builds have been completed. ❌ 1 Cancelled JobAs of commit e5f61c4 with merge base 11440c2 (): This comment was automatically generated by Dr. CI and updates every 15 minutes. |
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
Jan 24, 2025
vkuzo
added a commit
that referenced
this pull request
Jan 24, 2025
Summary: Why we want this: in the newly released cuBLAS 12.8 documentation, the RNE rounding mode is used for the cast to e8m0. We want to properly emulate this cast. This is a copy-pasta of #516 with the modifications being keeping FLOOR the default more, and removing e3m0, credit to NicoleMayer for the original code. I don't have a way to check bitwise equivalency with the most recent cuBLAS version yet, but will come back and add tests when I do. Test Plan: ``` pytest test/prototype/mx_formats/ -s -x ``` Reviewers: Subscribers: Tasks: Tags: ghstack-source-id: 05679cdf019aa3338e77cf08ce2c5976a6f1e3e6 ghstack-comment-id: 2613597310 Pull Request resolved: #1620
vkuzo
added a commit
that referenced
this pull request
Jan 24, 2025
Summary: Why we want this: in the newly released cuBLAS 12.8 documentation, the RNE rounding mode is used for the cast to e8m0. We want to properly emulate this cast. This is a copy-pasta of #516 with the modifications being keeping FLOOR the default more, and removing e3m0, credit to NicoleMayer for the original code. I don't have a way to check bitwise equivalency with the most recent cuBLAS version yet, but will come back and add tests when I do. Test Plan: ``` pytest test/prototype/mx_formats/ -s -x ``` Reviewers: Subscribers: Tasks: Tags: ghstack-source-id: 49330726a68936ddece56d37e15129d3cc546b4e ghstack-comment-id: 2613597310 Pull Request resolved: #1620
vkuzo
added
the
topic: improvement
Use this tag if this PR is an improvement (doesn't fit into any of the other categories)
label
Jan 24, 2025
vkuzo
added a commit
that referenced
this pull request
Jan 24, 2025
Summary: Why we want this: in the newly released cuBLAS 12.8 documentation, the RNE rounding mode is used for the cast to e8m0. We want to properly emulate this cast. This is a copy-pasta of #516 with the modifications being keeping FLOOR the default more, and removing e3m0, credit to NicoleMayer for the original code. I don't have a way to check bitwise equivalency with the most recent cuBLAS version yet, but will come back and add tests when I do. Test Plan: ``` pytest test/prototype/mx_formats/ -s -x ``` Reviewers: Subscribers: Tasks: Tags: ghstack-source-id: 49330726a68936ddece56d37e15129d3cc546b4e ghstack-comment-id: 2613597310 Pull Request resolved: #1620
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)
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:
Why we want this: in the newly released cuBLAS 12.8 documentation, the
RNE rounding mode is used for the cast to e8m0. We want to properly
emulate this cast.
This is a copy-pasta of #516 with the
modifications being keeping FLOOR the default mode, and removing e3m0, credit
to @NicoleMayer for the original code. I don't have a way to check bitwise
equivalency with the most recent cuBLAS version yet, but will come back
and add tests when I do.
Test Plan:
Reviewers:
Subscribers:
Tasks:
Tags: