This repository was archived by the owner on Jul 17, 2026. It is now read-only.
fix(compile): pre-create the XLA cache dirs group-writable — first-creator ownership locked other users out#974
Open
claude-spd1 wants to merge 1 commit into
Conversation
…eator ownership locked other users out jax >= 0.10 auto-enables the XLA per-fusion autotune side cache under the shared xla_compilation_cache dir, and XLA creates that subdir and its tmp/ itself with hardcoded 0755 (umask-independent). Whichever user's run touched the cache first left every other user's run dying with PERMISSION_DENIED at the first train step (observed: run p-9e6a4af3 / job 1052115). Both jax entrypoints (LM trainer rank 0, pretrainer) now pre-create the cache tree group-writable via param_decomp/compile_cache.py before jax initializes the cache, so it no longer matters who runs first. Crew-Address: task/xla-autotune-cache-group-unwritable Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Description
The shared
$PARAM_DECOMP_OUT_DIR/xla_compilation_cacheis multi-user, but jax >= 0.10 auto-enables the XLA per-fusion autotune side cache under it, and XLA createsxla_gpu_per_fusion_autotune_cache_dir/and itstmp/itself with hardcoded 0755 (umask-independent — that's why the files inside were 664 but the dirs weren't group-writable). Whichever user's run touched the cache first locked every other user out: their runs died withPERMISSION_DENIEDwritingtmp_per_fusion_cache_*.textprotoat the first train step.New
param_decomp/compile_cache.py::ensure_group_writable_cache_dirspre-creates the cache tree group-writable before jax initializes the cache; both jax entrypoints call it (LM trainer on rank 0, pretrainer in_maybe_enable_compilation_cache). Dirs that already have group write are untouched; a broken dir owned by someone else now fails fast at startup instead of one ~25-min compile later.Note for #:
bridge/task-jax-worker-persistent-cacheintroduces aparam_decomp/compile_cache.pyof its own (the one-policy-definition refactor). Same module name is deliberate — on merge, combine both functions in that module and callensure_group_writable_cache_dirsfrom itsenable_persistent_compilation_cache.Related Issue
Bridge task
xla-autotune-cache-group-unwritable(run p-9e6a4af3 / job 1052115 was the observed casualty). The live shared dir was already healed by hand (swapped for a 2775 copy, 670 autotune entries preserved); this PR is the structural fix so first-creation never matters again.Motivation and Context
Any non-first user's
pd-lmrun was dead on arrival at the first train step.How Has This Been Tested?
param_decomp/tests/test_compile_cache.py: creates the tree group-writable, repairs a 0755 tree, leaves already-writable dirs untouched (3 passed).make checkclean (ruff + basedpyright).Does this PR introduce a breaking change?
No.
🤖 Generated with Claude Code
Crew-Address: task/xla-autotune-cache-group-unwritable