This repository has been archived on 2026-11-24. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
radiance-sycl/core/mm/item.cpp
T
Deadcode dc339b4cd2 radiance 1.4.0
- Qwen3.8-Flash-Next on one card: the heat engine moves 64 experts a step (was 8), its copies and
  the prefill's expert staging run on the card's DMA engines instead of as copy kernels, and at
  decode the next layer's likeliest experts are copied onto the card ahead of its GEMMs. Against
  1.3.0 at --tp 1: prefill +17-20% from 8K tokens up, throughput under load +16-20%
- deploy/compose/flashnext-tp1.yaml: Qwen3.8-Flash-Next on one card and 64 GB of host RAM
  (4096-token prefill steps, 4 sequences, a 301K-token cache)
- #61: --busy-prefill-chunk (default auto): a long prefill leaves the rest of the step to the
  requests decoding beside it and to new arrivals, instead of taking all of it (baKon)
- LiquidAI's LFM2 and LFM2-VL, and d1's /v1/systemone (after zivius's PR #50)
- a startup report: every option with its value and where it came from, the hardware, and what
  on it costs speed with the fix; /diagnostics serves it (behind the API key; without one, only
  to the same machine)
- #69: a GPU memory fault names the buffer and kernel argument behind it and ends the server at
  once (exit status 70), instead of hanging or writing a core of tens of gigabytes
- #64: a card without Resizable BAR is refused at startup, naming what to turn on, instead of
  crashing at the first launch
- the image is built with ROCm 10.1 (the host's amdgpu driver must support it), with ROCm's
  libLLVM rebuilt so the same source compiles to the same kernels every time; a source build
  takes ROCm 10.1 or 7.2
- #71: the image ships curl, jq and a CA bundle, so --model <HF repo id> works in the container,
  and hfget.sh runs under its busybox (baKon)
- --profile-ops shows how long each op's lane sat idle before it; cardclock.py skips an
  integrated GPU instead of stopping
2026-10-12 11:46:14 +02:00

45 lines
1.8 KiB
C++

/* item.cpp -- the parts of an Item the step path uses, in a unit of their own. The batch builder
* links against this and nothing else in core/mm, so a test that fakes the device layer does not
* pull the processor -- and through its metadata reader, the real device layer -- in with it. */
#include "mm/processor.h"
namespace rad {
namespace mm {
void Item::coords(int64_t first, int64_t count, int32_t* planes) const {
/* AN AUDIO CLIP IS 1-D (RadBatch::enc): the frame's index, whether it is real, the clip's real
* frames and its staged ones. */
if (kind == Kind::Audio) {
for (int64_t k = 0; k < count; ++k) {
const int64_t f = first + k;
planes[k] = (int32_t)f;
planes[count + k] = f < valid ? 1 : 0;
planes[2 * count + k] = valid;
planes[3 * count + k] = grid_h;
}
return;
}
/* Merge-block order inverted: a patch's index within its segment is
* ((block_row * blocks_w + block_col) * merge + in_row) * merge + in_col. */
const int32_t merge = grid_h / rows_h;
int32_t s = 0;
while (s + 1 < n_seg && patch_at(s + 1) <= first) ++s;
for (int64_t k = 0; k < count; ++k) {
while (s + 1 < n_seg && patch_at(s + 1) <= first + k) ++s;
const int64_t within = first + k - patch_at(s);
const int64_t bw = seg_w(s) / merge;
const int64_t in_col = within % merge;
const int64_t in_row = (within / merge) % merge;
const int64_t blk = within / (merge * merge);
const int64_t row = (blk / bw) * merge + in_row;
const int64_t col = (blk % bw) * merge + in_col;
planes[k] = (int32_t)row;
planes[count + k] = (int32_t)col;
planes[2 * count + k] = seg_h(s);
planes[3 * count + k] = seg_w(s);
}
}
} /* namespace mm */
} /* namespace rad */