pytorch / pytorch/executorch

ExecuTorch execution crashed for narrow_copy.default

Open
#13,556 2 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,)', 'ArgType.Dim -1', 'ArgType.Index -1', 'ArgType.Length 0']

error:

[tensor_impl.h:133] In function size(), assert failed (dim < dim_ && dim >= 0): Dimension out of range (expected to be in range of [0, 0], but got -1
zsh: abort
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 meta_tuple for narrow_copy.default: a bool tensor of shape (1,), dimension -1, index -1, and length 0. Read the assertion at tensor_impl.h:133 and trace the narrow_copy.default execution path to determine why the invalid dimension reaches size(). Done means the case no longer aborts and its expected 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
Active
Clarity
Needs clarification
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.