8000 Treat dim=[] same as dim=None by Silv3S · Pull Request #153570 · pytorch/pytorch · GitHub
[go: up one dir, main page]

Skip to content

Treat dim=[] same as dim=None #153570

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

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open

Treat dim=[] same as dim=None #153570

wants to merge 4 commits into from

Conversation

Silv3S
Copy link
@Silv3S Silv3S commented May 14, 2025

Fixes #153568

Copy link
pytorch-bot bot commented May 14, 2025

🔗 Helpful Links

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

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

✅ No Failures

As of commit 2ae477b with merge base 5e6e52e (image):
💚 Looks good so far! There are no failures yet. 💚

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

@soulitzer soulitzer added the triaged This issue has been looked at a team member, and triaged and prioritized into an appropriate module label May 15, 2025
Copy link
pytorch-bot bot commented May 15, 2025

❌ 🤖 pytorchbot command failed:

@pytorchbot: error: argument command: invalid choice: 'topic:' (choose from 'merge', 'revert', 'rebase', 'label', 'drci', 'cherry-pick', 'close')

usage: @pytorchbot [-h] {merge,revert,rebase,label,drci,cherry-pick,close} ...

Try @pytorchbot --help for more info.

@Silv3S
Copy link
Author
Silv3S commented May 15, 2025

@pytorchbot label "topic: not user facing"

@pytorch-bot pytorch-bot bot added the topic: not user facing topic category label May 15, 2025
@ngimel
Copy link
Collaborator
ngimel commented May 15, 2025

Add a test please

@Silv3S
Copy link
Author
Silv3S commented May 16, 2025

Test added, without fix it fails on

test/test_linalg.py::TestLinalgCPU::test_vector_norm_compile_cpu - AssertionError: The values for attribute 'shape' do not match: torch.Size([]) != torch.Size([16, 32])

@@ -1929,6 +1929,13 @@ def test_vector_norm_reduce_over_1D_vector(self, device, dtype):
msg = f'input.size()={input.size()}, ord={ord}, dim={dim}, keepdim={keepdim}, dtype={dtype}'
self.assertEqual(result, result_numpy, msg=msg)

def test_vector_norm_compile(self, device):
Copy link
Collaborator

Choose a reason for hiding this comment

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

this would be better in test/inductor

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
open source topic: not user facing topic 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.

torch.linalg.vector_norm regression in torch.compile in PT2.8
5 participants
0