mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-04 15:28:40 +00:00
The launch probe times the CPU lane and the card's copy-in (exact) lane and keeps the faster one. The old rule kept the CPU lane unless the copy-in lane was 10 % faster (t_card < 0.9 * t_cpu), from one probe per lane. On the owner's RTX 5070 12 GB (Windows, SQ-10, drafter off, the published 0.2.24 packages) a quiet PC measured CPU 9.0 to 9.5 ms and copy-in 8.6 to 8.8 ms (ratio 0.95): the old rule kept the CPU lane and every start decoded 65-68 tok/s and 34.5 on a 4K document where the copy-in lane gives 73 and 56.4 (+11 to +64 %); with a busier PC the same card measured 12.0 against 8.6 and chose the copy-in lane, so two starts can land on different sides of the threshold (that is the only reading of the 9 to 12 % cuda12 / cuda13 gap of NUMBERS-0224 that the data allows: the packages themselves are equal in every forced lane). - strata/core/ink_cold_lane.hpp: ink_probe_median and ink_cold_lane_exact (the exact lane unless the CPU lane is clearly (10 %) faster: t_cpu < 0.9 * t_card; ties go to the exact lane); unit test ink_cold_lane_test (in CMake, no GPU). - ink_runner.cuh pick_cold_lane: three probes per lane, alternating, the median of each (about 1 s more at start); "(median of 3)" in the line. STRATA_INK_LANE_PROBE_OLD=1: the old rule (one probe per lane). Register entry (rollback) and the SETTINGS.md row; docs/INKLING_KV.md (the earlier commit) says what it does. Gates (decode tok/s prose / chat / code / doc4k, ABAB, 3 rounds, SQ-10 for the 5070, ctx 8192, drafter off): - owner RTX 5070 (MSVC + CUDA 13.0, sandboxed jobq): new rule picked the copy-in lane in all 3 starts (CPU 9.0-9.2 against copy 8.7): 65.4 -> 73.x / 67.2 -> 73.5 / 68.5 -> 72.9 / 34.4 -> 56.0 against the old rule (old exe, same host): chat +9 %, code +6 %, doc4k +63 %; STRATA_INK_LANE_PROBE_OLD=1 on the new exe reproduces the old numbers (65.4 / 67.0 / 68.5 / 34.4). - z440 RTX A4000, SQ-15 made hybrid with a VRAM ballast (1,977 experts on the card, 1,095 in RAM): CPU lane 31.9 ms against copy-in 42.7: the CPU lane under both rules, identical decode (34.2 / 36.2 / 34.9 / 31.4 against 34.2 / 36.3 / 34.8 / 31.2): the rule changes nothing where the CPU lane is clearly faster. (Without the ballast SQ-15 fits the A4000 whole: no cold expert, no probe.) - HIP and SYCL have no such probe (cuda/ink_runner.cuh only): no R9700 / A750 gate applies. Tests: ink_cold_lane_test and ink_sm120_table_test pass, settings register check passes, MSVC + CUDA 13.0 sm_120 build OK.