cleanup: retire the legacy config surface — env seeding, turboquant aliases, dead flags#879
Merged
Merged
Conversation
…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>
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.
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): onlyIMP_DETERMINISTIC(set bytest_determinism_e2e/test_lorato inject determinism through the public API) andIMP_FMHA_FA2(set by the roofline A/B harness per subprocess) have real producers — the other 27 vars had none anywhere. All staleLegacy env: IMP_*comments and log strings swept repo-wide (config.h, kernels, resolver logs); CLAUDE.md and imp.conf.example updated to match.--kv-fp16was a silent no-op — now fixed: itsetenv'dIMP_KV_FP16, which no code has ever read (the comment claiming "the engine reads it" was wrong). It now pusheskv_cache.dtype=fp16, actually forcing FP16 KV and opting out of the auto FP8-hint upgrade — matching its documented semantics.--no-fp8-prefillsimilarly drops its env round-trip for a directattention.fp8_prefill=neveroverride.TurboQuant surface fully retired (deprecated since Phase 5, 2026-05-17; zero callers):
--kv-turboquant{,-lite}+--tq-sketch-multflags in both binaries, the per-request JSON overrides, the one-shot WARN blocks duplicated in imp-cli/main.cpp and imp-server/handlers.cpp, theIMP_DTYPE_TURBOQUANT(_LITE)C-API enum aliases, and the ignoredturboquant_sketch_multiplierImpConfig field. (The livequant/turboquant_fp4.cuhFP4 helpers used by MXFP4-KV are untouched.)Dead code deleted:
--cuda-graphsno-op flag;ImpConfig.gpu_memory_pool_sizeandImpConfig.num_cpu_threads(default-initialized, never read anywhere).Deliberately NOT touched (audited, kept)
getenv(IMP_SPEC_TRACE/IMP_JUMP_TRACE/IMP_PPL_DUMP)trace toggles.Verification
make build+make test-unit(37/37) +make verify-fast(fast gtest filter PASS).--kv-fp16 --no-fp8-prefillresolves end-to-end (log:FP8 prefill: disabled (attention.fp8_prefill=never)), generation coherent and identical to the default arm.imp-cli --kv-turboquant/imp-server --tq-sketch-mult→Unknown argument.🤖 Generated with Claude Code