Skip to content

Conversation

@leafs1
Copy link
Contributor

@leafs1 leafs1 commented Jul 28, 2025

Summary

If a negative dimension is used with ConstantPad2d(), the export fails. This functionality isn't supported by XNNPACK, so this pr changes the node partitioner config such that negative dimension ConstantPadConfig nodes aren't partitioned. The issue is further detailed below #12456.

Test plan

Added a new test class replicating the error in the github issue with negative padding dimension.

@pytorch-bot
Copy link

pytorch-bot bot commented Jul 28, 2025

🔗 Helpful Links

🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/12935

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

✅ No Failures

As of commit 57f4364 with merge base 0305ddc (image):
💚 Looks good so far! There are no failures yet. 💚

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

@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Jul 28, 2025
@leafs1
Copy link
Contributor Author

leafs1 commented Jul 28, 2025

@pytorchbot label "release notes: none"

@pytorch-bot pytorch-bot bot added the release notes: none Do not include this in the release notes label Jul 28, 2025
Comment on lines 594 to 595
XNNPACK does not support negative padding values because the flatbuffer
schema expects unsigned integers for padding values.
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
XNNPACK does not support negative padding values because the flatbuffer
schema expects unsigned integers for padding values.
XNNPACK does not support cropping with negative padding sizes.

@leafs1 leafs1 merged commit 8426ac4 into pytorch:main Jul 29, 2025
173 of 174 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. release notes: none Do not include this in the release notes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants