release: gen-worker 0.40.7 (gw#608 residual — process-global AOT-cache disable)#360
Merged
Conversation
…3 config user overrides are thread-local ContextVars Live disproof (0.40.5, B200, 2026-07-21): mint capture still packed 8 ASLR-keyed aotautograd entries and the store-served sibling still failed (warmups=1, cache_hits=0, cache_misses=8) — the 0.40.4 disable ran on the arming thread; the warmup compile thread saw the default True. The env var is read once at torch import (env_name_force), so post-import it is inert. Fix: entrypoint sets TORCHINDUCTOR_AUTOGRAD_CACHE=0 before any torch import (binds all threads + compile-worker subprocesses); _disable_aot_autograd_cache additionally mutates the installed config entry's env_value_force (process- global) for already-imported-torch embedders. Cross-thread revert-turns-red test added (fails on the 0.40.5 shape, passes with the fix). Dry evidence: fxgraph keys 8/8 identical across ALL five banked packs (0.40.1 x3 / 0.40.3 / 0.40.5); aotautograd level-2 keys 0/8 everywhere. samples/selfmint-proof/gw0405-run/.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The 0.40.5 live cross-host proof FAILED with the identical gw#608 signature
(cache_hits=0, cache_misses=8): the pack still contained 8 ASLR-keyed
inductor/aotautograd entries.
Root cause (found dry): torch 2.13 ConfigModule user overrides are ContextVars
(thread-local) — enable_autograd_cache=False set on the arming thread never
applied to the warmup-compile thread, and post-import TORCHINDUCTOR_AUTOGRAD_CACHE=0
is inert (env read once at torch import).
Fix (chaos dbd7d6b, cherry-picked): entrypoint sets TORCHINDUCTOR_AUTOGRAD_CACHE=0
before any torch import (binds all threads + compile-worker subprocesses);
_disable_aot_autograd_cache additionally mutates the installed config entry's
env_value_force (process-global, verified cross-thread). Revert-turns-red test
test_aot_autograd_cache_disabled_across_threads (verified: fails with the src
change reverted).
Ships as 0.40.7 from current master, which also carries PR#358's unpublished
0.40.6 bump (never tagged) and PR#359's greenfield test system.
Local (py3.12, torch 2.13, locked venv): 427 passed, 5 skipped, 1 xfailed.
Evidence: ~/cozy/samples/selfmint-proof/gw0405-run/RESULTS.md.
🤖 Generated with Claude Code