-
Notifications
You must be signed in to change notification settings - Fork 24.8k
[cuda] Add new gamma beta backwards kernel #147773
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
Conversation
This reverts commit bb59712.
Summary: Test Plan: Reviewers: Subscribers: Tasks: Tags:
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/147773
Note: Links to docs will display an error until the docs builds have been completed. ❌ 15 New FailuresAs of commit a634482 with merge base ffa19b9 ( NEW FAILURES - The following jobs have failed:
This comment was automatically generated by Dr. CI and updates every 15 minutes. |
Looks like this PR hasn't been updated in a while so we're going to go ahead and mark this as |
Context:
Prior to this PR we had 3 non-ROCM CUDA kernels to handle GammaBeta backwards pass:
This approach had several weaknesses:
N
dimension, not in theM
dimensionThis PR:
USE_ROCM
case was using that and I couldn't test my kernel withUSE_ROCM
.sum()
to do the full reduction. The advantage is the partial reduction can fully utilize all SMs on the GPU as we parallelize across theM
dimension. This can lead to pretty dramatic performance gains -- for instance, I saw 10x+ performance improvement for M=7e6 and N=32 (which was from a real model).Full performance results are shown below on my H100: