Skip to content

Conversation

@malfet
Copy link
Contributor

@malfet malfet commented Jun 9, 2025

Stack from ghstack (oldest at bottom):

By replacing TORCH_CHECK with TORCH_CHECK_VALUE

Also make redispatching from aliases an even simpler, by just calling
respective original class

Addresses feedback raised in https://github.com/pytorch/pytorch/pull/155383/files#r2133952368

cc @albanD

[ghstack-poisoned]
@pytorch-bot
Copy link

pytorch-bot bot commented Jun 9, 2025

🔗 Helpful Links

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

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

⏳ 6 Pending, 2 Unrelated Failures

As of commit 773e9f9 with merge base 79aef14 (image):

BROKEN TRUNK - The following job failed but were present on the merge base:

👉 Rebase onto the `viable/strict` branch to avoid these failures

UNSTABLE - The following job is marked as unstable, possibly due to flakiness on trunk:

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

@malfet malfet added the ci-no-td Do not run TD on this PR label Jun 9, 2025
@malfet malfet requested a review from Skylion007 June 9, 2025 14:21
@malfet malfet added topic: bc breaking topic category module: python frontend For issues relating to PyTorch's Python frontend labels Jun 9, 2025
[ghstack-poisoned]
[ghstack-poisoned]
@malfet malfet added release notes: python_frontend python frontend release notes category triaged This issue has been looked at a team member, and triaged and prioritized into an appropriate module and removed module: python frontend For issues relating to PyTorch's Python frontend labels Jun 9, 2025
[ghstack-poisoned]
malfet added a commit that referenced this pull request Jun 9, 2025
By replacing `TORCH_CHECK` with `TORCH_CHECK_VALUE`

Also make redispatching from aliases an even simpler, by just calling
respective original class

Addresses feedback raised in https://github.com/pytorch/pytorch/pull/155383/files#r2133952368

ghstack-source-id: 9b571d4
Pull Request resolved: #155460
@malfet
Copy link
Contributor Author

malfet commented Jun 9, 2025

@pytorchbot merge

@pytorch-bot pytorch-bot bot added the ciflow/trunk Trigger trunk jobs on your pull request label Jun 9, 2025
@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

@pytorchmergebot
Copy link
Collaborator

Merge failed

Reason: 1 mandatory check(s) failed. The first few are:

Dig deeper by viewing the failures on hud

Details for Dev Infra team Raised by workflow job

Failing merge rule: Core Maintainers

@malfet
Copy link
Contributor Author

malfet commented Jun 9, 2025

@pytorchbot merge -i

@pytorchmergebot
Copy link
Collaborator

Merge started

Your change will be merged while ignoring the following 2 checks: pull / linux-jammy-py3-clang12-executorch / test (executorch, 1, 1, linux.2xlarge, unstable), pull / cuda12.8-py3.10-gcc9-sm75 / test (pr_time_benchmarks, 1, 1, linux.g4dn.metal.nvidia.gpu)

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

@malfet
Copy link
Contributor Author

malfet commented Jun 9, 2025

@pytorchbot merge -f "This seems fine"

@pytorchmergebot
Copy link
Collaborator

The merge job was canceled or timed out. This most often happen if two merge requests were issued for the same PR, or if merge job was waiting for more than 6 hours for tests to finish. In later case, please do not hesitate to reissue the merge command
For more information see pytorch-bot wiki.

@pytorchmergebot
Copy link
Collaborator

Merge started

Your change will be merged immediately since you used the force (-f) flag, bypassing any CI checks (ETA: 1-5 minutes). Please use -f as last resort and instead consider -i/--ignore-current to continue the merge ignoring current failures. This will allow currently pending tests to finish and report signal before the merge.

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

@github-actions github-actions bot deleted the gh/malfet/386/head branch July 13, 2025 02:22
@jbschlosser
Copy link
Contributor

@malfet FYI I'm working on a BC-breaking note for this PR and realized that the change only affects the dimname overload of cat() / concatenate(). Was this intentional?

@malfet
Copy link
Contributor Author

malfet commented Jul 14, 2025

@jbschlosser Thank you for flagging, looks like it's not really a BC breaking, as in 2.7 the call to torch.cat with empty tensor crashed, but in 2.8 it'll return value error.

% python -c "import torch; print(torch.__version__);torch.concatenate([], dim='N')"   
2.7.1
zsh: segmentation fault  python -c 

vs

% python -c "import torch; print(torch.__version__);torch.concatenate([], dim='N')"        
2.8.0
Traceback (most recent call last):
  File "<string>", line 1, in <module>
ValueError: expected a non-empty list of Tensors

@jbschlosser
Copy link
Contributor

jbschlosser commented Jul 14, 2025

@malfet

>>> import torch
>>> torch.cat([])
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
RuntimeError: torch.cat(): expected a non-empty list of Tensors
>>> torch.cat([], dim='N')
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ValueError: expected a non-empty list of Tensors

so there's a divergence now wrt error type between dimname and non-dimname overloads

@jbschlosser
Copy link
Contributor

looks like it's not really a BC breaking, as in 2.7 the call to torch.cat with empty tensor crashed, but in 2.8 it'll return value error.

ah okay, sounds good! thanks for clarifying

@malfet malfet added topic: not user facing topic category and removed topic: bc breaking topic category labels Jul 14, 2025
malfet added a commit that referenced this pull request Jul 16, 2025
Followup after #155460

From [Python documentation](https://docs.python.org/3/library/exceptions.html#ValueError):
> Raised when an operation or function receives an argument that has the right type but an inappropriate value, and the situation is not described by a more precise exception such as IndexError.
malfet added a commit that referenced this pull request Jul 20, 2025
Followup after #155460

From [Python documentation](https://docs.python.org/3/library/exceptions.html#ValueError):
> Raised when an operation or function receives an argument that has the right type but an inappropriate value, and the situation is not described by a more precise exception such as IndexError.
pytorchmergebot pushed a commit that referenced this pull request Jul 20, 2025
Followup after #155460

From [Python documentation](https://docs.python.org/3/library/exceptions.html#ValueError):
> Raised when an operation or function receives an argument that has the right type but an inappropriate value, and the situation is not described by a more precise exception such as IndexError.

Raise [`TypeError`](https://docs.python.org/3/library/exceptions.html#TypeError) when input-output types are incompatible with each other
> Raised when an operation or function is applied to an object of inappropriate type. The associated value is a string giving details about the type mismatch.

> This exception may be raised by user code to indicate that an attempted operation on an object is not supported, and is not meant to be. If an object is meant to support a given operation but has not yet provided an implementation, [NotImplementedError](https://docs.python.org/3/library/exceptions.html#NotImplementedError) is the proper exception to raise.

Pull Request resolved: #158249
Approved by: https://github.com/jbschlosser, https://github.com/Skylion007, https://github.com/albanD
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci-no-td Do not run TD on this PR ciflow/trunk Trigger trunk jobs on your pull request Merged release notes: python_frontend python frontend release notes category 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.

6 participants