-
Notifications
You must be signed in to change notification settings - Fork 21.4k
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
squeeze: allow squeezing multiple dimensions at once #89017
Conversation
Ref #70924 This addresses part 1 of the issue, allowing `torch.squeeze` to be passed a tuple of dimensions. e.g. ```python x.squeeze(0).squeeze(0) ``` can now be written ```python x.squeeze(0, 1) ``` (assuming x has at least 2 dimensions) [ghstack-poisoned]
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/89017
Note: Links to docs will display an error until the docs builds have been completed. ✅ No FailuresAs of commit e44436d: This comment was automatically generated by Dr. CI and updates every 15 minutes. |
Ref #70924 This addresses part 1 of the issue, allowing `torch.squeeze` to be passed a tuple of dimensions. e.g. ```python x.squeeze(0).squeeze(0) ``` can now be written ```python x.squeeze(0, 1) ``` (assuming x has at least 2 dimensions) ghstack-source-id: 23ef534a3464c1ff347101fefcbc56772421d457 Pull Request resolved: #89017
Ref #70924 This addresses part 1 of the issue, allowing `torch.squeeze` to be passed a tuple of dimensions. e.g. ```python x.squeeze(0).squeeze(0) ``` can now be written ```python x.squeeze(0, 1) ``` (assuming x has at least 2 dimensions) [ghstack-poisoned]
Ref #70924 This addresses part 1 of the issue, allowing `torch.squeeze` to be passed a tuple of dimensions. e.g. ```python x.squeeze(0).squeeze(0) ``` can now be written ```python x.squeeze(0, 1) ``` (assuming x has at least 2 dimensions) ghstack-source-id: 0213d7ee9ec144aa5fdf09672c1040d85da65707 Pull Request resolved: #89017
Ref pytorch#70924 This addresses part 1 of the issue, allowing `torch.squeeze` to be passed a tuple of dimensions. e.g. ```python x.squeeze(0).squeeze(0) ``` can now be written ```python x.squeeze(0, 1) ``` (assuming x has at least 2 dimensions) ghstack-source-id: 0213d7ee9ec144aa5fdf09672c1040d85da65707 Pull Request resolved: pytorch#89017
Ref #70924 This addresses part 1 of the issue, allowing `torch.squeeze` to be passed a tuple of dimensions. e.g. ```python x.squeeze(0).squeeze(0) ``` can now be written ```python x.squeeze(0, 1) ``` (assuming x has at least 2 dimensions) [ghstack-poisoned]
Ref #70924 This addresses part 1 of the issue, allowing `torch.squeeze` to be passed a tuple of dimensions. e.g. ```python x.squeeze(0).squeeze(0) ``` can now be written ```python x.squeeze(0, 1) ``` (assuming x has at least 2 dimensions) ghstack-source-id: 8b633caac70900ddf35220ea66fd49d50726f7b1 Pull Request resolved: #89017
Ref #70924 This addresses part 1 of the issue, allowing `torch.squeeze` to be passed a tuple of dimensions. e.g. ```python x.squeeze(0).squeeze(0) ``` can now be written ```python x.squeeze(0, 1) ``` (assuming x has at least 2 dimensions) [ghstack-poisoned]
Ref #70924 This addresses part 1 of the issue, allowing `torch.squeeze` to be passed a tuple of dimensions. e.g. ```python x.squeeze(0).squeeze(0) ``` can now be written ```python x.squeeze(0, 1) ``` (assuming x has at least 2 dimensions) ghstack-source-id: 332e823eb6d1a46e1f1ebfc790e3295d1f1089bb Pull Request resolved: #89017
Ref #70924 This addresses part 1 of the issue, allowing `torch.squeeze` to be passed a tuple of dimensions. e.g. ```python x.squeeze(0).squeeze(0) ``` can now be written ```python x.squeeze(0, 1) ``` (assuming x has at least 2 dimensions) [ghstack-poisoned]
Ref #70924 This addresses part 1 of the issue, allowing `torch.squeeze` to be passed a tuple of dimensions. e.g. ```python x.squeeze(0).squeeze(0) ``` can now be written ```python x.squeeze(0, 1) ``` (assuming x has at least 2 dimensions) ghstack-source-id: e65942c9ef33d8c6a73aba8dd719c6fa5baece0e Pull Request resolved: #89017
Ref #70924 This addresses part 1 of the issue, allowing `torch.squeeze` to be passed a tuple of dimensions. e.g. ```python x.squeeze(0).squeeze(0) ``` can now be written ```python x.squeeze((0, 1)) ``` (assuming x has at least 2 dimensions) [ghstack-poisoned]
Ref #70924 This addresses part 1 of the issue, allowing `torch.squeeze` to be passed a tuple of dimensions. e.g. ```python x.squeeze(0).squeeze(0) ``` can now be written ```python x.squeeze((0, 1)) ``` (assuming x has at least 2 dimensions) ghstack-source-id: c4860734ba7154ab4073d632f3ad13def6a010f3 Pull Request resolved: #89017
@mruberry can you take care of this one? |
Ref pytorch#70924 This addresses part 1 of the issue, allowing `torch.squeeze` to be passed a tuple of dimensions. e.g. ```python x.squeeze(0).squeeze(0) ``` can now be written ```python x.squeeze((0, 1)) ``` (assuming x has at least 2 dimensions) ghstack-source-id: c4860734ba7154ab4073d632f3ad13def6a010f3 Pull Request resolved: pytorch#89017
…dimensions at once" Ref #70924 This addresses part 1 of the issue, allowing `torch.squeeze` to be passed a tuple of dimensions. e.g. ```python x.squeeze(0).squeeze(0) ``` can now be written ```python x.squeeze((0, 1)) ``` (assuming x has at least 2 dimensions) [ghstack-poisoned]
Ref #70924 This addresses part 1 of the issue, allowing `torch.squeeze` to be passed a tuple of dimensions. e.g. ```python x.squeeze(0).squeeze(0) ``` can now be written ```python x.squeeze((0, 1)) ``` (assuming x has at least 2 dimensions) ghstack-source-id: 9e7299c6b4622e12c5b4eb3706a2a50440a5db5e Pull Request resolved: #89017
Ref pytorch#70924 This addresses part 1 of the issue, allowing `torch.squeeze` to be passed a tuple of dimensions. e.g. ```python x.squeeze(0).squeeze(0) ``` can now be written ```python x.squeeze((0, 1)) ``` (assuming x has at least 2 dimensions) ghstack-source-id: c4860734ba7154ab4073d632f3ad13def6a010f3 Pull Request resolved: pytorch#89017
Ref pytorch#70924 This addresses part 1 of the issue, allowing `torch.squeeze` to be passed a tuple of dimensions. e.g. ```python x.squeeze(0).squeeze(0) ``` can now be written ```python x.squeeze((0, 1)) ``` (assuming x has at least 2 dimensions) ghstack-source-id: 9e7299c6b4622e12c5b4eb3706a2a50440a5db5e Pull Request resolved: pytorch#89017
Ref #70924 This addresses part 1 of the issue, allowing `torch.squeeze` to be passed a tuple of dimensions. e.g. ```python x.squeeze(0).squeeze(0) ``` can now be written ```python x.squeeze((0, 1)) ``` (assuming x has at least 2 dimensions) [ghstack-poisoned]
…ns at once" Ref #70924 This addresses part 1 of the issue, allowing `torch.squeeze` to be passed a tuple of dimensions. e.g. ```python x.squeeze(0).squeeze(0) ``` can now be written ```python x.squeeze((0, 1)) ``` (assuming x has at least 2 dimensions) cc mlazos soumith voznesenskym yanboliang penguinwu anijain2305 EikanWang jgong5 Guobing-Chen chunyuan-w XiaobingSuper zhuhaozhe blzheng Xia-Weiwen wenzhe-nrv jiayisunx desertfire [ghstack-poisoned]
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok!
@pytorchbot merge -f "ROCm timeout is unrelated" |
Merge startedYour change will be merged immediately since you used the force (-f) flag, bypassing any CI checks (ETA: 1-5 minutes). Learn more about merging in the wiki. Questions? Feedback? Please reach out to the PyTorch DevX Team |
Ref pytorch#70924 This addresses part 1 of the issue, allowing `torch.squeeze` to be passed a tuple of dimensions. e.g. ```python x.squeeze(0).squeeze(0) ``` can now be written ```python x.squeeze((0, 1)) ``` (assuming x has at least 2 dimensions) Pull Request resolved: pytorch#89017 Approved by: https://github.com/albanD
This PR is causing internal build failures with errors like
|
@pytorchbot revert -m "Internal breakages" -c ghfirst |
@pytorchbot successfully started a revert job. Check the current status here. |
@peterbell10 your PR has been successfully reverted. |
This reverts commit e26cb06. Reverted #89017 on behalf of https://github.com/mehtanirav due to Internal breakages
Next PR in the stack will also need to be reverted, why wasn't it reverted automatically? |
Looks like there was no conflict in reverting this PR independently. do we still need to revert #91602? |
Yes, even though there's no conflicts, #91602 relies on functionality introduced here. Could we have done a quick fix here instead? If unsigned comparison is the only problem, that's an easy forward fix. |
Ref #70924 This addresses part 1 of the issue, allowing `torch.squeeze` to be passed a tuple of dimensions. e.g. ```python x.squeeze(0).squeeze(0) ``` can now be written ```python x.squeeze((0, 1)) ``` (assuming x has at least 2 dimensions) cc mlazos soumith voznesenskym yanboliang penguinwu anijain2305 EikanWang jgong5 Guobing-Chen chunyuan-w XiaobingSuper zhuhaozhe blzheng Xia-Weiwen wenzhe-nrv jiayisunx desertfire [ghstack-poisoned]
Ref #70924 This addresses part 1 of the issue, allowing `torch.squeeze` to be passed a tuple of dimensions. e.g. ```python x.squeeze(0).squeeze(0) ``` can now be written ```python x.squeeze((0, 1)) ``` (assuming x has at least 2 dimensions) cc mlazos soumith voznesenskym yanboliang penguinwu anijain2305 EikanWang jgong5 Guobing-Chen chunyuan-w XiaobingSuper zhuhaozhe blzheng Xia-Weiwen wenzhe-nrv jiayisunx desertfire [ghstack-poisoned]
…t once" Ref #70924 This addresses part 1 of the issue, allowing `torch.squeeze` to be passed a tuple of dimensions. e.g. ```python x.squeeze(0).squeeze(0) ``` can now be written ```python x.squeeze((0, 1)) ``` (assuming x has at least 2 dimensions) cc mlazos soumith voznesenskym yanboliang penguinwu anijain2305 EikanWang jgong5 Guobing-Chen chunyuan-w XiaobingSuper zhuhaozhe blzheng Xia-Weiwen wenzhe-nrv jiayisunx desertfire [ghstack-poisoned]
Ref pytorch#70924 This addresses part 1 of the issue, allowing `torch.squeeze` to be passed a tuple of dimensions. e.g. ```python x.squeeze(0).squeeze(0) ``` can now be written ```python x.squeeze((0, 1)) ``` (assuming x has at least 2 dimensions) ghstack-source-id: c8cb5290cf011cbabc372c9d23fd6707c793297f Pull Request resolved: pytorch#89017
@pytorchbot merge |
Merge startedYour 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 |
Stack from ghstack (oldest at bottom):
Ref #70924
This addresses part 1 of the issue, allowing
torch.squeeze
to bepassed a tuple of dimensions. e.g.
can now be written
(assuming x has at least 2 dimensions)
cc @mlazos @soumith @voznesenskym @yanboliang @penguinwu @anijain2305 @EikanWang @jgong5 @Guobing-Chen @chunyuan-w @XiaobingSuper @zhuhaozhe @blzheng @Xia-Weiwen @wenzhe-nrv @jiayisunx @desertfire