Repository navigation
fix(pflash): read a quoted --prefill-curve as its points; drop dead kernel switches from the banner - #861
Merged
Conversation
…d kernel switches from the banner --prefill-curve "16384:0.315 32768:0.270 65536:0.270 120000:0.225" (one quoted argument) parsed with atoi/atof as the single point 16384:0.315 and dropped the rest without a word, so a 120K prompt kept 0.315 instead of 0.225. Each argument now splits on spaces and commas, and a point must be TOKENS:RATIO with TOKENS > 0 and 0 < RATIO <= 1 and nothing after it; a bad point or an empty curve fails startup. The startup banner listed fp_use_bsa and fp_alpha under PFlash. The Qwen3.5 scorer runs ggml attention and reads neither: LUCE_FP_USE_BSA only picks the FlashPrefill launcher for Gemma 4's sliding-window prefill, and LUCE_FP_ALPHA and LUCE_FA_WINDOW have no reader. The banner drops both lines and prints the curve in force instead of the flat ratio when a curve is set. PFlash no longer sets the two unread variables; LUCE_FP_USE_BSA stays on with PFlash so Gemma 4 keeps its launcher. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Graffioh
marked this pull request as ready for review
October 20, 2026 09:27
davide221
reviewed
Oct 20, 2026
davide221
left a comment
Contributor
There was a problem hiding this comment.
Code review
No issues found. Checked for bugs and logic errors in the changed code.
Reviewed 01109b09 · 0 candidate issues checked, kept at ≥70% confidence · add the code-review label to review again
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 it fixes
Quoted
--prefill-curvekept 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/atofread it as16384:0.315and 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:RATIOwithTOKENS > 0,0 < RATIO <= 1and 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 = ONandfp_alphawere printed under PFlash, which reads as "PFlash runs the BSA kernel". The Qwen3.5-0.8B scorer runs ggml attention (Gated DeltaNet plusggml_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:
pflash_keepprints that curve instead of the unused flat ratio.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:server_main.cppcompiles with the HIP build's flags (-fsyntax-only). The full server binary was not rebuilt or launched.🤖 Generated with Claude Code