pytorch / pytorch/executorch

Use fuse/expand_dims for squeeze unsqueeze

Open
#11,449 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

🚀 The feature, motivation and pitch

Right now to represent squeeze/unsqueeze (for conv1d) in our graph, we use XNNPACK's static_reshape operator. This has some limitations on dynamism. Let's instead move to the new operators (fuse_dims and expand_dims) in XNNPACK. This should provide better dynamism support around our squeeze/unsqueezes.

Alternatives

No response

Additional context

No response

RFC (Optional)

No response

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

Locate the current conv1d squeeze/unsqueeze handling that emits XNNPACK's static_reshape operator, then read the fuse_dims and expand_dims operator definitions. Done means the graph uses the newer operators and retains better dynamism support around squeeze and unsqueeze operations.

Written by the indexing model from the issue text.

Assessment

Domain
embedded-iot, machine-learning
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.