pytorch / pytorch/executorch

ExecuTorch execution failed for masked_select.default

Open
#13,585 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

module: kernels triaged
Dominant language
Python
Stars
5k
Forks
1.2k
Avg merge
2d 10h
Merged PRs (30d)
581

Description

🕵️‍♂️ Detected with FACTO
🐛 Describe the bug

FACTO Generated meta_tuple:

['ArgType.Tensor torch.bool (1, 6, 8)', 'ArgType.Tensor torch.bool (2, 2, 2, 8, 1, 8)']

error:

[tensor_impl.cpp:127] Attempted to resize a bounded tensor with a maximum capacity of 392 elements to 4368 elements.
[op_masked_select.cpp:74] Check failed (resize_tensor(out, {out_numel}) == Error::Ok): 
[method.cpp:1353] KernelCall failed at instruction 0:0 in operator aten::masked_select.out: 0x12
[method.cpp:1359] arg 0 with type id 1
[method.cpp:1359] arg 1 with type id 1
[method.cpp:1359] arg 2 with type id 1
[method.cpp:1359] arg 3 with type id 1
Versions

nightly

cc @larryliu0820

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the FACTO-generated masked_select.default case with the two reported tensor shapes, then inspect op_masked_select.cpp and tensor_impl.cpp around the reported checks. Trace why the bounded output capacity is insufficient; done means this input no longer fails the resize check and the relevant behavior is covered by a regression test.

Written by the indexing model from the issue text.

Assessment

Tech stack
pytorch
Domain
embedded-iot, machine-learning
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.