radiance 1.0.11

- The n-gram embedding table (Qwen3.8-Flash-Next's per-layer embedding) can be gathered on the
  card. libr4d gains a row for embed_lookup_q whose output is the host gather's to the bit, and
  --ngram-placement uses it: ram keeps a pinned copy in RAM that the cards read in place over the
  link, so a step has no host work in it; vram puts the whole table on every card that holds it;
  disk reads it from the container on the host, as before. auto takes the first of the three that
  holds the table and prints why it passed over the others. Without a device kernel for the gather,
  ram is the locked copy the host gather reads and vram is refused, as in 1.0.10.
- The pinned copy is not charged to RLIMIT_MEMLOCK; the host gather's locked copy still is, so
  --ulimit memlock=-1 matters only on a run without the cards.
- The idea and a first kernel for the device gather came from Code000.
This commit is contained in:
Deadcode committed 2026-10-05 16:34:37 +02:00
1 parent e466fa07e2
commit 469441d90f
24 files changed
+848 -247

No files matched your search

+5 -5
View File
@@ -890,11 +890,11 @@ int Ctx::issue_body(rad_op h, const RadOperand* opd, int n_opd, int64_t n) {
* is the one place it stops being harmless: it runs NOW, on this thread, and reads and writes
* the host arena NOW.
*
* A PLE gather is exactly that shape. `ngram_ids` writes the hashed row ids into a host-domain
* buffer on the device, and `embed_lookup_q` reads them on the host. With no join the host
* reads whatever the arena holds from an earlier step and gathers the rows of the wrong
* n-gram -- valid ids, valid rows, every kernel agreeing with its oracle, and fluent text that
* is a stable wrong answer rather than an intermittent one.
* A PLE gather on the host is exactly that shape. `ngram_ids` writes the hashed row ids into a
* host-domain buffer on the device, and `embed_lookup_q` reads them on the host. With no join
* the host reads whatever the arena holds from an earlier step and gathers the rows of the
* wrong n-gram -- valid ids, valid rows, every kernel agreeing with its oracle, and fluent text
* that is a stable wrong answer rather than an intermittent one.
*
* WHAT THE JOIN WAITS FOR is the last device op on each lane that touched the host arena
* (host_touch_ev_), not the whole stream. Every hazard a host op has is with such an op -- the