Skip to content

[BUG] MaxUnpool2d/3d should check output dim before accessing its elements#163507

Closed
can-gaa-hou wants to merge 1 commit intopytorch:mainfrom
can-gaa-hou:maxunpool
Closed

[BUG] MaxUnpool2d/3d should check output dim before accessing its elements#163507
can-gaa-hou wants to merge 1 commit intopytorch:mainfrom
can-gaa-hou:maxunpool

Conversation

@can-gaa-hou
Copy link
Contributor

Fixes #163409

@pytorch-bot
Copy link

pytorch-bot bot commented Sep 22, 2025

🔗 Helpful Links

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

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

✅ No Failures

As of commit 1345ff2 with merge base edafc90 (image):
💚 Looks good so far! There are no failures yet. 💚

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

@pytorch-bot pytorch-bot bot added the release notes: mps Release notes category label Sep 22, 2025
@can-gaa-hou can-gaa-hou marked this pull request as ready for review September 22, 2025 15:52

int64_t oT = output_size[0];
int64_t oH = output_size[1];
int64_t oW = output_size[2];
Copy link
Collaborator

Choose a reason for hiding this comment

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

What is the purpose of moving the declarations around?

Copy link
Contributor

@malfet malfet Sep 22, 2025

Choose a reason for hiding this comment

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

Don't dereference 2nd index of output_size if output_size.length() is 0 or something (which I guess is validated by next TORCH_CHECK)

@malfet malfet changed the title [BUG] MaxUnpool2d/3d should check output size before accessing to it [BUG] MaxUnpool2d/3d should check output dim before accessing its elements Sep 22, 2025
@pytorch-bot pytorch-bot bot added the ciflow/mps Run MPS tests (subset of trunk) label Sep 22, 2025
@malfet malfet added the ciflow/trunk Trigger trunk jobs on your pull request label Sep 22, 2025
@malfet
Copy link
Contributor

malfet commented Sep 22, 2025

@pytorchbot merge

@pytorchmergebot
Copy link
Collaborator

Merge started

Your change will be merged once all checks pass (ETA 0-4 Hours).

Learn more about merging in the wiki.

Questions? Feedback? Please reach out to the PyTorch DevX Team

Advanced Debugging
Check the merge workflow status
here

@janeyx99 janeyx99 added the triaged This issue has been looked at a team member, and triaged and prioritized into an appropriate module label Sep 22, 2025
dsashidh pushed a commit to dsashidh/pytorch that referenced this pull request Sep 26, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ciflow/mps Run MPS tests (subset of trunk) ciflow/trunk Trigger trunk jobs on your pull request Merged open source release notes: mps Release notes category 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.

Segmentation fault in torch.nn.MaxUnpool3d

7 participants