Skip to content

[ExecuTorch][WebGPU] Add clone op (aten.clone.default)#20460

Open
JulianCloudNTH wants to merge 1 commit into
gh/JulianCloudNTH/55/basefrom
gh/JulianCloudNTH/55/head
Open

[ExecuTorch][WebGPU] Add clone op (aten.clone.default)#20460
JulianCloudNTH wants to merge 1 commit into
gh/JulianCloudNTH/55/basefrom
gh/JulianCloudNTH/55/head

Conversation

@JulianCloudNTH

Copy link
Copy Markdown
Contributor

Stack from ghstack (oldest at bottom):

  • (to be filled)

aten.clone.default is a pure flat copy on the buffer-only WebGPU backend, identical to view_copy: clone_impl reuses the existing add_flat_copy helper (output[i] = input[i]) and registers a handler under aten.clone.default. No new shader, generated WGSL header, or CMake source — it shares the view_copy flat-copy compute pipeline. Required for end-to-end Llama 3.2 1B (4-bit, KV cache): the exported model serializes 2 aten.clone.default ops into its runtime operator chain (the RoPE-frequency clones reused across all 16 transformer layers), so without a handler the partition graph-breaks at those nodes. Mirrors the Vulkan delegate, which registers the same op and routes a buffer clone to a flat view-copy.

Differential Revision: D109477717

[ghstack-poisoned]
@pytorch-bot

pytorch-bot Bot commented Jun 23, 2026

Copy link
Copy Markdown

🔗 Helpful Links

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

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:

❌ 2 New Failures, 4 Unrelated Failures, 1 Unclassified Failure

As of commit 75f3e80 with merge base 1b726b2 (image):

NEW FAILURES - The following jobs have failed:

UNCLASSIFIED FAILURE - DrCI could not classify the following job because the workflow did not run on the merge base. The failure may be pre-existing on trunk or introduced by this PR:

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

BROKEN TRUNK - The following jobs 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.

@github-actions

Copy link
Copy Markdown

This PR needs a release notes: label

If your change should be included in the release notes (i.e. would users of this library care about this change?), please use a label starting with release notes:. This helps us keep track and include your important work in the next release notes.

To add a label, you can comment to pytorchbot, for example
@pytorchbot label "release notes: none"

For more information, see
https://github.com/pytorch/pytorch/wiki/PyTorch-AutoLabel-Bot#why-categorize-for-release-notes-and-how-does-it-work.

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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants