[mono] Keep FlyDSL's disk cache on for checked builds; no source locations for serving builds #3348
All Vouch review confidence checks passed
Residual risk 0.22 = Change Risk (0.50) × (1 − Review Confidence (0.57)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.50 · 418 lines diff across 5 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size
diff_size
0.361
Shallow Review Depth
shallow_review_depth
0.289
Ai Authored
ai_authored
0.050
Real PR Conversation Timeline
1 comments
"Review active on #3348"
general
weight: 0.35
coderfeli
Problem
FlyDSL 0.5.0 traces a
@flyc.jitlauncher on every call, before it looks the build up in its caches (the cache key is the traced module). Qwen3.8'scompile_tracedand DeepSeek-V4.1 hi's checked builds still forcedFLYDSL_RUNTIME_ENABLE_CACHE=0on top of that, so every process compiled their LLVM again. And the engine's builds captured a 5-frame source location for every traced op, which they never use.Changes
compile_tracedno longer turn it off, and neither do the V4.1 / MiniMax-M3 contract tests and the gfx1250 multi-thread trace test, so CI now runs the warm-cache path. A cached build is still traced, recorded and checked; it is only not compiled again. Stale comments and docs that described a cache which hides the trace are fixed (hi/emit/compile.py,hi_runner.py,CLAUDE.md,docs/environment_variables.md).atom/mono/runtime/srcloc.py- Drops the 0.4-era location fingerprint and its warning.
-
scoped()keeps one frame per location for the checked builds.-
unlocated()captures no locations for the engine's builds. Without debug info, FlyDSL leaves locations out of both the binary and its cache key, so the binary is the same. With debug info on, it falls back toscoped().Not in this PR: the first launch still traces each program a second time. FlyDSL 0.5.0's
COMPILE_ONLY=1returns no callable, so aiter's_run_compiled→flyc.compiletraces again. The fix belongs in aiter:_preload_compiledkeeps the callable fromflyc.compile(..., compile_only=True)(FlyDSL#1392, merged but not in the 0.5.0 release aiter pins). That will be a follow-up once aiter's FlyDSL pin includes it.Measurements (compile-only builds for gfx950,
ARCH=gfx950, MI308X host, one TP rank)| | main | this PR |
|---|---|---|
| V4.1 hi S=6, warm disk cache: serving build | 44.5 s | 28–29 s |
| V4.1 hi S=6, warm disk cache: build + first-launch retrace | ~79 s | ~63 s (retrace 34 s unchanged; see above) |
| Qwen3.8 target
compile_traced, all 8 programs, warm cache | LLVM recompiled every process (cache forced off) | 34 s under cProfile (trace ~16 s), cache hit, checks pass |Testing
blackandruffare clean on the changed files.tests/test_mono_runtime.py:-
srcloc.scoped()sets and restoresFLYDSL_DEBUG_MAX_LOC_DEPTH, both when it was unset and when it was set;-
srcloc.unlocated()swaps and restorescapture_user_locationin all three holders, also on an exception;-
unlocated()'s debug-info branch.FLYDSL_RUNTIME_CACHE_DIR, cold then warm:test_mono_runtime.py,test_deepseek_v41_mono_hi_package.py,test_deepseek_v41_gfx1250.py, the V4.1 / MiniMax-M3 contract tests andtest_deepseek_v41_mono_hi_contract.py(now every served TP × index layout) pass both times: 218 passed, 1 skipped.test_qwen38_mono: its GPU-launch tests abort withhipErrorNoBinaryForGpuon the test box (gfx942, kernels built for gfx950); the same on the base commit.Note: #3087 also touches the
_env(..., ARCH=...)lines inqwen38/.../compile.pyandhi/emit/compile.py. Whichever PR lands second dropsARCH=(FlyDSL#1410).🤖 Generated with Claude Code