Nothing Special   »   [go: up one dir, main page]

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 degenerate shape behavior for ord=+/-2 #60273

Closed
wants to merge 4 commits into from

Conversation

kurtamohler
Copy link
Collaborator

Fixes #59198

@facebook-github-bot
Copy link
Contributor
facebook-github-bot commented Jun 18, 2021

💊 CI failures summary and remediations

As of commit d7286cb (more details on the Dr. CI page and at hud.pytorch.org/pr/60273):


💚 💚 Looks good so far! There are no failures yet. 💚 💚


This comment was automatically generated by Dr. CI (expand for details).Follow this link to opt-out of these comments for your Pull Requests.

Please report bugs/suggestions to the (internal) Dr. CI Users group.

Click here to manually regenerate this comment.

@kurtamohler kurtamohler force-pushed the linalg_norm-shape-fix branch from 3e68a39 to 0968dfc Compare June 18, 2021 21:11
@anjali411 anjali411 added the triaged This issue has been looked at a team member, and triaged and prioritized into an appropriate module label Jun 21, 2021
aten/src/ATen/native/LinearAlgebra.cpp Outdated Show resolved Hide resolved
test/test_linalg.py Outdated Show resolved Hide resolved
@kurtamohler kurtamohler force-pushed the linalg_norm-shape-fix branch from 0968dfc to 7c9981e Compare June 22, 2021 19:41
Copy link
Collaborator
@pmeier pmeier left a comment

Choose a reason for hiding this comment

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

Since this PR fixes #59198, please also remove

pytorch/test/test_linalg.py

Lines 1973 to 1977 in b0c9762

# TODO: This was disabled in https://github.com/pytorch/pytorch/pull/59067, because it failed after
# fixing the underlying comparison mechanism. It should have never been passing in the first place.
# This should be reinstated as soon as https://github.com/pytorch/pytorch/issues/59198 is fixed.
if input_size in ((S, S, 0), (1, S, 0)) and not keepdim and ord in (2, -2):
continue

@kurtamohler kurtamohler force-pushed the linalg_norm-shape-fix branch from 7c9981e to 7d22a4d Compare June 23, 2021 06:23
@kurtamohler kurtamohler force-pushed the linalg_norm-shape-fix branch from 7d22a4d to d7286cb Compare June 23, 2021 21:20
@codecov
Copy link
codecov bot commented Jun 24, 2021

Codecov Report

Merging #60273 (d7286cb) into master (555c154) will decrease coverage by 0.00%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master   #60273      +/-   ##
==========================================
- Coverage   76.11%   76.11%   -0.01%     
==========================================
  Files        2058     2058              
  Lines      205791   205784       -7     
==========================================
- Hits       156630   156623       -7     
  Misses      49161    49161              

Copy link
Collaborator
@mruberry mruberry left a comment

Choose a reason for hiding this comment

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

Awesome! Thanks @kurtamohler!

@facebook-github-bot
Copy link
Contributor

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

@facebook-github-bot
Copy link
Contributor

@mruberry merged this pull request in b39770c.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla signed Merged module: norms and normalization open source 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.

Output shape of torch.linalg.norm diverges from numpy equivalent in edge case.
7 participants