Conversation
jlarson4
reviewed
Sep 30, 2026
jlarson4
left a comment
Collaborator
There was a problem hiding this comment.
Hey @yuanwuyuan9, thanks for the contribution! Just one note about test location
Collaborator
|
Looks good! Thanks for the contribution @yuanwuyuan9 |
1 task done
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
torch.stackandtorch.catrecurse indefinitely when their input sequence containsCompositionScores: the current dispatch unwraps only top-level arguments and passes nested wrappers back to PyTorch.Recursively unwrap wrappers in lists, tuples, and dictionary values before calling the torch function. Preserve ordinary arguments and the existing tensor-return behavior. No new dependencies.
Add 16 regression cases covering stack/cat, list/tuple inputs, positional/keyword arguments, and mixed wrapper/tensor inputs. All 16 fail with
RecursionErrorbefore the fix and pass afterward.Fixes #1839
Type of change
Validation
make unit-testgit diff --checkThe unit suite ran on CPU with
OMP_NUM_THREADS=1 MKL_NUM_THREADS=1; uv synchronization was disabled to preserve the installed environment and lockfile. One test intest_benchmark_gated_hooks_fire.pyrequired a rerun. All four tests in that file subsequently passed with--reruns 0; the initial failure cause remains undetermined. Fullmake test-prand CI have not been verified locally.Checklist