Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix segfault in DeformConv2d when mask is None #7632

Merged
merged 1 commit into from
May 26, 2023

Conversation

NicolasHug
Copy link
Member

There's a segfault internally on this line:

https://github.com/pytorch/vision/blob/4a51822ca20027b6e03ec4fb582c31cc9545ba4e/torchvision/csrc/ops/cpu/deform_conv2d_kernel.cpp#L224:L224

caused in our tests by this line, i.e. calling the op without a mask:

https://github.com/pytorch/vision/blob/4a51822ca20027b6e03ec4fb582c31cc9545ba4e/test/test_ops.py#L923:L923

I'm not 100% sure whether this sefgault is expected and whether this fix is the "right" one. But it does remove the segfault, and it can't affect the results because of the use_mask flag which is always False in those calls.

@pytorch-bot
Copy link

pytorch-bot bot commented May 25, 2023

🔗 Helpful Links

🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/vision/7632

Note: Links to docs will display an error until the docs builds have been completed.

✅ No Failures

As of commit 241e07d:
💚 Looks good so far! There are no failures yet. 💚

This comment was automatically generated by Dr. CI and updates every 15 minutes.

@NicolasHug NicolasHug changed the title Fix segfault in DeformConv2d Fix segfault in DeformConv2d when mask is None May 25, 2023
Copy link
Collaborator

@vfdev-5 vfdev-5 left a comment

Choose a reason for hiding this comment

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

LGTM

@NicolasHug NicolasHug merged commit 81d12c3 into pytorch:main May 26, 2023
facebook-github-bot pushed a commit that referenced this pull request May 31, 2023
Reviewed By: vmoens

Differential Revision: D46314043

fbshipit-source-id: db228b42bca16c802989df152f89321d6047ce76
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.

3 participants