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/format/table_copy.h
T
Deadcode 1e968f6e1d radiance 1.7.0
- every model serves without a GPU: libavx covers every op, so `--kernels libavx` alone serves
  every shipped container
- Qwen3-ASR (zivius): speech to text on /v1/audio/transcriptions and live over /v1/realtime
- /v1/messages works with Claude Code as it ships (gearwave00001)
- a long agent conversation keeps its cached history when the client rewrites its last turn
  (manueloverride)
- a stream's first event goes out with the first token, so llama-benchy measures prefill right
- opt-in --prefill-interleave (Smellyyyy, baKon) and --prefill-span (keptn42)
- four-rank TP releases the link early; four-rank selftests and docs/TP4.md (goodman-b)
- NVFP4 and FP8 compressed-tensors imports (devmilan); tools/rad-export for finetunes and LoRA
  adapters (baKon)
- many fixes, among them lost tokens on stop strings under concurrency, keep-alive, MiniCPM5 tool
  arguments and the CPU's vision and audio encoders
- plugin ABI 17 and changed op schemas: out-of-tree plugins must be rebuilt
2026-10-16 18:25:18 +02:00

39 lines
1.8 KiB
C++

/* table_copy.h -- a container table copied into host memory (--ngram-placement ram): locked memory
* for the host gather (made here), or pinned memory a card reads (allocated by the caller, filled
* by table_copy_fill). Both share the read and the check.
*
* The locked copy uses huge pages rather than locking the mapping: the mapping costs a fault per
* 4 KiB page and a TLB walk on nearly every scattered row, while a MADV_HUGEPAGE region covers
* thousands of rows per page. It is locked on first touch (MLOCK_ONFAULT); filled by parallel
* positional reads, dropping the container's pages behind so the table is not held twice; and
* checked against the mapping before use, since a wrong offset would silently serve wrong rows.
* A host kernel reads an address no file backs as plain memory (libavx's table_file). */
#pragma once
#include "radfile.h"
#include <cstddef>
#include <cstdint>
#include <string>
namespace rad {
struct TableCopy {
void* base = nullptr;
size_t bytes = 0; /* the mapping's length: the table rounded up to 2 MiB */
};
/* Copy [src, src + n) of `file`'s mapping (file offset `foff`) into a new locked region. RAD_OK with
* `out` filled, or an error with `why` and nothing held. */
int table_copy_make(const RadFile& file, const uint8_t* src, int64_t n, int64_t foff,
TableCopy* out, std::string* why);
/* table_copy_make's read and check, into caller-allocated [dst, dst + n): pinned memory a card
* reads in place when a device kernel gathers the table. */
int table_copy_fill(const RadFile& file, const uint8_t* src, int64_t n, int64_t foff,
uint8_t* dst, std::string* why);
/* Unlock and unmap; a no-op for a copy never made. */
void table_copy_free(TableCopy* c);
} /* namespace rad */