Skip to content

Fix mutated-buffer tagging after indirect mutation detection change - #22296

Open
metascroy wants to merge 1 commit into
mainfrom
fix-mutable-buffer
Open

Fix mutated-buffer tagging after indirect mutation detection change#22296
metascroy wants to merge 1 commit into
mainfrom
fix-mutable-buffer

Conversation

@metascroy

Copy link
Copy Markdown
Contributor

PR #22172 updated tag_constant_data() to identify mutated buffers through the exported program’s graph signature. However, tag_mutated_buffer() retained the previous direct-user heuristic.

This left indirectly mutated buffers outside delegate partitions. For MLX KV-cache models, the cache became a delegate input while its updated value was also assigned an output slot, causing:

Slot for getitem already set to Output, trying to set to Input
Update tag_mutated_buffer() to use the same graph-signature-based detection as tag_constant_data() and add regression coverage for indirect buffer mutation.

@pytorch-bot

pytorch-bot Bot commented Aug 29, 2026

Copy link
Copy Markdown

🔗 Helpful Links

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

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

❌ You can merge normally! (1 Unrelated Failure), 1 Unclassified Failure

As of commit 4fe4109 with merge base 0447246 (image):

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:

BROKEN TRUNK - The following job failed but were 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.

@meta-cla meta-cla 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 Aug 29, 2026
@metascroy metascroy added ciflow/mlx and removed CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. labels Aug 29, 2026
@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.

@meta-cla meta-cla 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 Aug 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ciflow/mlx 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.

1 participant