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 7d840861af radiance 1.2.4
- EmbeddingGemma 2 (google/embeddinggemma-2): text, image, video and audio embeddings on the
  card (libr4d) and on the CPU (libavx); prompt_name, Matryoshka dimensions, image budgets,
  mixed content parts and the messages form on /v1/embeddings
- #43: on serves that lend the activation arena to the experts (Qwen3.8-Flash-Next with
  expert_tiered), every image after the first read its rows from the wrong place -- garbage
  replies, or an earlier request's image. Fixed
- the Qwen vision towers' attention resolves on the card again (broken on main after 1.2.3,
  never released)
- #42: a warning at startup when amdgpu cwsr_enable is 0, and a stalled queue is reported as
  slow or stuck; the guide covers the GPU-hang-and-reset chain
2026-10-07 22:42:45 +02:00

43 lines
1.7 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 int64_t seg = (int64_t)grid_h * grid_w;
const int32_t merge = grid_h / rows_h;
const int64_t bw = grid_w / merge;
for (int64_t k = 0; k < count; ++k) {
const int64_t within = (first + k) % seg;
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] = grid_h;
planes[3 * count + k] = grid_w;
}
}
} /* namespace mm */
} /* namespace rad */