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

[BE] Do not crash weight_norm on empty tensors #128701

Closed
wants to merge 9 commits into from

Conversation

malfet
Copy link
Contributor

@malfet malfet commented Jun 14, 2024

Test plan:

  • python3 -c "import torch;print(torch._weight_norm(torch.rand((3, 0)), torch.rand((3, 0))))"
  • Add OpInfo with empty input for weight norm
  • Skip the tests that fail (functorch ones for example) as well as dtypes, because it might look like it "works" for integral types

Fixes #128695

@malfet malfet requested review from ezyang, albanD and a team June 14, 2024 14:36
Copy link

pytorch-bot bot commented Jun 14, 2024

🔗 Helpful Links

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

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

❗ 1 Active SEVs

There are 1 currently active SEVs. If your PR is affected, please view them below:

❌ 23 New Failures, 1 Unrelated Failure

As of commit e9513a6 with merge base 0344f95 (image):

NEW FAILURES - The following jobs have failed:

UNSTABLE - The following job failed but was likely due to flakiness present on trunk and has been marked as unstable:

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

@pytorch-bot pytorch-bot bot added ciflow/mps Run MPS tests (subset of trunk) release notes: mps Release notes category labels Jun 14, 2024
@malfet malfet added release notes: python_frontend release notes category topic: bug fixes topic category and removed release notes: mps Release notes category labels Jun 14, 2024
@malfet malfet force-pushed the malfet/be-check-weight-norm-empty branch from 43ee27c to 19b88f2 Compare June 15, 2024 00:43
@malfet malfet requested a review from mruberry as a code owner June 15, 2024 00:43
@malfet
Copy link
Contributor Author

malfet commented Jun 18, 2024

Closing in favor of stack ending in #128958

@malfet malfet closed this Jun 18, 2024
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) release notes: python_frontend release notes category topic: bug fixes topic category
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Segmentation fault (core dumped) in torch._weight_norm_interface
2 participants