radiance 1.13.0

New models:
- Tencent Hy-Memory (HYV3) from its BF16, FP8 and GGUF checkpoints, with its native tool calls
- M2XFP4: metadata-augmented MXFP4 weights for Qwen3.8-27B and its DFlash2 drafter (top-1 89.1% ->
  92.4% against plain MXFP4), its quantiser and recipe, and ParoQuant's M2XFP4 checkpoints
- Gemma 4 E2B/E4B audio input; NVIDIA-Nemotron-3.5-Bolt-E4B in int8 and 4-bit, on two cards by
  default; Ornith-1.5-122B compose files

Speed:
- Weight reads beside the decode all-reduces (qwen35_fp8, gemma3; --weight-prefetch, on by default):
  the 27B MXFP4 with DFlash2 61.2 -> 67.9 tok/s at c1, TranslateGemma 27B +13%
- Head-256 split-KV decode attention at 256 workgroups and without bank conflicts (27B: +3-5% a
  step at 25-41K context), and the prefill KV split for small launches (a short turn over a long
  context decodes the other sequences 27% faster in that step)
- MXFP4 decode gate_up, activation and fp8 quantiser in one launch (27B, Gemma 3 up to 64 rows:
  TranslateGemma +2-5% at 2-8 streams)
- ParoQuant int4/int5 tiled GEMMs 6-9% faster
- Speculation: a step's tokens are sent before the drafter's passes end, no step waits behind one
  that ends its requests, and the MTP head's first draft no longer collapses after short chats in
  the prefix cache

Features:
- --kv-resident N: KV streaming for a context bigger than VRAM (qwen4exp_fp8, GLM-5.3)
- MiniMax-H3: reference media and keyframe conditioning with the VAE encoders
- Krea 2 rebalance presets balanced, detail and subtle
- The dashboard's request history; a stall watch that reports a frozen step's thread and stack
- rad-tune at the served configuration, collectives measured as the exchange; Gemma 4 E2B/E4B's
  per-layer embeddings read ahead off the step path
- A GPTQ calibration tap and recipe for Gemma 4 31B's w4a8 container

Fixes:
- The two-rank all-reduce checks that a peer's push has landed before reducing it
- z-lab's DFlash drafter on Gemma 4 31B keeps drafting after a prefix-cache hit
- MiniMax-H3's modulation rows

Changes: Plugin ABI 31: out-of-tree plugins must be rebuilt. RADIANCE_PREFETCH_BESIDE is
--weight-prefetch now; RADIANCE_NO_HUGE_PAGES, RADIANCE_IDS_EARLY, RADIANCE_ATTN_BAND_SPLIT,
R4D_PREFILL_SPLITS, RAD_PLE_TIMING and RAD_PLE_CACHE_ROWS are gone.
This commit is contained in:
Deadcode committed 2026-10-27 16:47:35 +01:00
198 files changed
+20904 -3240

No files matched your search

+59 -140
View File
@@ -40,7 +40,6 @@
#include <cstdlib>
#include <atomic>
#include <chrono>
#include <condition_variable>
#include <deque>
#include <memory>
@@ -61,16 +60,6 @@
namespace {
/* Phase timers for one rank's gather, when RAD_PLE_TIMING is set: accumulated on the issuing
* thread and printed by avx::row_gather. The ahead-reader thread accumulates and never prints. */
struct PleTiming {
bool on = std::getenv("RAD_PLE_TIMING") != nullptr;
double find_ms = 0, pub_ms = 0, read_ms = 0, wait_ms = 0, dec_ms = 0, again_ms = 0;
uint64_t enters = 0, bytes = 0;
size_t spans = 0, hits = 0, claimed = 0, none = 0, theirs = 0;
};
thread_local PleTiming t_ple;
/* Prefetch distance, in rows, for cache lookups and decodes. Rows are scattered over an 80 MiB
* cache and the set words over 4 MiB, so each is an L3 or DRAM miss. */
constexpr long long kPrefetchRows = 8;
@@ -292,12 +281,7 @@ const TableFile* table_file(const uint8_t* p, long long n, int* err) {
* committed only as slots fill. */
struct RowCache {
static constexpr int kWays = 8;
/* Slot count, overridable with RAD_PLE_CACHE_ROWS (rows, clamped to [2^16, 2^25]). Data cost
* is `rows` * row bytes (160 at E4M3), so the shipped 2^19 rows is 80 MiB. The table's row
* popularity is Zipfian: a larger cache holds a longer hot head of the distribution and
* trades RAM directly for a lower miss rate on repeated traffic. Size it from measurement,
* not the model -- RAD_PLE_TIMING prints the per-call hit counts the sweep reads. */
static const uint64_t kRows;
static constexpr uint64_t kRows = 1ull << 19;
enum : uint64_t { EMPTY = 0, LOADING = 1, READY = 2 };
const TableFile* tf = nullptr;
@@ -368,9 +352,8 @@ struct RowCache {
}
}
/* Where `key` sits, without claiming it: READY in *slot (decode from it), LOADING in *slot
* (someone is reading it -- wait on the word), or ABSENT (*slot = -1; nobody has claimed the
* row, so whoever wants it must hand it to a producer or claim it themselves). */
/* Where `key` sits, without claiming it: HIT with *slot (decode from it), THEIRS with *slot (being
* read), or NONE with *slot = -1. */
Found lookup(uint64_t key, int64_t* slot) const {
const uint64_t set = mix(key) & set_mask;
const uint64_t s0 = set * kWays;
@@ -384,11 +367,6 @@ struct RowCache {
*slot = -1;
return NONE;
}
/* Read batches that failed outright (the ring refused, the disk errored): the consumers
* waiting on those rows re-hand them to a producer, and this counter is how they notice that
* their wait has a cause. */
std::atomic<uint64_t> failed_reads{0};
};
template <class T>
@@ -399,21 +377,6 @@ T* anon_array(size_t count) {
}
/* The cache for `n`-byte rows of `tf`, created on first use and kept for the process lifetime. */
/* Defined out of line so the environment is read once, at first use. */
const uint64_t RowCache::kRows = [] {
unsigned long long v = 1ull << 19;
if (const char* s = std::getenv("RAD_PLE_CACHE_ROWS")) {
char* end = nullptr;
const long long n = std::strtoll(s, &end, 10);
if (end != s && n > 0) v = (uint64_t)n;
}
if (v < 1ull << 16) v = 1ull << 16;
if (v > 1ull << 25) v = 1ull << 25;
/* Whole sets: the set index is `mix(key) & set_mask` over kWays-way sets. */
v -= v % kWays;
return v;
}();
RowCache* row_cache(const TableFile* tf, long long n) {
static std::mutex mu;
static std::vector<std::unique_ptr<RowCache>> caches;
@@ -523,16 +486,6 @@ struct ReadRing {
* one span per `stride` bytes, submitting and waiting in one call. Short reads fail. */
int read_spans(const TableFile& tf, const SpanRead* r, unsigned count, long long n,
long long stride, uint8_t* bounce) {
if (!t_ple.on) return read_spans_now(tf, r, count, n, stride, bounce);
const auto t0 = std::chrono::steady_clock::now();
const int s = read_spans_now(tf, r, count, n, stride, bounce);
t_ple.read_ms +=
std::chrono::duration<double, std::milli>(std::chrono::steady_clock::now() - t0).count();
t_ple.spans += count;
return s;
}
int read_spans_now(const TableFile& tf, const SpanRead* r, unsigned count, long long n,
long long stride, uint8_t* bounce) {
const long long A = tf.align;
unsigned tail = __atomic_load_n(sq_tail, __ATOMIC_RELAXED);
for (unsigned i = 0; i < count; ++i) {
@@ -549,7 +502,6 @@ struct ReadRing {
s->user_data = (uint64_t)(e - a);
sq_array[idx] = idx;
++tail;
t_ple.bytes += (uint64_t)(e - a);
}
__atomic_store_n(sq_tail, tail, __ATOMIC_RELEASE);
int status = RAD_OK;
@@ -557,7 +509,6 @@ struct ReadRing {
while (got < count) {
const long rc = syscall(__NR_io_uring_enter, fd, to_submit, count - got,
IORING_ENTER_GETEVENTS, nullptr, (size_t)0);
++t_ple.enters;
if (rc < 0 && errno != EINTR && errno != EAGAIN && errno != EBUSY) return RAD_E_IO;
if (rc > 0) to_submit -= (unsigned)rc < to_submit ? (unsigned)rc : to_submit;
unsigned h = __atomic_load_n(cq_head, __ATOMIC_RELAXED);
@@ -634,8 +585,6 @@ int read_and_publish(const TableFile& tf, RowCache& rc, ReadRing& rr, Gather& g,
uint8_t* bounce = g.bounce_for((size_t)cnt * (size_t)stride, (size_t)A);
const int rs = bounce ? rr.read_spans(tf, &reads[b], cnt, n, stride, bounce) : RAD_E_NOMEM;
if (rs != RAD_OK) {
rc.failed_reads.fetch_add(1, std::memory_order_release);
rc.failed_reads.notify_all();
for (size_t i = b; i < total; ++i)
if (reads[i].slot >= 0)
rc.word[reads[i].slot].store(RowCache::EMPTY, std::memory_order_release);
@@ -656,9 +605,6 @@ int read_and_publish(const TableFile& tf, RowCache& rc, ReadRing& rr, Gather& g,
std::memcpy(rc.data + (size_t)r.slot * (size_t)n, row, (size_t)n);
rc.ref[r.slot].store(1, std::memory_order_relaxed);
rc.word[r.slot].store(RowCache::ready(r.key), std::memory_order_release);
/* Per-slot wakeup: a consumer waiting on THIS row proceeds now, without waiting for
* the batch or the queue. Notify on a word nobody waits on costs a no-op futex wake. */
rc.word[r.slot].notify_one();
}
rc.published.fetch_add(1, std::memory_order_release);
rc.published.notify_all();
@@ -668,16 +614,19 @@ int read_and_publish(const TableFile& tf, RowCache& rc, ReadRing& rr, Gather& g,
return RAD_OK;
}
/* The on-demand regime: decode steps want a hundred-odd rows now. The session's hot rows are
* READY in the cache and decode from it; anything else is read straight from the file into its
* output row -- no claims, no eviction bookkeeping, no queue round trip, no waiting on anybody.
* Misses read here are deliberately not cached: the chunked prefill before decode has already
* cached the prompt's rows, and a decode step's occasional new trigram is not worth a claim. */
/* The decode regime: a step wants a hundred-odd rows now, and never waits on another thread's read.
* Rows READY in the cache decode from it; a missing row whose slot is free to take is claimed and
* read into the cache, so the ranks' gathers and the later steps that meet the same trigram find it
* READY instead of reading the file again (Flash-Next decode at c4 lost 2.5% when these reads were
* never cached); a row another thread is reading, or one with no slot, is read straight into its
* output row. */
constexpr long long kOnDemandMaxRows = 4096;
int gather_ondemand(const TableFile& tf, RowCache& rc, ReadRing& rr, const avx::RowGather& q,
avx::RowDecode decode, const uint16_t* lut) {
Gather& g = gather_state();
const uint64_t me = owner_tag();
if (!me) return RAD_E_UNSUPPORTED;
const long long M = q.M, n = q.row_bytes, ne = q.n_embd, x_ld = q.x_ld;
const long long base = tf.off + (long long)(q.tab - tf.lo);
auto row_of = [&](long long m) { return (long long)q.ids[m] - q.voff; };
@@ -686,36 +635,52 @@ int gather_ondemand(const TableFile& tf, RowCache& rc, ReadRing& rr, const avx::
g.src.clear();
g.dst.clear();
g.dm.clear();
g.dw.clear();
g.slot.resize((size_t)M);
g.reads.clear();
const auto tf0 = std::chrono::steady_clock::now();
g.again.clear();
for (long long m = 0; m < M; ++m) {
uint16_t* dst = q.out + m * x_ld;
if (pad(row_of(m))) { std::memset(dst, 0, (size_t)ne * sizeof(uint16_t)); continue; }
const uint64_t key = key_of(m);
int64_t s = -1;
if (rc.lookup(key, &s) == RowCache::HIT) {
const RowCache::Found f = rc.find_or_claim(key, me, &s);
g.slot[m] = s;
if (f == RowCache::HIT) {
g.src.push_back(rc.data + (size_t)s * (size_t)n);
g.dst.push_back(dst);
++t_ple.hits;
continue;
g.dm.push_back(m);
g.dw.push_back(RowCache::ready(key));
} else {
/* THEIRS, MINE (a row twice in one call) and NONE are read directly: no wait. */
g.reads.push_back({m, key, f == RowCache::CLAIMED ? s : -1});
}
g.reads.push_back({m, key, -1}); /* direct read, no claim */
++t_ple.none;
}
t_ple.find_ms +=
std::chrono::duration<double, std::milli>(std::chrono::steady_clock::now() - tf0).count();
if (!g.reads.empty()) {
const auto tr0 = std::chrono::steady_clock::now();
const int rs = read_and_publish(tf, rc, rr, g, g.reads, n, ne, decode, lut, q.out, x_ld);
t_ple.pub_ms +=
std::chrono::duration<double, std::milli>(std::chrono::steady_clock::now() - tr0).count();
if (rs != RAD_OK) return rs;
/* The claimed rows were published into the cache, not decoded: decode them from it. */
for (const SpanRead& r : g.reads) {
if (r.slot < 0) continue;
g.src.push_back(rc.data + (size_t)r.slot * (size_t)n);
g.dst.push_back(q.out + r.m * x_ld);
g.dm.push_back(r.m);
g.dw.push_back(RowCache::ready(r.key));
}
}
const auto td0 = std::chrono::steady_clock::now();
if (!g.src.empty()) decode(g.src.data(), g.dst.data(), (int64_t)g.src.size(), ne, lut);
t_ple.dec_ms +=
std::chrono::duration<double, std::milli>(std::chrono::steady_clock::now() - td0).count();
return RAD_OK;
if (g.src.empty()) return RAD_OK;
/* The seqlock, as gather_rows reads it: a row whose word changed during the decode was taken
* over, and is read again directly. */
decode(g.src.data(), g.dst.data(), (int64_t)g.src.size(), ne, lut);
std::atomic_thread_fence(std::memory_order_acquire);
for (size_t i = 0; i < g.dm.size(); ++i)
if (rc.word[g.slot[g.dm[i]]].load(std::memory_order_relaxed) != g.dw[i])
g.again.push_back(g.dm[i]);
if (g.again.empty()) return RAD_OK;
g.reads.clear();
for (long long m : g.again) g.reads.push_back({m, key_of(m), -1});
return read_and_publish(tf, rc, rr, g, g.reads, n, ne, decode, lut, q.out, x_ld);
}
/* out[m] = decoded row ids[m] - voff for every m < M, through the cache: find or claim each row
@@ -723,8 +688,8 @@ int gather_ondemand(const TableFile& tf, RowCache& rc, ReadRing& rr, const avx::
* decode from the cache. A row whose slot is taken over during the decode is read again directly. */
int gather_rows(const TableFile& tf, RowCache& rc, ReadRing& rr, const avx::RowGather& q,
long long first, avx::RowDecode decode, const uint16_t* lut) {
/* Two regimes. A decode step wants a hundred-odd rows now: on-demand, direct, no queue. A
* prefill chunk wants tens of thousands and has a known future: the producer-consumer queue. */
/* A decode step's rows are read on demand; a prefill chunk's tens of thousands, whose future is
* known, go through the claims and the read-ahead queue. */
if (q.M <= kOnDemandMaxRows) return gather_ondemand(tf, rc, rr, q, decode, lut);
Gather& g = gather_state();
const uint64_t me = owner_tag();
@@ -743,7 +708,6 @@ int gather_rows(const TableFile& tf, RowCache& rc, ReadRing& rr, const avx::RowG
g.waits.clear();
g.again.clear();
const auto tf0 = std::chrono::steady_clock::now();
for (long long j = 0; j < M; ++j) {
if (j + kPrefetchRows < M) {
const long long mp = at(j + kPrefetchRows);
@@ -756,27 +720,17 @@ int gather_rows(const TableFile& tf, RowCache& rc, ReadRing& rr, const avx::RowG
const RowCache::Found f = rc.find_or_claim(key, me, &s);
g.slot[m] = s;
g.kind[m] = (uint8_t)f;
if (f == RowCache::HIT) ++t_ple.hits;
else if (f == RowCache::CLAIMED) ++t_ple.claimed;
else if (f == RowCache::NONE) ++t_ple.none;
else if (f == RowCache::THEIRS) ++t_ple.theirs;
if (f == RowCache::CLAIMED) g.reads.push_back({m, key, s});
else if (f == RowCache::NONE) { g.reads.push_back({m, key, -1}); g.kind[m] = Gather::DONE; }
else if (f == RowCache::THEIRS) g.waits.push_back(m);
}
t_ple.find_ms +=
std::chrono::duration<double, std::milli>(std::chrono::steady_clock::now() - tf0).count();
const auto tp0 = std::chrono::steady_clock::now();
int rs = read_and_publish(tf, rc, rr, g, g.reads, n, ne, decode, lut, q.out, x_ld);
t_ple.pub_ms +=
std::chrono::duration<double, std::milli>(std::chrono::steady_clock::now() - tp0).count();
if (rs != RAD_OK) return rs;
/* Wait for rows other threads claimed to turn READY. `published` is read before the words, so
* a batch landing after the scan makes the wait return at once. Released claims (failed reads)
* and reused slots are read by this thread instead. */
const auto tw0 = std::chrono::steady_clock::now();
while (!g.waits.empty()) {
const uint32_t e = rc.published.load(std::memory_order_acquire);
size_t keep = 0;
@@ -791,12 +745,9 @@ int gather_rows(const TableFile& tf, RowCache& rc, ReadRing& rr, const avx::RowG
g.waits.resize(keep);
if (keep) rc.published.wait(e, std::memory_order_acquire);
}
t_ple.wait_ms +=
std::chrono::duration<double, std::milli>(std::chrono::steady_clock::now() - tw0).count();
/* Decode all READY rows in one batch: each word is read before the bytes and again after the
* batch (the seqlock), and rows whose word changed are read again. */
const auto td0 = std::chrono::steady_clock::now();
g.src.clear();
g.dst.clear();
g.dm.clear();
@@ -819,17 +770,11 @@ int gather_rows(const TableFile& tf, RowCache& rc, ReadRing& rr, const avx::RowG
for (size_t i = 0; i < g.dm.size(); ++i)
if (rc.word[g.slot[g.dm[i]]].load(std::memory_order_relaxed) != g.dw[i])
g.again.push_back(g.dm[i]);
t_ple.dec_ms +=
std::chrono::duration<double, std::milli>(std::chrono::steady_clock::now() - td0).count();
if (g.again.empty()) return RAD_OK;
const auto ta0 = std::chrono::steady_clock::now();
g.reads.clear();
for (long long m : g.again) g.reads.push_back({m, key_of(m), -1});
const int ra = read_and_publish(tf, rc, rr, g, g.reads, n, ne, decode, lut, q.out, x_ld);
t_ple.again_ms +=
std::chrono::duration<double, std::milli>(std::chrono::steady_clock::now() - ta0).count();
return ra;
return read_and_publish(tf, rc, rr, g, g.reads, n, ne, decode, lut, q.out, x_ld);
}
/* ============================== the reader that runs a step ahead ==============================
@@ -841,12 +786,9 @@ int gather_rows(const TableFile& tf, RowCache& rc, ReadRing& rr, const avx::RowG
* missing rows while the chunk runs. The next call waits for LOADING rows as it would for the other
* rank's.
*
* The queue is handed over sliced: each job carries at most `kJobRows` keys, claimed and published
* one job at a time, in order. Claims are promises the consumer waits on (a slot LOADING for a row
* it needs blocks the gather on the reader's progress), so a job must stay small: bounded claims
* keep the promise horizon near, and a consumer that outruns the reader finds unclaimed rows it
* can read itself instead of waiting behind the whole queue. Jobs keep the list's order, so the
* nearest chunk's rows are always the reader's first work.
* The rows go over in jobs of at most kJobRows keys, claimed and published one job at a time in
* list order. A claim is a promise a gather may wait on, so jobs stay small: a gather that outruns
* the reader finds unclaimed rows and reads them itself.
*
* Both ranks hand over the same ids; a repeated list is dropped. A failed read releases its claims
* and the next call reads those rows itself. The reader is detached and never destroyed. */
@@ -855,17 +797,18 @@ struct AheadJob {
RowCache* rc = nullptr;
long long n = 0;
std::vector<uint64_t> keys;
bool retry = false; /* the keys a full set refused once already */
};
/* One producer job's claim-read-publish sweep: ~2 ring batches, so the promise a job makes to a
* consuming gather is paid in well under a second on any disk that can stream the table. */
/* Keys per reader job, about two ring batches: a job's claims are promises a consuming gather may
* wait on, so it stays short. */
constexpr size_t kJobRows = 8192;
struct AheadReader {
std::mutex mu;
std::condition_variable cv;
std::deque<AheadJob> urgent; /* a waiting consumer's own misses: served first */
std::deque<AheadJob> q; /* the run-ahead queue: future chunks, in order */
std::deque<AheadJob> urgent; /* keys a full set refused, tried once more first */
std::deque<AheadJob> q; /* the read-ahead queue: future chunks, in order */
uint64_t last = 0; /* hash of the last id list accepted */
void run() {
@@ -881,10 +824,8 @@ struct AheadReader {
else { j = std::move(q.front()); q.pop_front(); }
}
if (!rr || !me) continue;
const auto t0 = t_ple.on ? std::chrono::steady_clock::now()
: std::chrono::steady_clock::time_point();
g.reads.clear();
std::vector<uint64_t> retry; /* sets full of LOADING: claim again after a wave */
std::vector<uint64_t> retry; /* sets full of LOADING rows: claim once more */
for (size_t i = 0; i < j.keys.size(); ++i) {
if (i + kPrefetchRows < j.keys.size())
__builtin_prefetch(j.rc->set_line(j.keys[i + kPrefetchRows]));
@@ -892,10 +833,8 @@ struct AheadReader {
const auto f = j.rc->find_or_claim(j.keys[i], me, &slot);
if (f == RowCache::CLAIMED)
g.reads.push_back({0, j.keys[i], slot});
else if (f == RowCache::NONE)
else if (f == RowCache::NONE && !j.retry)
retry.push_back(j.keys[i]);
/* READY/HIT: already there (a rank's gather, or an earlier pass). MINE: ours
* from an earlier pass -- published when its read lands. */
}
/* Every read has a slot, so nothing is decoded and there is no output. */
(void)read_and_publish(*j.tf, *j.rc, *rr, g, g.reads, j.n, 0, nullptr, nullptr,
@@ -903,16 +842,10 @@ struct AheadReader {
if (!retry.empty()) {
std::lock_guard<std::mutex> lk(mu);
AheadJob r;
r.tf = j.tf; r.rc = j.rc; r.n = j.n; r.keys = std::move(retry);
r.tf = j.tf; r.rc = j.rc; r.n = j.n; r.keys = std::move(retry); r.retry = true;
urgent.push_front(std::move(r));
cv.notify_one();
}
if (t_ple.on) {
const double ms = std::chrono::duration<double, std::milli>(
std::chrono::steady_clock::now() - t0).count();
std::fprintf(stderr, "ple[reader] keys %zu reads %zu %.1fms\n", j.keys.size(),
g.reads.size(), ms);
}
}
}
};
@@ -926,9 +859,8 @@ AheadReader* ahead_reader() {
return r;
}
/* Hands the rows of `q.ahead` (to be gathered by later calls) to the reader, sliced into
* `kJobRows`-key jobs in list order: the reader claims, reads and publishes one job at a time, so
* the nearest chunk's rows are its first work and a claim's promise horizon stays short. */
/* Hands the rows of `q.ahead` (gathered by later calls) to the reader as kJobRows-key jobs in list
* order, so the nearest chunk's rows come first. */
void read_ahead(const TableFile& tf, RowCache& rc, const avx::RowGather& q) {
uint64_t h = 1469598103934665603ull ^ (uint64_t)(uintptr_t)&rc;
for (long long m = 0; m < q.n_ahead; ++m) { h ^= (uint32_t)q.ahead[m]; h *= 1099511628211ull; }
@@ -993,7 +925,6 @@ int avx::row_gather(const RowGather& q, RowDecode decode) {
if (!tfile) return ferr;
#if defined(__linux__)
if (tfile->fd >= 0) {
const auto t0 = std::chrono::steady_clock::now();
int why = 0;
ReadRing* rr = read_ring(&why);
if (!rr) {
@@ -1007,18 +938,6 @@ int avx::row_gather(const RowGather& q, RowDecode decode) {
const long long first = q.rank > 0 && q.rank < ws ? q.M * q.rank / ws : 0;
const int rs = gather_rows(*tfile, *rc, *rr, q, first, decode, lut);
if (rs != RAD_OK) return rs;
const double wall =
std::chrono::duration<double, std::milli>(std::chrono::steady_clock::now() - t0).count();
if (t_ple.on)
std::fprintf(stderr,
"ple[rank %lld] rows %lld: find %.1fms (hit %zu claimed %zu none %zu "
"theirs %zu) pub %.1fms (ring %.1fms, %llu enters, %zu spans, "
"%.1f MiB) wait %.1fms dec %.1fms again %.1fms | wall %.1fms\n",
(long long)q.rank, (long long)q.M, t_ple.find_ms, t_ple.hits,
t_ple.claimed, t_ple.none, t_ple.theirs, t_ple.pub_ms, t_ple.read_ms,
(unsigned long long)t_ple.enters, t_ple.spans, t_ple.bytes / 1048576.0,
t_ple.wait_ms, t_ple.dec_ms, t_ple.again_ms, wall);
t_ple = {};
/* Queue the rows a later call will gather, after this call's own rows. */
if (q.ahead && q.n_ahead > 0) read_ahead(*tfile, *rc, q);
return RAD_OK;