Skip to content

feat: support mutating QDP plugins and preserve input writeback - #4761

Merged
narendasan merged 2 commits into
mainfrom
narendasan/inplace-plugin-mutations
Oct 6, 2026
Merged

narendasan merged 2 commits into
mainfrom
narendasan/inplace-plugin-mutations

Conversation

@narendasan

Copy link
Copy Markdown
Collaborator

Description

Build on PR #4279 against current main. Support None-returning mutations, preserve mutation-only graphs, and record explicit engine-boundary aliases. Carry the user output count through runtime serialization so hidden mutation bindings do not change model returns.

Add dynamic, multi-buffer, repeated-mutation, fallback, state-dict, and standalone AOT regressions. Schedule mutation smoke tests in fast CI and document the fake-kernel and standalone binding contracts.

Fixes # (issue)

Type of change

Please delete options that are not relevant and/or add your own.

  • New feature (non-breaking change which adds functionality)

Checklist:

  • My code follows the style guidelines of this project (You can use the linters)
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas and hacks
  • I have made corresponding changes to the documentation
  • I have added tests to verify my fix or my feature
  • New and existing unit tests pass locally with my changes
  • I have added the relevant labels to my PR in so that relevant reviewers are notified

@meta-cla meta-cla Bot added the cla signed label Sep 30, 2026
@github-actions github-actions Bot added documentation Improvements or additions to documentation component: tests Issues re: Tests component: lowering Issues re: The lowering / preprocessing passes component: conversion Issues re: Conversion stage component: core Issues re: The core compiler component: api [Python] Issues re: Python API component: runtime component: dynamo Issues relating to the `torch.compile` or `torch._dynamo.export` paths labels Sep 30, 2026
@github-actions
github-actions Bot requested a review from cehongwang September 30, 2026 22:59
@narendasan
narendasan requested a review from bowang007 October 1, 2026 22:22

@bowang007 bowang007 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@bowang007

Copy link
Copy Markdown
Collaborator

Might need to check the CI before merge.

@narendasan narendasan added this to the v2.15.0 milestone Oct 6, 2026
bowang007 and others added 2 commits October 6, 2026 17:57
Build on PR #4279 against current main. Support None-returning mutations, preserve mutation-only graphs, and record explicit engine-boundary aliases. Carry the user output count through runtime serialization so hidden mutation bindings do not change model returns.

Add dynamic, multi-buffer, repeated-mutation, fallback, state-dict, and standalone AOT regressions. Schedule mutation smoke tests in fast CI and document the fake-kernel and standalone binding contracts.
Preserving every unused mutable operator leaves unsupported aten.copy_ nodes in standalone engine exports when module buffers are not lifted. Preserve only copy_ writebacks from matching auto_functionalized_v2 base slots, retaining mutation-only custom operators while restoring constant-buffer export.

Validation: the complete Python-only runtime suite passed (143 passed, 102 skipped). The buffer API and mutation regression tests passed through both Python and native runtimes (14 each). All applicable pre-commit hooks passed on the changed file; the repository-wide run still reports unrelated hook failures.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci: full cla signed component: api [Python] Issues re: Python API component: conversion Issues re: Conversion stage component: core Issues re: The core compiler component: dynamo Issues relating to the `torch.compile` or `torch._dynamo.export` paths component: lowering Issues re: The lowering / preprocessing passes component: runtime component: tests Issues re: Tests documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants