Skip to content

Scope DeepCompile compiler state to engine lifecycles#8159

Draft
tohtana wants to merge 1 commit into
deepspeedai:masterfrom
tohtana:tohtana/deepcompile-compiler-lifecycle-standalone
Draft

Scope DeepCompile compiler state to engine lifecycles#8159
tohtana wants to merge 1 commit into
deepspeedai:masterfrom
tohtana:tohtana/deepcompile-compiler-lifecycle-standalone

Conversation

@tohtana

@tohtana tohtana commented Jul 19, 2026

Copy link
Copy Markdown
Collaborator

Problem

Scheduler-planned recompilation resets Dynamo and replaces compiled graphs. DeepCompile's forward inputs, compiled-backward frames, and process-global compiler configuration and constructor patch need explicit lifecycle ownership so prior graph state can be released without disturbing another engine.

Approach

  • Keep forward inputs in graph-local queues and storage.
  • Track compiled-backward frames and Dynamo configuration ownership per engine.
  • Clear prior-cycle compiled-backward state at scheduled resets.
  • Make the graph-specific AotAutograd.__init__ patch restorable and ownership-safe.
  • Release engine-owned compiler state during normal deactivation and destruction.

Testing

  • Focused compile lifecycle unit tests on macOS and a clean single-node 1xH100 environment.
  • Existing compile regression tests.
  • Full repository pre-commit hooks.

Signed-off-by: Masahiro Tanaka <mtanaka@anyscale.com>
@tohtana
tohtana force-pushed the tohtana/deepcompile-compiler-lifecycle-standalone branch from 0b27f37 to 8f8f693 Compare July 23, 2026 01:01
@tohtana tohtana changed the title Improve DeepCompile compiler lifecycle cleanup Scope DeepCompile compiler state to engine lifecycles Jul 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant