Skip to content

Replace split_with_sizes_copy with slice_copy #10318

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 1 commit into
base: main
Choose a base branch
from

Conversation

mcremon-meta
Copy link
Contributor

Summary:
This is useful for a few reasons, which are all related to the fact that we have a lot of things in place for slice ops, so the compiler can optimize much better if we replace split_with_sizes. That includes:

  • swapping with q/dq nodes to do it in lower bitwidth
  • becoming slice_nop when possible (through memory planning constraints)
  • a few simplification passes on slices
  • possibly finding patterns with slice/cat being a nop
  • we have an optimized slice op on HiFi already. We will get the split op soon to be fair, we can do some profiling then, but the above points will still stand

Differential Revision: D73312379

@mcremon-meta mcremon-meta requested a review from tarun292 as a code owner April 20, 2025 22:57
Copy link

pytorch-bot bot commented Apr 20, 2025

🔗 Helpful Links

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

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

❗ 1 Active SEVs

There are 1 currently active SEVs. If your PR is affected, please view them below:

❌ 8 New Failures, 2 Unrelated Failures

As of commit fb7f1cf with merge base 06f912d (image):

NEW FAILURES - The following jobs have failed:

FLAKY - The following job failed but was likely due to flakiness present on trunk:

BROKEN TRUNK - The following job failed but was present on the merge base:

👉 Rebase onto the `viable/strict` branch to avoid these failures

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

@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Apr 20, 2025
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D73312379

mcremon-meta added a commit that referenced this pull request Apr 20, 2025
Summary:

This is useful for a few reasons, which are all related to the fact that we have a lot of things in place for slice ops, so the compiler can optimize much better if we replace `split_with_sizes`. That includes:
- swapping with q/dq nodes to do it in lower bitwidth
- becoming slice_nop when possible (through memory planning constraints)
- a few simplification passes on slices
- possibly finding patterns with slice/cat being a nop
- we have an optimized slice op on HiFi already. We will get the split op soon to be fair, we can do some profiling then, but the above points will still stand

Differential Revision: D73312379
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D73312379

mcremon-meta added a commit that referenced this pull request Apr 20, 2025
Summary:
Pull Request resolved: #10318

This is useful for a few reasons, which are all related to the fact that we have a lot of things in place for slice ops, so the compiler can optimize much better if we replace `split_with_sizes`. That includes:
- swapping with q/dq nodes to do it in lower bitwidth
- becoming slice_nop when possible (through memory planning constraints)
- a few simplification passes on slices
- possibly finding patterns with slice/cat being a nop
- we have an optimized slice op on HiFi already. We will get the split op soon to be fair, we can do some profiling then, but the above points will still stand

Differential Revision: D73312379
mcremon-meta added a commit that referenced this pull request Apr 21, 2025
Summary:

This is useful for a few reasons, which are all related to the fact that we have a lot of things in place for slice ops, so the compiler can optimize much better if we replace `split_with_sizes`. That includes:
- swapping with q/dq nodes to do it in lower bitwidth
- becoming slice_nop when possible (through memory planning constraints)
- a few simplification passes on slices
- possibly finding patterns with slice/cat being a nop
- we have an optimized slice op on HiFi already. We will get the split op soon to be fair, we can do some profiling then, but the above points will still stand

Differential Revision: D73312379
Summary:
Pull Request resolved: #10318

This is useful for a few reasons, which are all related to the fact that we have a lot of things in place for slice ops, so the compiler can optimize much better if we replace `split_with_sizes`. That includes:
- swapping with q/dq nodes to do it in lower bitwidth
- becoming slice_nop when possible (through memory planning constraints)
- a few simplification passes on slices
- possibly finding patterns with slice/cat being a nop
- we have an optimized slice op on HiFi already. We will get the split op soon to be fair, we can do some profiling then, but the above points will still stand

Differential Revision: D73312379
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D73312379

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. fb-exported topic: not user facing
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants