Skip to content

Conversation

lezcano
Copy link
Collaborator

@lezcano lezcano commented May 23, 2022

Stack from ghstack:

Following up on #51099 (comment), we fix these derivatives, as they were incorrect until now.

As described in the note, the better solution would be to use vectorised operations on the preprocessing operation when reducing on CPU. It's not clear how difficult that may be.

Fixes #67517

Following up on #51099 (comment), we fix these derivatives, as they were incorrect until now.

As described in the note, the better solution would be to use vectorised operations on the preprocessing operation when reducing on CPU. It's not clear how difficult that may be.

Fixes #67517

[ghstack-poisoned]
@facebook-github-bot
Copy link
Contributor

facebook-github-bot commented May 23, 2022

🔗 Helpful links

✅ No Failures (0 Pending)

As of commit 0055821 (more details on the Dr. CI page):

Expand to see more

💚 💚 Looks good so far! There are no failures yet. 💚 💚


This comment was automatically generated by Dr. CI (expand for details).

Please report bugs/suggestions to the (internal) Dr. CI Users group.

Click here to manually regenerate this comment.

@lezcano
Copy link
Collaborator Author

lezcano commented May 23, 2022

@ngimel I improved the explanation for why we have to do that trick in linalg_vector_norm and I added the trick to norm to fix that case. Could you have a look?
We should figure out whether we can vectorise the input transformation on CPU for reductions. This would solve this problem.

I also simplified the formula for the derivative. That's for @albanD to have a look.

@lezcano
Copy link
Collaborator Author

lezcano commented May 23, 2022

fwiw, this PR fixes some issues that were uncovered in the top PR of the stack after fixing a the forward AD for the sgn function.

lezcano added 2 commits May 24, 2022 09:48
Following up on #51099 (comment), we fix these derivatives, as they were incorrect until now.

As described in the note, the better solution would be to use vectorised operations on the preprocessing operation when reducing on CPU. It's not clear how difficult that may be.

Fixes #67517

[ghstack-poisoned]
Following up on #51099 (comment), we fix these derivatives, as they were incorrect until now.

As described in the note, the better solution would be to use vectorised operations on the preprocessing operation when reducing on CPU. It's not clear how difficult that may be.

Fixes #67517

[ghstack-poisoned]
@lezcano
Copy link
Collaborator Author

lezcano commented May 24, 2022

@pytorchbot merge this

@github-actions
Copy link
Contributor

Hey @lezcano.
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.

@lezcano lezcano mentioned this pull request May 25, 2022
@lezcano lezcano added release notes: autograd release notes category topic: not user facing topic category labels May 25, 2022
facebook-github-bot pushed a commit that referenced this pull request May 25, 2022
Summary:
Following up on #51099 (comment), we fix these derivatives, as they were incorrect until now.

As described in the note, the better solution would be to use vectorised operations on the preprocessing operation when reducing on CPU. It's not clear how difficult that may be.

Fixes #67517

Pull Request resolved: #78105

Approved by: https://github.com/ngimel

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

Reviewed By: mehtanirav

Differential Revision: D36668395

fbshipit-source-id: 5c3d887729279fdcd6dd0e47c4ea6372096a280b
@facebook-github-bot facebook-github-bot deleted the gh/Lezcano/78/head branch May 28, 2022 14:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants