Skip to content

Conversation

@PaulZhang12
Copy link
Contributor

@PaulZhang12 PaulZhang12 commented Jun 13, 2025

Stack from ghstack (oldest at bottom):

[ghstack-poisoned]
PaulZhang12 added a commit that referenced this pull request Jun 13, 2025
ghstack-source-id: ca3cb11
Pull Request resolved: #170
@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Meta Open Source bot. label Jun 13, 2025
for n in nodes:
if "output_index" in n.meta:
output_nodes[n.meta["output_index"]] = n.name
import pdb; pdb.set_trace()
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
import pdb; pdb.set_trace()
breakpoint()

same thing but shorter.

PaulZhang12 added a commit that referenced this pull request Jun 13, 2025
ghstack-source-id: a9859b5
Pull Request resolved: #170
@PaulZhang12 PaulZhang12 reopened this Jun 13, 2025
PaulZhang12 added a commit that referenced this pull request Jul 21, 2025
ghstack-source-id: 44f54ae
Pull Request resolved: #170
@PaulZhang12 PaulZhang12 changed the title Layer Norm fwd issue [Example] Layer Norm Forward Jul 21, 2025
PaulZhang12 added a commit that referenced this pull request Jul 21, 2025
ghstack-source-id: f2dbcd0
Pull Request resolved: #170
PaulZhang12 added a commit that referenced this pull request Jul 21, 2025
ghstack-source-id: cb9208f
Pull Request resolved: #170
PaulZhang12 added a commit that referenced this pull request Jul 21, 2025
ghstack-source-id: b502c96
Pull Request resolved: #170
PaulZhang12 added a commit that referenced this pull request Jul 21, 2025
ghstack-source-id: c204f75
Pull Request resolved: #170
PaulZhang12 added a commit that referenced this pull request Jul 21, 2025
ghstack-source-id: f8645d6
Pull Request resolved: #170


if __name__ == "__main__":
main()
Copy link
Contributor

Choose a reason for hiding this comment

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

btw probably need to add a unit test to test_examples.py similar to other examples

PaulZhang12 added a commit that referenced this pull request Jul 21, 2025
ghstack-source-id: 99c27eb
Pull Request resolved: #170
PaulZhang12 added a commit that referenced this pull request Jul 21, 2025
ghstack-source-id: 565ab39
Pull Request resolved: #170
PaulZhang12 added a commit that referenced this pull request Jul 21, 2025
ghstack-source-id: 38636cd
Pull Request resolved: #170
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 a lot!

PaulZhang12 added a commit that referenced this pull request Jul 22, 2025
ghstack-source-id: 099d6f8
Pull Request resolved: #170
PaulZhang12 added a commit that referenced this pull request Jul 22, 2025
ghstack-source-id: 45b75b9
Pull Request resolved: #170
Copy link
Contributor

@jansel jansel left a comment

Choose a reason for hiding this comment

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

ghstack doesn't work in this repo, https://github.com/modular/stack-pr does though

return out


def helion_layer_norm_wrapper(
Copy link
Contributor

Choose a reason for hiding this comment

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

Why do we need a wraper?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

PyTorch's layer_norm https://docs.pytorch.org/docs/stable/generated/torch.nn.functional.layer_norm.html takes in normalized_shape as second arg, a list[int]. This allows us to work around it by not having to pass this into the kernel

Copy link
Contributor

Choose a reason for hiding this comment

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

We should be able to pass it into the kernel, I think we can remove this.

import helion.language as hl


# TODO(PaulZhang12): Support autotuning, setting reduction_loops currently errors
Copy link
Contributor

Choose a reason for hiding this comment

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

What is the error you are getting? Do you need help fixing this one? For benchmarking we need to run the autotuner.

Copy link
Contributor Author

@PaulZhang12 PaulZhang12 Jul 22, 2025

Choose a reason for hiding this comment

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

I filed an issue #345, haven't had time to look into it but can address it before merging

@PaulZhang12 PaulZhang12 mentioned this pull request Jul 22, 2025
PaulZhang12 added a commit that referenced this pull request Jul 22, 2025
ghstack-source-id: 45b75b9
Pull Request resolved: #170

stack-info: PR: #348, branch: PaulZhang12/stack/1
@PaulZhang12
Copy link
Contributor Author

@jansel closed this PR in favor of #348 which uses stack-pr

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.

5 participants