Skip to content

Conversation

ani300
Copy link
Collaborator

@ani300 ani300 commented Oct 5, 2022

Summary: In order to make the layer normalization implementation for nested tensors public, it needs to be generalized to accept a normalized_shape argument instead of assuming it to be the last dimension of the nested_tensor. This commit does that, as well as adding extra unit tests to ensure the implementation is correct.

Test Plan:
All unit tests designed to test different ways of using the function work:

buck test //caffe2/test:nested -- test_layer_norm

Differential Revision: D40105207

@pytorch-bot
Copy link

pytorch-bot bot commented Oct 5, 2022

🔗 Helpful Links

🧪 See artifacts and rendered test results at hud.pytorch.org/pr/86295

Note: Links to docs will display an error until the docs builds have been completed.

✅ No Failures, 7 Pending

As of commit e536f69:
💚 Looks good so far! There are no failures yet. 💚

This comment was automatically generated by Dr. CI and updates every 15 minutes.

@linux-foundation-easycla
Copy link

linux-foundation-easycla bot commented Oct 5, 2022

CLA Signed

The committers listed above are authorized under a signed CLA.

  • ✅ login: ani300 / name: Antoni Viros (f354bbdd6d06427eb28f504e6b1e3ca26c5d6e9d)

@facebook-github-bot
Copy link
Contributor

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

@facebook-github-bot
Copy link
Contributor

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

…ytorch#86295)

Summary:
Pull Request resolved: pytorch#86295

In order to make the layer normalization implementation for nested tensors public, it needs to be generalized to accept a normalized_shape argument instead of assuming it to be the last dimension of the nested_tensor. This commit does that, as well as adding extra unit tests to ensure the implementation is correct.

Test Plan:
All unit tests designed to test different ways of using the function work:

`buck test //caffe2/test:nested -- test_layer_norm`

Differential Revision: D40105207

fbshipit-source-id: fe6b9c602aaf1a115101decb384f979bf02cb224
@facebook-github-bot
Copy link
Contributor

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

@drisspg drisspg added module: nestedtensor NestedTensor tag see issue #25032 release notes: nested tensor Changes that have a direct impact on nested tensors labels Oct 5, 2022
Copy link
Contributor

@drisspg drisspg left a comment

Choose a reason for hiding this comment

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

LGTM

@pytorch-bot pytorch-bot bot added the ciflow/trunk Trigger trunk jobs on your pull request label Oct 5, 2022
@ani300
Copy link
Collaborator Author

ani300 commented Oct 6, 2022

@pytorchbot merge

@pytorchmergebot
Copy link
Collaborator

@pytorchbot successfully started a merge job. Check the current status here.
The merge job was triggered without a flag. This means that your change will be merged once all checks on your PR have passed (ETA: 0-4 Hours). If this is not the intended behavior, feel free to use some of the other merge options in the wiki.
Please reach out to the PyTorch DevX Team with feedback or questions!

@github-actions
Copy link
Contributor

github-actions bot commented Oct 6, 2022

Hey @ani300.
You've committed this PR, but it does not have both a 'release notes: ...' and 'topics: ...' label. Please add one of each to the PR. The 'release notes: ...' label should represent the part of PyTorch that this PR changes (fx, autograd, distributed, etc) and the 'topics: ...' label should represent the kind of PR it is (not user facing, new feature, bug fix, perf improvement, etc). The list of valid labels can be found here for the 'release notes: ...' and here for the 'topics: ...'.
For changes that are 'topic: not user facing' there is no need for a release notes label.

@drisspg drisspg added the topic: not user facing topic category label Oct 6, 2022
facebook-github-bot pushed a commit that referenced this pull request Oct 7, 2022
…?e=20native=5Flayer=5Fnorm=20for=20nested=20tensor=20(#86295)?= (#86295)

Summary:
In order to make the layer normalization implementation for nested tensors public, it needs to be generalized to accept a normalized_shape argument instead of assuming it to be the last dimension of the nested_tensor. This commit does that, as well as adding extra unit tests to ensure the implementation is correct.

Pull Request resolved: #86295
Approved by: https://github.com/drisspg

Test Plan:
contbuild & OSS CI, see https://hud.pytorch.org/commit/pytorch/pytorch/cdbffa7f665dd144ada92c11d223aeb8b5c3887a

Test plan from GitHub:
All unit tests designed to test different ways of using the function work:

`buck test //caffe2/test:nested -- test_layer_norm`

Original Phabricator Test Plan:
All unit tests designed to test different ways of using the function work:

`buck test //caffe2/test:nested -- test_layer_norm`

Reviewed By: drisspg, seemethere

Differential Revision: D40105207

fbshipit-source-id: a54ee614888411a9bdd0f57ce9c11efb5d61467b
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ciflow/trunk Trigger trunk jobs on your pull request cla signed fb-exported Merged module: nestedtensor NestedTensor tag see issue #25032 release notes: nested tensor Changes that have a direct impact on nested tensors topic: not user facing topic category

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants