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

Removed unused dw tensor in Triton RMSNorm #567

Merged
merged 2 commits into from
Sep 4, 2024
Merged

Conversation

awgu
Copy link
Contributor

@awgu awgu commented Sep 2, 2024

Stack from ghstack (oldest at bottom):

awgu added a commit that referenced this pull request Sep 2, 2024
ghstack-source-id: 146e0a951eb2329decf448d014a361cff2a800c5
Pull Request resolved: #567
@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Meta Open Source bot. label Sep 2, 2024
awgu added a commit that referenced this pull request Sep 4, 2024
ghstack-source-id: c2337c6f976b41288498b7f3aa9b6f3d54d49ad9
Pull Request resolved: #567
@awgu awgu marked this pull request as ready for review September 4, 2024 00:28
@@ -284,7 +284,6 @@ def backward(ctx, dy):

M, N = dy.shape
dx = torch.empty_like(x)
dw = torch.empty_like(weight)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

unused, dw is directly computed:

dw = _dw.sum(0).to(weight.dtype)

@awgu awgu requested a review from tianyu-l September 4, 2024 00:29
Copy link
Contributor

@tianyu-l tianyu-l left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good!

@awgu awgu merged commit b7754d6 into gh/awgu/17/base Sep 4, 2024
5 checks passed
awgu added a commit that referenced this pull request Sep 4, 2024
ghstack-source-id: c2337c6f976b41288498b7f3aa9b6f3d54d49ad9
Pull Request resolved: #567
@awgu awgu deleted the gh/awgu/17/head branch September 4, 2024 23:22
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 Meta Open Source bot.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants