radiance 1.2.0

- MXFP4 weights: block-fp8 Qwen3.5/3.6/3.8 dense models serve OCP-MXFP4 linears (e2m1, an E8M0
  exponent per 32) at 4-bit weights against E4M3 activations. New libr4d rows: the decode GEMM
  (M <= 128, split-K with a fused last-arriver reduction) and the prefill GEMM on a fragment-tiled
  activation. Qwen3.8-27B MXFP4 (AMD Quark AWQ) is in the model table.
- Cards without peer-to-peer access serve: every collective has a host-memory twin; --p2p
  auto|on|off.
- Stop strings apply to the answer, not to the reasoning block a reply starts in.
- A prefix hit ends one drafter window before the prompt's end, so a windowed block drafter
  (DFlash2) drafts from the first token of a follow-up turn.
This commit is contained in:
Deadcode committed 2026-10-06 21:36:24 +02:00
1 parent 7001841e45
commit e95d397288
47 files changed
+2611 -219

No files matched your search

+23
View File
@@ -489,6 +489,29 @@ int r4d_ar_gather_inv(long inv, long sorted, long T, long stream_i) {
void r4d_ar_ipc_free(long p) { if (p) (void)hipFree((void*)p); }
void r4d_ar_ipc_memzero(long p, long size) { if (p) HIPOK(hipMemset((void*)p, 0, size)); }
// THE HOST MAILBOX. Coherent so a peer's stores are not held in a CPU cache line this card reads
// around, mapped so the cards address it, portable so every card does and not only the one
// current at allocation. A card reaches it through the same fine-grained path a peer's VRAM
// scratch is reached by, so the kernels' fences mean what they mean there. The address a card
// uses must be the CPU's own, because one pointer is published to every rank: a mapping that put
// the pages elsewhere on some card would have each rank write where no other rank reads.
long r4d_ar_host_alloc(long size) {
void* p = nullptr;
HIPOK(hipHostMalloc(&p, size, hipHostMallocCoherent | hipHostMallocMapped |
hipHostMallocPortable));
std::memset(p, 0, (size_t)size);
void* d = nullptr;
const hipError_t e = hipHostGetDevicePointer(&d, p, 0);
if (e != hipSuccess || d != p) {
(void)hipHostFree(p);
throw std::runtime_error(e != hipSuccess
? std::string("host mailbox: no card address: ") + hipGetErrorString(e)
: std::string("host mailbox: the card address differs from the CPU address"));
}
return (long)p;
}
void r4d_ar_host_free(long p) { if (p) (void)hipHostFree((void*)p); }
// Enable direct peer access. radiance runs one process with a thread per rank sharing an address
// space, so a peer pointer is valid here once this has run and no IPC handle exchange is needed;
// see the header of r4d_ar_entry.hip.