Skip to content

Conversation

@anjali411
Copy link
Contributor

No description provided.

@anjali411
Copy link
Contributor Author

anjali411 commented Oct 28, 2019

In response to issue: #27598

@ssnl
Copy link
Collaborator

ssnl commented Oct 28, 2019

Can we instead change is_stride_neg to is_stride_nonpos?

@anjali411
Copy link
Contributor Author

@ssnl good point! updated.

Copy link
Collaborator

@albanD albanD left a comment

Choose a reason for hiding this comment

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

LGTM

TORCH_CHECK(!params.is_padding_neg(), "negative padding is not supported");
TORCH_CHECK(!params.is_output_padding_neg(), "negative output_padding is not supported");
TORCH_CHECK(!params.is_stride_neg(), "negative stride is not supported");
TORCH_CHECK(!params.is_stride_nonpos(), "non positive stride is not supported");
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: maybe "non-positive" instead of "non positive"?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

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.

@anjali411 has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.

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.

@anjali411 has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.

@facebook-github-bot
Copy link
Contributor

@anjali411 merged this pull request in efbaa8a.

zdevito pushed a commit to zdevito/ATen that referenced this pull request Oct 29, 2019
Summary: Pull Request resolved: pytorch/pytorch#28784

Differential Revision: D18178889

Pulled By: anjali411

fbshipit-source-id: 976810bf3f9def3a8f5ca6885b1e049b831f06f3
@gchanan
Copy link
Contributor

gchanan commented Oct 31, 2019

Some minor feedback on this:

  1. It would be a slight improvement to focus on the effect of the change instead of how the change works. i.e. it's more important that this PR fixes a segfault when the convolution stride == 0 than that it does this by checking.

  2. It's a bit concerning that the code in question from the original PR still exists in THNN. That is, if someone manages to call that code via another path it will still crash. We should also change the check in THNN.

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants