Skip to content

Conversation

@skrah
Copy link
Contributor

@skrah skrah commented Jun 13, 2019

This will need a conflict resolution once avg_pool2d() has been merged.

@pytorchbot pytorchbot added module: build Build system issues module: cpu CPU specific problem (e.g., perf, algorithm) module: cuda Related to torch.cuda, and CUDA support in general module: internals Related to internal abstractions in c10 and ATen module: nn Related to torch.nn module: operators labels Jun 13, 2019
@skrah skrah added open source module: porting Issues related to porting TH/THNN legacy to ATen native triaged This issue has been looked at a team member, and triaged and prioritized into an appropriate module and removed module: build Build system issues module: cpu CPU specific problem (e.g., perf, algorithm) module: cuda Related to torch.cuda, and CUDA support in general module: internals Related to internal abstractions in c10 and ATen module: operators labels Jun 13, 2019
@pytorchbot pytorchbot added module: build Build system issues module: cpu CPU specific problem (e.g., perf, algorithm) module: cuda Related to torch.cuda, and CUDA support in general module: internals Related to internal abstractions in c10 and ATen module: operators labels Jun 13, 2019
@skrah skrah removed module: build Build system issues module: cpu CPU specific problem (e.g., perf, algorithm) module: cuda Related to torch.cuda, and CUDA support in general module: internals Related to internal abstractions in c10 and ATen module: operators labels Jun 14, 2019
@skrah
Copy link
Contributor Author

skrah commented Jun 14, 2019

@ezyang I think this one is ready now. I've kept the existing frame functions but did not create new ones.

The existing THCUNN shape check omitted some trivial checks from the THNN one, so the unified checks are more restrictive now (same for CPU/GPU).

Also, VolumetricAveragePooling.cu did not check for "all same gpu". I wonder if that was an omission, so I added that.

@skrah skrah requested a review from ezyang June 14, 2019 09:45
@skrah skrah changed the title [WIP] Port avg_pool3d() to ATen Port avg_pool3d() to ATen Jun 14, 2019
@ezyang
Copy link
Contributor

ezyang commented Jun 14, 2019

Also, VolumetricAveragePooling.cu did not check for "all same gpu". I wonder if that was an omission, so I added that.

Sounds like an omission; nice catch :)

TORCH_INTERNAL_ASSERT(kernel_size.size() == 3 &&
(stride.empty() || stride.size() == 3) &&
(padding.size() == 1 || padding.size() == 3),
"avg_pool3d: all IntArrayRef sizes must be 3");
Copy link
Contributor

Choose a reason for hiding this comment

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

Huh, do we actually check this from the C++ frontend? If not, this probably should be a CHECK.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@ezyang Good question, it actually came up now in #22032, which showed that people are using the C++ frontend like the Python functions (expecting that single integers are repeated automatically).

So it's a CHECK now (#22075).

Copy link
Contributor

@ezyang ezyang left a comment

Choose a reason for hiding this comment

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

Nifty!

Copy link
Contributor

@facebook-github-bot facebook-github-bot left a comment

Choose a reason for hiding this comment

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

@ezyang is landing this pull request. If you are a Facebook employee, you can view this diff on Phabricator.

@umanwizard
Copy link
Contributor

This couldn't be landed due to internal issues. I am taking a look.

@skrah skrah deleted the average_pool3d branch June 18, 2019 15:54
zdevito pushed a commit to zdevito/ATen that referenced this pull request Jun 18, 2019
Summary:
This will need a conflict resolution once avg_pool2d() has been merged.
Pull Request resolved: pytorch/pytorch#21732

Differential Revision: D15824923

Pulled By: ezyang

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

@ezyang merged this pull request in 31e1e63.

@ezyang
Copy link
Contributor

ezyang commented Jun 24, 2019 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Merged module: nn Related to torch.nn module: porting Issues related to porting TH/THNN legacy to ATen native open source triaged This issue has been looked at a team member, and triaged and prioritized into an appropriate module

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants