Skip to content

Conversation

aditvenk
Copy link
Contributor

@aditvenk aditvenk commented Oct 1, 2025

Test Plan:
Adding new unit tests in test_examples.py
Testing with run.py and exp.py

@aditvenk aditvenk requested a review from jansel October 1, 2025 01:26
@meta-cla meta-cla bot added the CLA Signed This label is managed by the Meta Open Source bot. label Oct 1, 2025
@aditvenk aditvenk requested a review from oulgen October 1, 2025 01:26
Copy link
Contributor

@oulgen oulgen left a comment

Choose a reason for hiding this comment

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

Please add this to run.py, you can grep for rms_norm again for backward implementation, and share perf/accuracy results with tritonbench.

@Sibylau can give pointers on how to do it

gist is here: https://docs.google.com/document/d/1BiQaFJRBufzcLNPSMhVKuC9gv-KEFpN4B49CqOjZC74/edit?usp=sharing

@aditvenk
Copy link
Contributor Author

aditvenk commented Oct 1, 2025

Please add this to run.py, you can grep for rms_norm again for backward implementation, and share perf/accuracy results with tritonbench.

@Sibylau can give pointers on how to do it

gist is here: https://docs.google.com/document/d/1BiQaFJRBufzcLNPSMhVKuC9gv-KEFpN4B49CqOjZC74/edit?usp=sharing

From what I see, tritonbench does not have a bwd operator for this op (the same is true for some other ops too)
I will check-in with @Sibylau how to proceed here.

@yf225
Copy link
Contributor

yf225 commented Oct 1, 2025

Please add this to run.py, you can grep for rms_norm again for backward implementation, and share perf/accuracy results with tritonbench.
@Sibylau can give pointers on how to do it
gist is here: https://docs.google.com/document/d/1BiQaFJRBufzcLNPSMhVKuC9gv-KEFpN4B49CqOjZC74/edit?usp=sharing

From what I see, tritonbench does not have a bwd operator for this op (the same is true for some other ops too) I will check-in with @Sibylau how to proceed here.

Yeah let's probably also add backward support for this operator to tritonbench (we can look at get_bwd_fn in tritonbench layer_norm and rms_norm for how to do this; also need to make sure the inputs have proper requires_grad=True too).

@aditvenk
Copy link
Contributor Author

aditvenk commented Oct 1, 2025

Please add this to run.py, you can grep for rms_norm again for backward implementation, and share perf/accuracy results with tritonbench.
@Sibylau can give pointers on how to do it
gist is here: https://docs.google.com/document/d/1BiQaFJRBufzcLNPSMhVKuC9gv-KEFpN4B49CqOjZC74/edit?usp=sharing

From what I see, tritonbench does not have a bwd operator for this op (the same is true for some other ops too) I will check-in with @Sibylau how to proceed here.

Yeah let's probably also add backward support for this operator to tritonbench (we can look at get_bwd_fn in tritonbench layer_norm and rms_norm for how to do this; also need to make sure the inputs have proper requires_grad=True too).

tritonbench PR: meta-pytorch/tritonbench#501

@aditvenk aditvenk force-pushed the gh/aditvenk/1/orig branch from 5bc32b8 to 61446b8 Compare October 1, 2025 19:55
@oulgen oulgen requested a review from yf225 October 1, 2025 20:00
@aditvenk aditvenk force-pushed the gh/aditvenk/1/orig branch from 61446b8 to 67819f3 Compare October 1, 2025 22:21
@aditvenk aditvenk merged commit 6bd584d into main Oct 1, 2025
13 checks passed
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.

4 participants