Skip to content

Conversation

@mengluy0125
Copy link
Contributor

Summary: The current layernorm only supports bias case, we thus add the case without bias.

Differential Revision: D82171738

@meta-cla meta-cla bot added the CLA Signed This label is managed by the Meta Open Source bot. label Sep 11, 2025
@facebook-github-bot
Copy link

This pull request was exported from Phabricator. Differential Revision: D82171738

mengluy0125 added a commit to mengluy0125/helion that referenced this pull request Sep 11, 2025
Summary:

The current layernorm only supports bias case, we thus add the case without bias.

Differential Revision: D82171738
@facebook-github-bot
Copy link

This pull request was exported from Phabricator. Differential Revision: D82171738

mengluy0125 added a commit to mengluy0125/helion that referenced this pull request Sep 11, 2025
Summary:

The current layernorm only supports bias case, we thus add the case without bias.

Differential Revision: D82171738
@facebook-github-bot
Copy link

This pull request was exported from Phabricator. Differential Revision: D82171738

mengluy0125 added a commit to mengluy0125/helion that referenced this pull request Sep 11, 2025
Summary:

The current layernorm only supports bias case, we thus add the case without bias.

Differential Revision: D82171738
@facebook-github-bot
Copy link

This pull request was exported from Phabricator. Differential Revision: D82171738

mengluy0125 added a commit to mengluy0125/helion that referenced this pull request Sep 11, 2025
Summary:

The current layernorm only supports bias case, we thus add the case without bias.

Differential Revision: D82171738
@facebook-github-bot
Copy link

This pull request was exported from Phabricator. Differential Revision: D82171738

baseline_name="torch",
rtol=1e-3,
atol=1e-3,
)
Copy link
Contributor

Choose a reason for hiding this comment

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

@mengluy0125 thanks for the PR! would you like to add the no-bias test in test_examples.py too?

def test_layernorm(self):
x = torch.randn([32, 64], device=DEVICE, dtype=torch.float16)
weight = torch.randn([64], device=DEVICE, dtype=torch.float16)
bias = torch.randn([64], device=DEVICE, dtype=torch.float16)
args = (x, [64], weight, bias)
self.assertExpectedJournal(
check_example(
"layer_norm",
args,
torch.nn.functional.layer_norm(*args),
fn_name="layer_norm_fwd",
)
)

mengluy0125 added a commit to mengluy0125/helion that referenced this pull request Sep 11, 2025
Summary:

The current layernorm only supports bias case, we thus add the case without bias.

Differential Revision: D82171738
@facebook-github-bot
Copy link

This pull request was exported from Phabricator. Differential Revision: D82171738

Summary:

The current layernorm only supports bias case, we thus add the case without bias.

Differential Revision: D82171738
@facebook-github-bot
Copy link

This pull request was exported from Phabricator. Differential Revision: D82171738

Copy link
Contributor

@yf225 yf225 left a comment

Choose a reason for hiding this comment

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

thanks @mengluy0125 !

@facebook-github-bot facebook-github-bot merged commit 1ac5365 into pytorch:main Sep 12, 2025
14 of 15 checks passed
lolpack pushed a commit to lolpack/helion that referenced this pull request Oct 13, 2025
Differential Revision: D82171738

Pull Request resolved: pytorch#585
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. fb-exported

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants