Skip to content

cleanup: retire the legacy config surface — env seeding, turboquant aliases, dead flags#879

Merged
kekzl merged 1 commit into
mainfrom
retire-legacy-config-surface
Jul 7, 2026
Merged

cleanup: retire the legacy config surface — env seeding, turboquant aliases, dead flags#879
kekzl merged 1 commit into
mainfrom
retire-legacy-config-surface

Conversation

@kekzl

@kekzl kekzl commented Jul 7, 2026

Copy link
Copy Markdown
Owner

What

Simplification pass over the config/CLI layer, follow-up to #878's consistency audit. −305/+70 LOC. Every removal was verified to have zero producers/consumers in the repo (grep across src/, tools/, tests/, scripts/, .github/, Dockerfile, docker-entrypoint); all removed knobs stay reachable via imp.conf / --set.

Changes

Legacy env seeding trimmed 29 → 2 (seed_from_env, src/runtime/config.cpp): only IMP_DETERMINISTIC (set by test_determinism_e2e/test_lora to inject determinism through the public API) and IMP_FMHA_FA2 (set by the roofline A/B harness per subprocess) have real producers — the other 27 vars had none anywhere. All stale Legacy env: IMP_* comments and log strings swept repo-wide (config.h, kernels, resolver logs); CLAUDE.md and imp.conf.example updated to match.

--kv-fp16 was a silent no-op — now fixed: it setenv'd IMP_KV_FP16, which no code has ever read (the comment claiming "the engine reads it" was wrong). It now pushes kv_cache.dtype=fp16, actually forcing FP16 KV and opting out of the auto FP8-hint upgrade — matching its documented semantics. --no-fp8-prefill similarly drops its env round-trip for a direct attention.fp8_prefill=never override.

TurboQuant surface fully retired (deprecated since Phase 5, 2026-05-17; zero callers): --kv-turboquant{,-lite} + --tq-sketch-mult flags in both binaries, the per-request JSON overrides, the one-shot WARN blocks duplicated in imp-cli/main.cpp and imp-server/handlers.cpp, the IMP_DTYPE_TURBOQUANT(_LITE) C-API enum aliases, and the ignored turboquant_sketch_multiplier ImpConfig field. (The live quant/turboquant_fp4.cuh FP4 helpers used by MXFP4-KV are untouched.)

Dead code deleted: --cuda-graphs no-op flag; ImpConfig.gpu_memory_pool_size and ImpConfig.num_cpu_threads (default-initialized, never read anywhere).

Deliberately NOT touched (audited, kept)

Verification

  • make build + make test-unit (37/37) + make verify-fast (fast gtest filter PASS).
  • GPU smoke (Qwen3-8B-Q8_0, both arms): --kv-fp16 --no-fp8-prefill resolves end-to-end (log: FP8 prefill: disabled (attention.fp8_prefill=never)), generation coherent and identical to the default arm.
  • Removed flags fail fast: imp-cli --kv-turboquant / imp-server --tq-sketch-multUnknown argument.
  • No hot-path change (kernel files only had comment/log-string edits); baseline untouched.

🤖 Generated with Claude Code

…liases, dead flags

Simplification pass over the config/CLI layer (follow-up to #878). Every
removal was verified to have zero producers/consumers in the repo; all
functionality stays reachable via imp.conf / --set.

- seed_from_env: 29 legacy IMP_* env reads -> 2. Only IMP_DETERMINISTIC
  (set by test_determinism_e2e/test_lora) and IMP_FMHA_FA2 (set by the
  roofline A/B harness) have real producers; the other 27 had none.
  Stale 'Legacy env: IMP_*' comments and log strings swept repo-wide.
- Fix --kv-fp16: it set an IMP_KV_FP16 env var that nothing has ever
  read (silent no-op). It now pushes kv_cache.dtype=fp16, actually
  forcing FP16 and opting out of the auto FP8-hint upgrade.
- --no-fp8-prefill: setenv round-trip replaced by a direct
  attention.fp8_prefill=never config override.
- Retire deprecated TurboQuant surface: --kv-turboquant{,-lite} and
  --tq-sketch-mult flags (CLI + server + per-request JSON overrides),
  one-shot WARN blocks, IMP_DTYPE_TURBOQUANT(_LITE) C-API aliases, and
  the ignored turboquant_sketch_multiplier field. TurboQuant was retired
  Phase 5 (2026-05-17); the aliases had no callers.
- Delete the --cuda-graphs no-op flag (graphs are default-on).
- Delete dead ImpConfig fields gpu_memory_pool_size and num_cpu_threads
  (default-initialized, never read).

Verified: make build + test-unit (37/37) + verify-fast (fast gtest PASS);
GPU smoke on Qwen3-8B-Q8_0 — --kv-fp16/--no-fp8-prefill resolve correctly
(log: 'FP8 prefill: disabled (attention.fp8_prefill=never)'), generation
coherent; removed flags now fail fast with 'Unknown argument'.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@kekzl kekzl enabled auto-merge (squash) July 7, 2026 12:44
@kekzl kekzl merged commit 50fd01c into main Jul 7, 2026
7 checks passed
@kekzl kekzl deleted the retire-legacy-config-surface branch July 7, 2026 12:56
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