[Engine] Tesla P100: the FP16 prompt path with few-row experts is the default instead of MMQ

kGp100Default = true (gp100_prompt_default.hpp): on a Tesla P100 (compute
capability 6.0, STRATA_EXPERIMENTAL_SM60 build, every visible card cc 6.0) with
STRATA_PREFILL_MMQ unset, no MMQ_WS, no STRATA_EXPERT_NIBBLE and no
--peer-device, the prompt experts take the dequantize + FP16 path with the
few-row experts on the quantized grouped kernels, and MMQ is not used.
STRATA_PREFILL_MMQ=1 keeps MMQ; STRATA_PF_FEWROWS=0 turns the few-row route off.

What a P100 user gets, IQ3_XXS, prompt speed against MMQ's (3 rotated rounds,
committed tree): 300 tokens 0.967, 1,000 0.913, 2K 0.930 (up to 2K at 0.91-0.97
of MMQ's speed), 4K 0.997 (level), 8K 1.041, 20K 1.035. Plain FP16 without the
few-row route was 0.850 / 0.869 / 0.912 / 0.956 / 1.025 / 1.009.

Gate (11-11 / 11-12), all on the P100:
- device code: the flip changes no function (3,674 / 3,674 and 3,749 / 3,749,
  libstrata_kq.so 256 / 256, 0 differing); the previous commits add only
  fewrows_record_kernel; with the switch unset the outputs equal 5a9d6f559's
  (plain FP16 KL 0.00000, tokens identical 16 of 16, routing 100%).
- teacher-forced per-position KL against the FP16 path (32 prompts of 300 to
  20,000 tokens, 256 forced tokens, 8,192 positions): few-rows / MMQ 0.835
  [0.760, 0.918] (MMQ again / MMQ 1.042 [0.972, 1.118]); mean KL 0.00613 against
  MMQ's 0.00735; top-1 equal to FP16's 98.30% against 97.78%.
- robustness on this default with nothing set: small chunks (300 / 1,000 /
  1,100 / 2,048 ids) all answered; agent run (4K turn + 8 follow-ups, prompt
  cache on) 9 of 9 turns answered.
- default against the gated arm with the draft-cost table fixed
  (--draft-costs, round-18 engines): 16 of 16 prompts bit-identical (KL 0.00000,
  tokens identical, routing 100.000%), default again and gated again likewise;
  with the route off the default equals plain FP16 bit for bit.
Without a fixed table, runs on this box shifted by 0.001-0.005 KL between starts
(timing-learned verify windows), which is why the check was repeated that way.
This commit is contained in:
Niko1221 committed 2026-11-12 09:48:18 +01:00
1 parent 56a659967b
commit 0d6308de65
1 file changed
+1 -1
@@ -10,7 +10,7 @@
namespace strata::prefill {
/// The whole default: false keeps MMQ on the P100 as before; true makes the rule below the P100's default. One line.
constexpr bool kGp100Default = false;
constexpr bool kGp100Default = true;
struct Gp100PromptInputs {
const char* env = nullptr; // STRATA_PREFILL_MMQ as read (nullptr: unset; any value keeps its old meaning: 0 FP16 path, else MMQ)