fix(pflash): read a quoted --prefill-curve as its points; drop dead kernel switches from the banner
What it fixes
Quoted --prefill-curve kept only its first point. --prefill-curve "16384:0.315 32768:0.270 65536:0.270 120000:0.225" reached the parser as one argument. atoi/atof read it as 16384:0.315 and silently dropped the rest, so the keep ratio stayed at a flat 0.315. A ~120K prompt kept 0.317 effective instead of the 0.225 the curve gives there. A user hit this on an R9700 run of the v2 recipe.
The parser now splits each argument on spaces and commas, so quoted, comma-separated and separate arguments all give the same curve. Each point must be TOKENS:RATIO with TOKENS > 0, 0 < RATIO <= 1 and nothing after the ratio. A bad point or an empty curve fails at startup.
The PFlash banner showed kernel switches PFlash doesn't use. fp_use_bsa = ON and fp_alpha were printed under PFlash, which reads as "PFlash runs the BSA kernel". The Qwen3.5-0.8B scorer runs ggml attention (Gated DeltaNet plus ggml_flash_attn_ext) and reads neither switch.
LUCE_FP_USE_BSAonly picks the FlashPrefill launcher for Gemma 4's sliding-window prefill.LUCE_FP_ALPHAandLUCE_FA_WINDOWhave no reader at all.
Changes:
- The banner drops both lines. When a curve is set,
pflash_keepprints that curve instead of the unused flat ratio. - PFlash no longer sets
LUCE_FP_ALPHAorLUCE_FA_WINDOW./propsbsa_alphais nownullunless the variable is set by hand. LUCE_FP_USE_BSAstays on with PFlash, so Gemma 4 keeps its launcher and its behaviour doesn't change.
Tests
test_feature_gate/launch_policy_suitehas two new cases:- a quoted list, separate arguments and commas all parse to the release curve;
- bad points are rejected: missing ratio or tokens, zero or negative tokens, ratio 0 or above 1, trailing junk, a third field, overflow.
- Both pass. A mutated check fails, so the cases do run.
server_main.cppcompiles with the HIP build's flags (-fsyntax-only). The full server binary was not rebuilt or launched.
🤖 Generated with Claude Code