Override max_pool2d as autograd function.#2236
Merged
ailzhang merged 1 commit intopytorch:masterfrom Jun 20, 2020
Merged
Conversation
11187de to
e9e8e1b
Compare
dlibenzi
requested changes
Jun 18, 2020
| torch::IntArrayRef padding, | ||
| torch::IntArrayRef dilation, bool ceil_mode) { | ||
| ctx->saved_data["kernel_size"] = kernel_size; | ||
| ctx->saved_data["stride"] = stride; |
Collaborator
There was a problem hiding this comment.
I dunno how the saved_data map works, but array-ref are ... refs, so unless the saved_data map has special handling to make copies, will those be valid in the backward?
Contributor
Author
There was a problem hiding this comment.
Arrayref is converted to IValue in the saved map. I'd assume this is okay since 1) it passed test 2) torchvision is using it the same way :D https://github.com/pytorch/vision/blob/e89c4c0198fd8cbd11344564162c68771524b2d7/torchvision/csrc/PSROIPool.h#L83
dlibenzi
reviewed
Jun 18, 2020
Contributor
Author
|
(CI test failure will be fixed by pytorch/pytorch#40265 [pending review] |
e9e8e1b to
916ef39
Compare
dlibenzi
approved these changes
Jun 19, 2020
|
|
||
| ExpectCounterNotChanged("aten::.*", cpp_test::GetIgnoredCounters()); | ||
| ExpectCounterChanged("xla::max_pool3d_with_indices", | ||
| ExpectCounterChanged("xla::max_pool3d", |
Collaborator
There was a problem hiding this comment.
Remind me to make a pass on this file and move those test before returning from function 😄
No need to do it here.
916ef39 to
8b124a2
Compare
dlibenzi
approved these changes
Jun 19, 2020
8b124a2 to
f400925
Compare
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.