-
Notifications
You must be signed in to change notification settings - Fork 196
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
add fused transpose and non-transpose kernel and use it for grad output #1497
Merged
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
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/ao/1497
Note: Links to docs will display an error until the docs builds have been completed. ✅ No FailuresAs of commit 01eedbf with merge base eb49333 (): This comment was automatically generated by Dr. CI and updates every 15 minutes. |
This was referenced Jan 3, 2025
danielvegamyhre
added a commit
that referenced
this pull request
Jan 3, 2025
ghstack-source-id: b8ffafdd2ff8428643045b9e7fb9046a0eab22c7 ghstack-comment-id: 2569853196 Pull Request resolved: #1497
danielvegamyhre
added
the
topic: not user facing
Use this tag if you don't want this PR to show up in release notes
label
Jan 3, 2025
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 3, 2025
danielvegamyhre
added a commit
that referenced
this pull request
Jan 3, 2025
ghstack-source-id: be4465cbef3e93fa415d1acf65d9a889043ead0d ghstack-comment-id: 2569853196 Pull Request resolved: #1497
vkuzo
approved these changes
Jan 7, 2025
Closed
danielvegamyhre
changed the base branch from
gh/danielvegamyhre/14/head
to
main
January 8, 2025 03:48
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: not user facing
Use this tag if you don't want this PR to show up in release notes
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.
Stack Summary
The following stack of PRs completes a float8 training prototype with performance that slightly beats the production Float8Linear + torch.compile approach.
Changes in this PR
This PR implements a new kernel which reads in a row major high precision tensor, and writes 2 outputs: a fp8 row major output, and a transposed fp8 row major output. This is useful for the backward pass where we need to convert the grad_output to both of these formats.
Next steps:
Test Plan
pytest kernels/
- kernel specific unit tests are passingpytest test/
- e2e training test is passingPerformance Benchmarking
Performance benchmarks show this implementation is beating torch.compile by 1.72-4.45% depending on the input tensor size: