Skip to content

[inductor] add lowering for repeat_interleave.Tensor with output size specified (#147160) #158462

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 34 commits into
base: gh/v0i0/1/base
Choose a base branch
from

Conversation

Copy link

pytorch-bot bot commented Jul 16, 2025

🔗 Helpful Links

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

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

✅ You can merge normally! (1 Unrelated Failure)

As of commit 66109f5 with merge base 2507ae6 (image):

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

  • pull / linux-jammy-py3_9-clang9-xla / test (xla, 1, 1, linux.12xlarge, unstable) (gh) (#158876)
    /var/lib/jenkins/workspace/xla/torch_xla/csrc/runtime/BUILD:476:14: Compiling torch_xla/csrc/runtime/xla_util_test.cpp failed: (Exit 1): gcc failed: error executing CppCompile command (from target //torch_xla/csrc/runtime:xla_util_test) /usr/bin/gcc -U_FORTIFY_SOURCE -fstack-protector -Wall -Wunused-but-set-parameter -Wno-free-nonheap-object -fno-omit-frame-pointer -g0 -O2 '-D_FORTIFY_SOURCE=1' -DNDEBUG -ffunction-sections ... (remaining 229 arguments skipped)

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

Copy link

linux-foundation-easycla bot commented Jul 16, 2025

CLA Signed

The committers listed above are authorized under a signed CLA.

v0i0 added a commit that referenced this pull request Jul 16, 2025
@v0i0
Copy link
Contributor Author

v0i0 commented Jul 16, 2025

@pytorchbot label "topic: not user facing"

@pytorch-bot pytorch-bot bot added the topic: not user facing topic category label Jul 16, 2025
v0i0 added a commit that referenced this pull request Jul 16, 2025
@v0i0 v0i0 requested a review from eellison July 16, 2025 18:15
@v0i0 v0i0 self-assigned this Jul 16, 2025
@v0i0
Copy link
Contributor Author

v0i0 commented Jul 16, 2025

/easycla

Copy link
Contributor

@eellison eellison left a comment

Choose a reason for hiding this comment

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

Nice! just one comment.

[ghstack-poisoned]
v0i0 added a commit that referenced this pull request Jul 16, 2025
[ghstack-poisoned]
v0i0 added a commit that referenced this pull request Jul 16, 2025
[ghstack-poisoned]
v0i0 added a commit that referenced this pull request Jul 16, 2025
[ghstack-poisoned]
v0i0 added a commit that referenced this pull request Jul 16, 2025
v0i0 added a commit that referenced this pull request Jul 16, 2025
v0i0 added a commit that referenced this pull request Jul 17, 2025
v0i0 added a commit that referenced this pull request Jul 17, 2025
davidberard98 added a commit that referenced this pull request Aug 4, 2025
…put size specified (#147160) (#158462)"

This reverts commit 305a037.

Reason: causes device-side assertion failures when running with this repro (a minimized version of a failure seen in a real model)

```
import torch
def ri(inp, repeats, output_size):
    return torch.repeat_interleave(inp, repeats, output_size=output_size)
inp = torch.arange(0, 4, device="cuda").reshape(-1, 1)
x = torch.tensor([1, 2, 3, 4], device="cuda")
ri_c = torch.compile(ri)
print(ri(inp, x, 10))
print(ri_c(inp, x, 10))
```

ghstack-source-id: 4da3b4e
Pull Request resolved: #159798
davidberard98 added a commit that referenced this pull request Aug 4, 2025
…_interleave.Tensor with output size specified (#147160) (#158462)""


This reverts commit 305a037.

Reason: causes device-side assertion failures when running with this repro (a minimized version of a failure seen in a real model)

```
import torch
def ri(inp, repeats, output_size):
    return torch.repeat_interleave(inp, repeats, output_size=output_size)
inp = torch.arange(0, 4, device="cuda").reshape(-1, 1)
x = torch.tensor([1, 2, 3, 4], device="cuda")
ri_c = torch.compile(ri)
print(ri(inp, x, 10))
print(ri_c(inp, x, 10))
```

which leads to errors like

```
/tmp/torchinductor_dberard/3h/c3hlb22fpptebupstsuhl6kexa6z3upgbnyxln7c24gfcr5747iu.py:30: unknown: block: [0,0,0], thread: [10,0,0] Assertion `index out of bounds: 0 <= tmp5 < 4` failed.
```

cc voznesenskym penguinwu EikanWang jgong5 Guobing-Chen XiaobingSuper zhuhaozhe blzheng wenzhe-nrv jiayisunx ipiszy chenyang78 kadeng muchulee8 amjames chauhang aakhundov coconutruben

Differential Revision: [D79591561](https://our.internmc.facebook.com/intern/diff/D79591561)

[ghstack-poisoned]
davidberard98 added a commit that referenced this pull request Aug 4, 2025
…or with output size specified (#147160) (#158462)""


This reverts commit 305a037.

Reason: causes device-side assertion failures when running with this repro (a minimized version of a failure seen in a real model)

```
import torch
def ri(inp, repeats, output_size):
    return torch.repeat_interleave(inp, repeats, output_size=output_size)
inp = torch.arange(0, 4, device="cuda").reshape(-1, 1)
x = torch.tensor([1, 2, 3, 4], device="cuda")
ri_c = torch.compile(ri)
print(ri(inp, x, 10))
print(ri_c(inp, x, 10))
```

which leads to errors like

```
/tmp/torchinductor_dberard/3h/c3hlb22fpptebupstsuhl6kexa6z3upgbnyxln7c24gfcr5747iu.py:30: unknown: block: [0,0,0], thread: [10,0,0] Assertion `index out of bounds: 0 <= tmp5 < 4` failed.
```

cc voznesenskym penguinwu EikanWang jgong5 Guobing-Chen XiaobingSuper zhuhaozhe blzheng wenzhe-nrv jiayisunx ipiszy chenyang78 kadeng muchulee8 amjames chauhang aakhundov coconutruben

Differential Revision: [D79591561](https://our.internmc.facebook.com/intern/diff/D79591561)

[ghstack-poisoned]
davidberard98 added a commit that referenced this pull request Aug 4, 2025
…put size specified (#147160) (#158462)"

This reverts commit 305a037.

Reason: causes device-side assertion failures when running with this repro (a minimized version of a failure seen in a real model)

```
import torch
def ri(inp, repeats, output_size):
    return torch.repeat_interleave(inp, repeats, output_size=output_size)
inp = torch.arange(0, 4, device="cuda").reshape(-1, 1)
x = torch.tensor([1, 2, 3, 4], device="cuda")
ri_c = torch.compile(ri)
print(ri(inp, x, 10))
print(ri_c(inp, x, 10))
```

ghstack-source-id: 09f0152
Pull Request resolved: #159798
pytorchmergebot pushed a commit that referenced this pull request Aug 4, 2025
…put size specified (#147160) (#158462)" (#159798)

This reverts commit 305a037.

Reason: causes device-side assertion failures when running with this repro (a minimized version of a failure seen in a real model)

```
import torch
def ri(inp, repeats, output_size):
    return torch.repeat_interleave(inp, repeats, output_size=output_size)
inp = torch.arange(0, 4, device="cuda").reshape(-1, 1)
x = torch.tensor([1, 2, 3, 4], device="cuda")
ri_c = torch.compile(ri)
print(ri(inp, x, 10))
print(ri_c(inp, x, 10))
```

which leads to errors like

```
/tmp/torchinductor_dberard/3h/c3hlb22fpptebupstsuhl6kexa6z3upgbnyxln7c24gfcr5747iu.py:30: unknown: block: [0,0,0], thread: [10,0,0] Assertion `index out of bounds: 0 <= tmp5 < 4` failed.
```

Differential Revision: [D79591561](https://our.internmc.facebook.com/intern/diff/D79591561)
Pull Request resolved: #159798
Approved by: https://github.com/danzimm
…output size specified (#147160)"

cc voznesenskym penguinwu EikanWang jgong5 Guobing-Chen XiaobingSuper zhuhaozhe blzheng wenzhe-nrv jiayisunx ipiszy chenyang78 kadeng muchulee8 amjames chauhang aakhundov coconutruben

[ghstack-poisoned]
v0i0 added a commit that referenced this pull request Aug 6, 2025
@v0i0 v0i0 reopened this Aug 6, 2025
…output size specified (#147160)"

cc voznesenskym penguinwu EikanWang jgong5 Guobing-Chen XiaobingSuper zhuhaozhe blzheng wenzhe-nrv jiayisunx ipiszy chenyang78 kadeng muchulee8 amjames chauhang aakhundov coconutruben

[ghstack-poisoned]
v0i0 added a commit that referenced this pull request Aug 6, 2025
[ghstack-poisoned]
v0i0 added a commit that referenced this pull request Aug 7, 2025
…output size specified (#147160)"

cc voznesenskym penguinwu EikanWang jgong5 Guobing-Chen XiaobingSuper zhuhaozhe blzheng wenzhe-nrv jiayisunx ipiszy chenyang78 kadeng muchulee8 amjames chauhang aakhundov coconutruben

[ghstack-poisoned]
v0i0 added a commit that referenced this pull request Aug 7, 2025
@v0i0
Copy link
Contributor Author

v0i0 commented Aug 7, 2025

@pytorchbot merge

@pytorchmergebot
Copy link
Collaborator

Merge failed

Reason: Found an unexpected number of PRs mentioned in commit 95f858b: 2. This is probably because you are using an old version of ghstack. Please update ghstack and resubmit your PRs

Details for Dev Infra team Raised by workflow job

v0i0 added a commit that referenced this pull request Aug 7, 2025
[ghstack-poisoned]
v0i0 added a commit that referenced this pull request Aug 8, 2025
v0i0 added a commit that referenced this pull request Aug 8, 2025
@v0i0
Copy link
Contributor Author

v0i0 commented Aug 11, 2025

@pytorchbot merge

@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: Command git -C /home/runner/work/pytorch/pytorch cherry-pick -x 6efbbd62df8e148f48e6a0ebc50bab2240ebf6ad returned non-zero exit code 1

Auto-merging test/inductor/test_torchinductor.py
CONFLICT (content): Merge conflict in test/inductor/test_torchinductor.py
error: could not apply 6efbbd62df8... [inductor] fix triton bucketize mask propagation
hint: After resolving the conflicts, mark them with
hint: "git add/rm <pathspec>", then run
hint: "git cherry-pick --continue".
hint: You can instead skip this commit with "git cherry-pick --skip".
hint: To abort and get back to the state before "git cherry-pick",
hint: run "git cherry-pick --abort".
hint: Disable this message with "git config set advice.mergeConflict false"
Details for Dev Infra team Raised by workflow job

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants