← Back to Pull requests

[mono] Keep FlyDSL's disk cache on for checked builds; no source locations for serving builds #3348

Closed
unknown closed this pull request without merging on Nov 17, 2026 15:58 UTC
View on GitHub
unknown unknown commented on Nov 14, 2026 05:40 UTC
Author

Problem


FlyDSL 0.5.0 traces a @flyc.jit launcher on every call, before it looks the build up in its caches (the cache key is the traced module). Qwen3.8's compile_traced and DeepSeek-V4.1 hi's checked builds still forced FLYDSL_RUNTIME_ENABLE_CACHE=0 on 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


  • The disk cache stays on for the checked builds. Qwen3.8 and the V4.1 hi compile_traced no 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 to scoped().

    Not in this PR: the first launch still traces each program a second time. FlyDSL 0.5.0's COMPILE_ONLY=1 returns no callable, so aiter's _run_compiled → flyc.compile traces again. The fix belongs in aiter: _preload_compiled keeps the callable from flyc.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


  • black and ruff are clean on the changed files.

  • New GPU-free tests in tests/test_mono_runtime.py:

  • - srcloc.scoped() sets and restores FLYDSL_DEBUG_MAX_LOC_DEPTH, both when it was unset and when it was set;
    - srcloc.unlocated() swaps and restores capture_user_location in all three holders, also on an exception;
    - unlocated()'s debug-info branch.
  • Rebased on main (c9ed3ad0c). Against a fresh 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 and test_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 with hipErrorNoBinaryForGpu on the test box (gfx942, kernels built for gfx950); the same on the base commit.
  • Note: #3087 also touches the _env(..., ARCH=...) lines in qwen38/.../compile.py and hi/emit/compile.py. Whichever PR lands second drops ARCH= (FlyDSL#1410).

    🤖 Generated with Claude Code

    Diff: 418 lines (+313 / -105) across 5 files Reviewer: coderfeli Review duration: 4937m
    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
    0.50
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.17 · 1 substantive comment(s)
    0.17
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 35%
    56%
    Bedrock Claude 3 · Risk Narration
    (disconnected)
    Groq
    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
    Reviewers
    Assignees
    Unassigned
    Labels
    risk: low confidence: 56.8% reviewed
    Vouch Risk Breakdown
    AI-powered review risk analysis
    Change Risk
    Change Risk · Model 1 (XGBoost)
    Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
    Score: 50.0% (MEDIUM) · Higher = larger blast radius
    50.0%
    Review Confidence
    Review Confidence · Models 2 & 3
    Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
    Score: 56.8% · Lower = rushed or shallow review
    56.8%
    Residual Risk
    Residual Risk · Core Equation
    Residual = Change × (1 − Confidence)
    Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
    Score: 21.6% · Safe to merge
    21.6%
    Repository