Merge the Aurora gfx1151 branch (f-halo-int + HCD_EXACT + the expert bundle) onto 0.1.39

Merges f-halo-int (82cf9b8 + 56 commits: the gfx1151 target, WMMA prompt attention / GEMM / scorer, GDN recurrence,
fused gfx11 prompt experts, decode switches, drafting) with f-halo-int-S (STRATA_HCD_EXACT, 203ec5c) and
f-halo-int-W (table16, float4 combine, LDS alias + occupancy, d23d4e2).  Conflicts resolved against 0.1.39's own
all-resident verify graph, forked shared-expert stream, fused swiglu q8_1, PLE batch, GDN commit split and peer
prompt path; the gfx1151-only code stays gated (build fixes and the arch defaults follow in separate commits).
This commit is contained in:
Niko1221 committed 2026-10-05 11:07:15 +02:00
commit bc6b6f87a9
66 files changed
+7050 -260

No files matched your search

+162 -14
View File
@@ -55,6 +55,7 @@
#include "strata/program/logits_selection.hpp"
#include "strata/program/conv_cache.hpp"
#include "strata/spec/draft_policy.hpp"
#include "strata/spec/draft_source.hpp"
#include "strata/spec/suffix_drafter.hpp"
#include "strata/kernels/cvec.hpp"
#include "strata/core/progress.hpp"
@@ -526,6 +527,18 @@ struct Options {
int suffix_draft = 3;
/// The MTP's own window cap (0 = --spec): with --spec 6 --mtp-max-t 4 the long windows come from suffix matches.
int mtp_max_t = 0;
/// --lookup-chain K (opt-in, 0 = off): prompt lookup CHAINED after the MTP's proposal. The suffix drafter matches
/// the context followed by the MTP's drafts and appends up to K of the tokens that followed that match to the same
/// verify window (the window grows to at most 8). Greedy verification keeps the output; its own counts are kept.
int lookup_chain = 0;
int lookup_chain_min = 3; ///< --lookup-chain-min M: the shortest match (in tokens, drafts included) it extends on
/// --mtp-hnorm stream (opt-in): the draft layer's pre_fc_norm_hidden normalizes each hyper-connection stream on
/// its own (llama.cpp's qwen4exp MTP graph) instead of one RMS over all four (the default, tools/mtp_probe.py).
bool mtp_hnorm_stream = false;
/// --mtp-q4 (opt-in): the draft layer's projections and draft head from 4-bit copies (fewer bytes per draft step)
std::string mtp_q4; ///< "" (off), all, proj (the projections only) or head (the draft head only)
/// --mtp-draft-vocab FILE (opt-in): the draft head's token subset from FILE instead of <mtp>/draft_vocab.bin
std::string mtp_draft_vocab;
/// A control vector on the residual stream (strata/kernels/cvec.hpp), with llama.cpp's flags: the
/// `experimental-speed-projection` profile passes `--control-vector-scaled FILE:1.0 --control-vector-layer-range
/// 4 44 --cvec-mode project --cvec-dir per-layer`. None by default; --serve switches a loaded one per request.
@@ -633,6 +646,13 @@ void usage() {
" --suffix-draft N prompt lookup: draft from an earlier repeat of the last N+ tokens of context\n"
" when it pays (default 3; 0 = MTP only)\n"
" --mtp-max-t M cap the MTP's windows at M tokens (0 = --spec; longer ones come from suffixes)\n"
" --lookup-chain K opt-in: after the MTP's drafts, add up to K prompt-lookup drafts that continue\n"
" them (the window grows to at most 8; default 0 = off)\n"
" --lookup-chain-min M the shortest context match --lookup-chain extends on (default 3)\n"
" --mtp-hnorm pooled|stream the draft layer's hidden-input norm: one RMS over all four streams\n"
" (default) or one per stream (llama.cpp's MTP graph)\n"
" --mtp-q4 all|proj|head opt-in: the draft layer's projections and/or draft head as 4-bit copies\n"
" --mtp-draft-vocab FILE opt-in: the draft head's token subset (default <mtp>/draft_vocab.bin)\n"
" --control-vector-scaled FILE:SCALE[,...] a control vector GGUF on the residual stream (llama.cpp's\n"
" format; --control-vector FILE = scale 1). --serve: requests switch it (cvec=0|1)\n"
" --control-vector-layer-range A B the layers it follows (inclusive; default 1 .. the last)\n"
@@ -718,6 +738,23 @@ void usage() {
" does not fit. Same answers as --mmap-experts for the same placement.\n");
}
// --lookup-chain: the context's last tokens for the draft sources (at most 64), the MTP's pending drafts last
int chain_tail(const strata::spec::SuffixDrafter& sfx, const int32_t* pending, int n_pending, std::vector<int32_t>& tail) {
const std::vector<int32_t>& h = sfx.history();
const int keep = std::max(0, std::min((int) h.size(), 64 - n_pending));
tail.assign(h.end() - keep, h.end());
tail.insert(tail.end(), pending, pending + n_pending);
return (int) tail.size();
}
// --lookup-chain: the registered extra draft sources (strata/spec/draft_source.hpp) see the committed context too
void extra_sources_reset() {
for (auto& src : strata::spec::extra_draft_sources()) src->reset();
}
void extra_sources_append(const int32_t* t, size_t n) {
for (auto& src : strata::spec::extra_draft_sources()) src->append(t, n);
}
bool parse_i64_list(const char* s, std::vector<int64_t>& out, std::string& err) {
out.clear();
std::string text(s);
@@ -1435,6 +1472,24 @@ int main(int argc, char** argv) {
else if (a == "--short-read") o.short_read = std::max(0LL, std::atoll(next("--short-read")));
else if (a == "--suffix-draft") o.suffix_draft = std::max(0, std::atoi(next("--suffix-draft")));
else if (a == "--mtp-max-t") o.mtp_max_t = std::max(0, std::atoi(next("--mtp-max-t")));
else if (a == "--lookup-chain") o.lookup_chain = std::clamp(std::atoi(next("--lookup-chain")), 0, 7);
else if (a == "--lookup-chain-min") o.lookup_chain_min = std::max(3, std::atoi(next("--lookup-chain-min")));
else if (a == "--mtp-hnorm") {
const std::string v = next("--mtp-hnorm");
if (v != "pooled" && v != "stream") {
std::fprintf(stderr, "strata generate: --mtp-hnorm takes pooled or stream\n");
return 2;
}
o.mtp_hnorm_stream = v == "stream";
}
else if (a == "--mtp-q4") {
o.mtp_q4 = next("--mtp-q4");
if (o.mtp_q4 != "all" && o.mtp_q4 != "proj" && o.mtp_q4 != "head") {
std::fprintf(stderr, "strata generate: --mtp-q4 takes all, proj or head\n");
return 2;
}
}
else if (a == "--mtp-draft-vocab") o.mtp_draft_vocab = next("--mtp-draft-vocab");
else if (a == "--control-vector") o.cvec_files.push_back({next("--control-vector"), 1.0f});
else if (a == "--control-vector-scaled") {
// FILE:SCALE, comma-separated; the LAST colon splits, so a Windows path (C:\...) keeps its drive
@@ -1778,6 +1833,11 @@ int main(int argc, char** argv) {
o.mtp_max_t = o.spec;
o.spec = std::min(o.spec + 2, 8); // kVerifyMaxT
}
// --lookup-chain (opt-in): the MTP keeps its windows; a lookup chained after its drafts may lengthen one by up to K
if (o.lookup_chain > 0 && o.spec >= 2) {
if (o.mtp_max_t == 0) o.mtp_max_t = o.spec;
o.spec = std::max(o.spec, std::min(o.mtp_max_t + o.lookup_chain, 8)); // kVerifyMaxT
}
strata::core::layer_set_shared_early(!o.shared_late);
if (!o.native_preset.empty()) {
try {
@@ -3008,6 +3068,9 @@ int main(int argc, char** argv) {
o.mtp.clear();
}
if (!o.mtp.empty()) mtp.set_prompt_len((int64_t) o.tokens.size());
mtp.set_hnorm_per_stream(o.mtp_hnorm_stream); // --mtp-hnorm stream (opt-in), before any capture
mtp.set_q4(o.mtp_q4 == "all" || o.mtp_q4 == "proj", o.mtp_q4 == "all" || o.mtp_q4 == "head"); // before load
if (!o.mtp_draft_vocab.empty()) mtp.set_draft_vocab(o.mtp_draft_vocab);
// the draft layer is the canonical model's MTP head (512 experts) even when the target is pruned,
// so it always sees the canonical geometry; `static` because MtpDrafter keeps a reference
static const strata::core::ModelGeometry draft_geometry{};
@@ -3205,7 +3268,7 @@ int main(int argc, char** argv) {
bool reserve_adapted = false; // #496: the auto sizing lowered the reserve so a small card's cache fits
if (o.expert_cache < 0) {
size_t free_b = 0, total_b = 0;
cudaMemGetInfo(&free_b, &total_b);
free_b = strata::core::device_free_bytes(); (void) total_b;
// Plan v0.3 P5: the batched prompt path's chunk buffers are allocated later, so they are reserved here -
// under WDDM an over-subscribed allocation does not fail, it pages to system memory and crawls.
// (with borrowing - the default with a profile - the prompt path lends cache slots instead; `pf_borrow` is
@@ -3278,7 +3341,7 @@ int main(int argc, char** argv) {
// fails with "device buffers ... do not fit" (with borrowing - the default with a profile - the path lends
// slots instead and `prefill_mib` is 0, so only the reserve is checked)
size_t free_b = 0, total_b = 0;
cudaMemGetInfo(&free_b, &total_b);
free_b = strata::core::device_free_bytes(); (void) total_b;
const int64_t prefill_mib = (o.prefill_chunk > 0 && !pf_borrow) ? 160 + (o.prefill_chunk * 680) / 1024 : 0;
const int64_t reserve = ((int64_t) o.vram_reserve_mib + prefill_mib) << 20;
const int64_t fit = std::max<int64_t>(((int64_t) free_b - reserve) / (int64_t) strata::kernels::cpu::expert_layout().max_blob, 0);
@@ -3298,7 +3361,7 @@ int main(int argc, char** argv) {
std::vector<int64_t> sized_slots;
if (native_pack && o.expert_cache > 0 && !profile.empty() && !o.expert_cache_per_layer) {
size_t free_b = 0, total_b = 0;
cudaMemGetInfo(&free_b, &total_b);
free_b = strata::core::device_free_bytes(); (void) total_b;
const auto& lay = strata::kernels::cpu::expert_layout();
const uint64_t budget = (uint64_t) o.expert_cache * lay.max_blob; // what the uniform sizing granted
uint64_t used = 0;
@@ -3402,7 +3465,7 @@ int main(int argc, char** argv) {
cudaMemset(xcache.device_slot(0), 0, (size_t) xcache.bytes());
cudaDeviceSynchronize();
size_t free_b = 0, total_b = 0;
cudaMemGetInfo(&free_b, &total_b);
free_b = strata::core::device_free_bytes(); (void) total_b;
const int64_t want = (int64_t) o.vram_reserve_mib << 20;
if ((int64_t) free_b >= want - (64ll << 20)) break;
// short by (want - free); a figure of 0 only says "at least": the first two such reads give back 1 GiB
@@ -7050,12 +7113,22 @@ int main(int argc, char** argv) {
std::vector<int32_t> drafts((size_t) S, 0), window((size_t) S), outv((size_t) S);
std::vector<float> dprob((size_t) S, 0.0f);
std::vector<int32_t> sbuf((size_t) S, 0);
if (o.suffix_draft > 0) {
const bool sfx_on = o.suffix_draft > 0 || o.lookup_chain > 0;
if (sfx_on) {
sfx.reset();
for (int64_t t : ids) sfx.append((int32_t) t);
}
if (o.lookup_chain > 0) {
extra_sources_reset();
for (int64_t t : ids) { const int32_t t32 = (int32_t) t; extra_sources_append(&t32, 1); }
}
bool first_window = true;
int64_t produced_n = 0, sfx_windows = 0, sfx_drafts = 0, sfx_ok = 0;
int64_t chain_windows = 0, chain_drafts = 0, chain_ok = 0; // --lookup-chain's own counts
int64_t t2_rej[8] = {}, t2_hit[8] = {}; // STRATA_MTP_TOP2: rejections inside the MTP drafts by depth, runner-up hits
std::vector<int32_t> cbuf((size_t) S, 0), ctail;
strata::spec::PromptLookupSource lookup_src(sfx);
static const bool chain_fixed = std::getenv("STRATA_LOOKUP_CHAIN_FIXED") != nullptr; // no policy gate
int64_t draft_offered = 0, draft_accepted = 0;
// what the session holds once this request is done: the prompt read so far, then every committed token
std::vector<int32_t> consumed;
@@ -7103,11 +7176,29 @@ int main(int argc, char** argv) {
if (pk.lookup) { T = pk.t; from_sfx = true; }
}
}
// --lookup-chain: what followed an earlier occurrence of the context + the MTP's drafts, after them
int chain_n = 0, cm = 0;
if (o.lookup_chain > 0 && !first_window && !from_sfx && T < S) {
int csrc = -1;
const int nt = chain_tail(sfx, drafts.data(), T - 1, ctail);
chain_n = strata::spec::propose_from_sources(lookup_src, ctail.data(), nt, T - 1,
std::min(o.lookup_chain, S - T), o.lookup_chain_min,
cbuf.data(), &cm, &csrc);
// the policy keeps the chained tokens that pay at this machine's measured window costs
if (chain_n > 0 && !chain_fixed) {
double p_mtp = 1.0;
for (int i = 0; i < T - 1; ++i) p_mtp *= dprob[(size_t) i];
chain_n = policy.chain(T, p_mtp, chain_n, cm);
}
}
const int T_mtp = T;
T += chain_n;
const bool timed_round = !first_window;
const Clock::time_point round0 = Clock::now();
if (p + T > o.max_context) break;
window[0] = x;
for (int i = 1; i < T; ++i) window[(size_t) i] = from_sfx ? sbuf[(size_t) i - 1] : drafts[(size_t) i - 1];
for (int i = 1; i < T_mtp; ++i) window[(size_t) i] = from_sfx ? sbuf[(size_t) i - 1] : drafts[(size_t) i - 1];
for (int i = 0; i < chain_n; ++i) window[(size_t) (T_mtp + i)] = cbuf[(size_t) i];
drive.d.layers = 0;
drive.d.experts = 0;
drive.d.failed = false;
@@ -7135,6 +7226,11 @@ int main(int argc, char** argv) {
int a = 0;
while (a < T - 1 && window[(size_t) a + 1] == outv[(size_t) a]) ++a;
if (from_sfx) { ++sfx_windows; sfx_drafts += T - 1; sfx_ok += a; }
if (chain_n > 0) { ++chain_windows; chain_drafts += chain_n; chain_ok += std::max(0, a - (T_mtp - 1)); }
if (strata::core::MtpDrafter::top2_env() && !from_sfx && !first_window && a < T_mtp - 1 && a < 8) {
++t2_rej[a];
if (mtp.top2(a) == outv[(size_t) a]) ++t2_hit[a];
}
const Clock::time_point tw1 = Clock::now();
std::thread adapt_thr; // the adaptive tier beside the commit and the draft (as in generate)
bool adapt_ok = true;
@@ -7155,7 +7251,8 @@ int main(int argc, char** argv) {
std::printf("T %d\n", (int) outv[(size_t) i]);
strata::core::progress_beat();
++produced_n;
if (o.suffix_draft > 0) sfx.append(outv[(size_t) i]);
if (sfx_on) sfx.append(outv[(size_t) i]);
if (o.lookup_chain > 0) extra_sources_append(&outv[(size_t) i], 1);
eos = std::find(o.eos_ids.begin(), o.eos_ids.end(), (int64_t) outv[(size_t) i]) != o.eos_ids.end();
}
std::fflush(stdout);
@@ -7182,9 +7279,12 @@ int main(int argc, char** argv) {
std::printf("ERR %s\n", err.c_str());
return 1;
}
if (timed_round && !eos)
if (timed_round && !eos && chain_n == 0)
policy.observe(from_sfx, T, a, sfx_match,
std::chrono::duration<double, std::milli>(Clock::now() - round0).count());
else if (timed_round && !eos) // a chained window: its MTP part, its chain, its cost
policy.observe_chain(T_mtp, chain_n, a, cm,
std::chrono::duration<double, std::milli>(Clock::now() - round0).count());
if (eos) { finish = "stop"; break; }
if (stop_req.load()) { finish = "cancel"; break; }
x = outv[(size_t) a];
@@ -7340,14 +7440,22 @@ int main(int argc, char** argv) {
// [prompt tokens read] (#471: fewer than <prompt> - <reused> when a cancel stopped the read)
// [offloaded] (#588: the decode's routed experts the GPU read over PCIe or another GPU computed;
// not in [lookups])
if (yielded_at >= 0) std::printf("YIELDED %d %lld\n", yielded_slot, (long long) yielded_at);
std::printf("DONE %lld %lld %.1f %.1f %s %lld %lld %lld %lld %lld %lld %lld %.1f %lld %lld\n",
// [lookup-chain accepted] [lookup-chain offered] [suffix accepted] [suffix offered] [windows]
// (only with --lookup-chain)
char chain_txt[128] = "";
if (o.lookup_chain > 0)
std::snprintf(chain_txt, sizeof(chain_txt), " %lld %lld %lld %lld %lld", (long long) chain_ok,
(long long) chain_drafts, (long long) sfx_ok, (long long) sfx_drafts, (long long) dec_windows);
if (yielded_at >= 0) std::printf("YIELDED %d %lld
", yielded_slot, (long long) yielded_at);
std::printf("DONE %lld %lld %.1f %.1f %s %lld %lld %lld %lld %lld %lld %lld %.1f %lld %lld%s
",
(long long) produced_n,
(long long) n, prompt_ms, decode_ms, finish, (long long) draft_accepted, (long long) draft_offered,
(long long) resume, (long long) req_hits, (long long) req_look,
(long long) (src.ram_reads() - ram0), (long long) (src.file_reads() - files0),
(double) (src.file_read_bytes() - file_bytes0) / 1e6, (long long) read_n,
(long long) req_offload);
(long long) req_offload, chain_txt);
std::fflush(stdout);
if (admit_slot >= 0) { // --batch: BADM <slot> <1 = continues in the batch windows | 0 = done>
bool cont = !cancelled && produced_n == 1 && admit_max_new > 1 && std::strcmp(finish, "length") == 0 &&
@@ -7452,6 +7560,14 @@ int main(int argc, char** argv) {
if (sfx_windows > 0)
std::fprintf(stderr, "strata serve: suffix drafts: %lld windows, %lld of %lld drafts accepted\n",
(long long) sfx_windows, (long long) sfx_ok, (long long) sfx_drafts);
if (o.lookup_chain > 0)
std::fprintf(stderr, "strata serve: lookup chain: %lld of %lld windows, %lld of %lld chained drafts accepted\n",
(long long) chain_windows, (long long) dec_windows, (long long) chain_ok, (long long) chain_drafts);
if (strata::core::MtpDrafter::top2_env())
std::fprintf(stderr, "strata serve: mtp top2: rejected/runner-up by depth %lld/%lld %lld/%lld %lld/%lld %lld/%lld "
"of %lld windows\n", (long long) t2_rej[0], (long long) t2_hit[0], (long long) t2_rej[1],
(long long) t2_hit[1], (long long) t2_rej[2], (long long) t2_hit[2], (long long) t2_rej[3],
(long long) t2_hit[3], (long long) dec_windows);
for (int r = 0; r < 3; ++r) if (o.expert_cache_remote[(size_t) r] > 0)
std::fprintf(stderr, "strata serve: CUDA%d: %lld expert entries, %lld active layer launches, %.1f MiB returned "
"(%.1f MiB with full rows) in this request; host %.0f ms staging+launching, %.0f ms "
@@ -7991,10 +8107,19 @@ int main(int argc, char** argv) {
strata::spec::DraftPolicy policy(o.spec); // MTP or lookup window (see draft_policy.hpp)
std::vector<int32_t> sbuf((size_t) o.spec, 0);
int64_t sfx_windows = 0, sfx_drafts = 0, sfx_ok = 0;
if (o.suffix_draft > 0) {
int64_t chain_windows = 0, chain_drafts = 0, chain_ok = 0; // --lookup-chain's own counts
std::vector<int32_t> cbuf((size_t) o.spec, 0), ctail;
strata::spec::PromptLookupSource lookup_src(sfx);
const bool sfx_on = o.suffix_draft > 0 || o.lookup_chain > 0;
if (sfx_on) {
for (int64_t t : o.tokens) sfx.append((int32_t) t);
for (int64_t t : produced) sfx.append((int32_t) t);
}
if (o.lookup_chain > 0) {
extra_sources_reset();
for (int64_t t : o.tokens) { const int32_t t32 = (int32_t) t; extra_sources_append(&t32, 1); }
for (int64_t t : produced) { const int32_t t32 = (int32_t) t; extra_sources_append(&t32, 1); }
}
const double pool_ms0 = drive.cpu_ms;
const int64_t misses0 = drive.d.multi_misses, entries0 = drive.d.multi_entries;
while ((int64_t) produced.size() < o.max_new) {
@@ -8015,6 +8140,22 @@ int main(int argc, char** argv) {
if (pk.lookup) { T = pk.t; from_sfx = true; }
}
}
// --lookup-chain: what followed an earlier occurrence of the context + the MTP's drafts, after them
int chain_n = 0, cm = 0;
if (o.lookup_chain > 0 && use_mtp && !first_window && !from_sfx && T < o.spec) {
int csrc = -1;
const int nt = chain_tail(sfx, drafts.data(), T - 1, ctail);
chain_n = strata::spec::propose_from_sources(lookup_src, ctail.data(), nt, T - 1,
std::min(o.lookup_chain, o.spec - T), o.lookup_chain_min,
cbuf.data(), &cm, &csrc);
if (chain_n > 0 && std::getenv("STRATA_LOOKUP_CHAIN_FIXED") == nullptr) {
double p_mtp = 1.0;
for (int i = 0; i < T - 1; ++i) p_mtp *= dprob[(size_t) i];
chain_n = policy.chain(T, p_mtp, chain_n, cm);
}
}
const int T_mtp = T;
T += chain_n;
const bool timed_round = !first_window;
++window_hist[(size_t) T];
if (p + T > o.max_context) {
@@ -8026,6 +8167,7 @@ int main(int argc, char** argv) {
const size_t at = produced.size() - 1 + (size_t) i;
int32_t d = from_sfx ? sbuf[(size_t) i - 1] : use_mtp ? drafts[(size_t) i - 1]
: at < oracle.size() ? (int32_t) oracle[at] : 0;
if (i >= T_mtp) d = cbuf[(size_t) (i - T_mtp)];
if (o.spec_corrupt > 0 && (++corrupt_counter % o.spec_corrupt) == 0) d = (d + 1) % (int32_t) n_vocab;
window[(size_t) i] = d;
}
@@ -8078,10 +8220,12 @@ int main(int argc, char** argv) {
drafts_ok += a;
++accepted_hist[(size_t) a];
if (from_sfx) { ++sfx_windows; sfx_drafts += T - 1; sfx_ok += a; }
if (chain_n > 0) { ++chain_windows; chain_drafts += chain_n; chain_ok += std::max(0, a - (T_mtp - 1)); }
bool eos = false;
for (int i = 0; i <= a && (int64_t) produced.size() < o.max_new && !eos; ++i) {
produced.push_back(outv[(size_t) i]);
if (o.suffix_draft > 0) sfx.append(outv[(size_t) i]);
if (sfx_on) sfx.append(outv[(size_t) i]);
if (o.lookup_chain > 0) extra_sources_append(&outv[(size_t) i], 1);
eos = o.stop_eos && std::find(o.eos_ids.begin(), o.eos_ids.end(), (int64_t) outv[(size_t) i]) != o.eos_ids.end();
}
if (eos) {
@@ -8101,7 +8245,8 @@ int main(int argc, char** argv) {
p += a + 1;
const double round_ms = std::chrono::duration<double, std::milli>(Clock::now() - t0).count();
total_ms += round_ms;
if (timed_round) policy.observe(from_sfx, T, a, sfx_match, round_ms);
if (timed_round && chain_n == 0) policy.observe(from_sfx, T, a, sfx_match, round_ms);
else if (timed_round) policy.observe_chain(T_mtp, chain_n, a, cm, round_ms);
if (rounds % 64 == 0)
std::fprintf(stderr, "strata generate: position %lld, %lld tokens, %lld rounds\n", (long long) p,
(long long) produced.size(), (long long) rounds);
@@ -8123,6 +8268,9 @@ int main(int argc, char** argv) {
if (o.suffix_draft > 0)
std::printf("%-24s %lld windows, drafts accepted %lld of %lld\n", "suffix drafts", (long long) sfx_windows,
(long long) sfx_ok, (long long) sfx_drafts);
if (o.lookup_chain > 0)
std::printf("%-24s %lld windows, chained drafts accepted %lld of %lld\n", "lookup chain",
(long long) chain_windows, (long long) chain_ok, (long long) chain_drafts);
std::printf("%-24s", "accepted per round");
for (size_t i = 0; i < accepted_hist.size(); ++i) std::printf(" %zu:%lld", i, (long long) accepted_hist[i]);
std::printf("\n");