[bc breaking] change x, w, dL_dY variable names to input, weight, grad_output#323
[bc breaking] change x, w, dL_dY variable names to input, weight, grad_output#323vkuzo wants to merge 4 commits intogh/vkuzo/34/basefrom
Conversation
…d_output Summary: The following naming scheme matches the rest of PyTorch better: ``` // forward output = input @ weight_t // backward grad_input = grad_output @ weight grad_weight = input_t @ grad_output ``` This PR changes all the previous references to `x`, `w`, `dL_dY` to match the naming scheme above. Test Plan: Reviewers: Subscribers: Tasks: Tags: [ghstack-poisoned]
…d_output Summary: The following naming scheme matches the rest of PyTorch better: ``` // forward output = input @ weight_t // backward grad_input = grad_output @ weight grad_weight = input_t @ grad_output ``` This PR changes all the previous references to `x`, `w`, `dL_dY` to match the naming scheme above. Test Plan: Reviewers: Subscribers: Tasks: Tags: ghstack-source-id: 5d1c706 Pull Request resolved: #323
…weight, grad_output" Summary: The following naming scheme matches the rest of PyTorch better: ``` // forward output = input @ weight_t // backward grad_input = grad_output @ weight grad_weight = input_t @ grad_output ``` This PR changes all the previous references to `x`, `w`, `dL_dY` to match the naming scheme above. Test Plan: Reviewers: Subscribers: Tasks: Tags: [ghstack-poisoned]
…d_output Summary: The following naming scheme matches the rest of PyTorch better: ``` // forward output = input @ weight_t // backward grad_input = grad_output @ weight grad_weight = input_t @ grad_output ``` This PR changes all the previous references to `x`, `w`, `dL_dY` to match the naming scheme above. Test Plan: Reviewers: Subscribers: Tasks: Tags: ghstack-source-id: 52683b0 Pull Request resolved: #323
| pip install black==23.3.0 usort==1.0.6 ufmt==2.1.0 libcst==1.0.1 | ||
| - name: Analyzing the code with ufmt | ||
| run: | | ||
| ufmt format . |
There was a problem hiding this comment.
L26:28 is for easier debugging of differences between local machine and CI ufmt
There was a problem hiding this comment.
is the ufmt config different than CI?
There was a problem hiding this comment.
I've noticed this on a couple of PRs in the past. A better fix would be to align ufmt versions + env, but regardless this is useful for debugging.
…weight, grad_output" Summary: The following naming scheme matches the rest of PyTorch better: ``` // forward output = input @ weight_t // backward grad_input = grad_output @ weight grad_weight = input_t @ grad_output ``` This PR changes all the previous references to `x`, `w`, `dL_dY` to match the naming scheme above. Test Plan: Reviewers: Subscribers: Tasks: Tags: [ghstack-poisoned]
…d_output Summary: The following naming scheme matches the rest of PyTorch better: ``` // forward output = input @ weight_t // backward grad_input = grad_output @ weight grad_weight = input_t @ grad_output ``` This PR changes all the previous references to `x`, `w`, `dL_dY` to match the naming scheme above. Test Plan: Reviewers: Subscribers: Tasks: Tags: ghstack-source-id: d1d6ffb Pull Request resolved: #323
…weight, grad_output" Summary: The following naming scheme matches the rest of PyTorch better: ``` // forward output = input @ weight_t // backward grad_input = grad_output @ weight grad_weight = input_t @ grad_output ``` This PR changes all the previous references to `x`, `w`, `dL_dY` to match the naming scheme above. Test Plan: Reviewers: Subscribers: Tasks: Tags: [ghstack-poisoned]
…d_output Summary: The following naming scheme matches the rest of PyTorch better: ``` // forward output = input @ weight_t // backward grad_input = grad_output @ weight grad_weight = input_t @ grad_output ``` This PR changes all the previous references to `x`, `w`, `dL_dY` to match the naming scheme above. Test Plan: Reviewers: Subscribers: Tasks: Tags: ghstack-source-id: 37a6a51 Pull Request resolved: #323
| return tensor | ||
|
|
||
| @staticmethod | ||
| def backward(ctx, go): |
There was a problem hiding this comment.
should we update go? This one has confused me in the past
There was a problem hiding this comment.
this PR only contains the user-facing part since that's the most crucial. LOC is already high, so IMO better to rename the non-user facing things in subsequent PRs, to keep things smaller and more reviewable.
|
@vkuzo has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
|
This pull request has been merged in 603efc2. |
Summary: In #323 we changed the user facing variable notation from `x/w/dL_dY` to `input/weight/grad_output`. This PR follows up by changing most of the internal variables to also match the new notation, to reduce confusion. Test Plan: ``` ./test/test_everything.sh ``` Reviewers: Subscribers: Tasks: Tags: [ghstack-poisoned]
…rad_output notation" Summary: In #323 we changed the user facing variable notation from `x/w/dL_dY` to `input/weight/grad_output`. This PR follows up by changing most of the internal variables to also match the new notation, to reduce confusion. Test Plan: ``` ./test/test_everything.sh ``` Reviewers: Subscribers: Tasks: Tags: [ghstack-poisoned]
…ion" Summary: In #323 we changed the user facing variable notation from `x/w/dL_dY` to `input/weight/grad_output`. This PR follows up by changing most of the internal variables to also match the new notation, to reduce confusion. Test Plan: ``` ./test/test_everything.sh ``` Reviewers: Subscribers: Tasks: Tags: [ghstack-poisoned]
Summary: Pull Request resolved: #335 In #323 we changed the user facing variable notation from `x/w/dL_dY` to `input/weight/grad_output`. This PR follows up by changing most of the internal variables to also match the new notation, to reduce confusion. Reviewed By: weifengpy Differential Revision: D60252071 fbshipit-source-id: b91ec5b975df550962418eafc93f1904d64a3dd8
Stack from ghstack (oldest at bottom):
Summary:
The following naming scheme matches the rest of PyTorch better:
This PR changes all the previous references to
x,w,dL_dYtomatch the naming scheme above.
Test Plan:
Reviewers:
Subscribers:
Tasks:
Tags:
Differential Revision: D60072596