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/util/stallwatch.h
T
Deadcode 6645337f69 radiance 1.13.0
New models:
- Tencent Hy-Memory (HYV3) from its BF16, FP8 and GGUF checkpoints, with its native tool calls
- M2XFP4: metadata-augmented MXFP4 weights for Qwen3.8-27B and its DFlash2 drafter (top-1 89.1% ->
  92.4% against plain MXFP4), its quantiser and recipe, and ParoQuant's M2XFP4 checkpoints
- Gemma 4 E2B/E4B audio input; NVIDIA-Nemotron-3.5-Bolt-E4B in int8 and 4-bit, on two cards by
  default; Ornith-1.5-122B compose files

Speed:
- Weight reads beside the decode all-reduces (qwen35_fp8, gemma3; --weight-prefetch, on by default):
  the 27B MXFP4 with DFlash2 61.2 -> 67.9 tok/s at c1, TranslateGemma 27B +13%
- Head-256 split-KV decode attention at 256 workgroups and without bank conflicts (27B: +3-5% a
  step at 25-41K context), and the prefill KV split for small launches (a short turn over a long
  context decodes the other sequences 27% faster in that step)
- MXFP4 decode gate_up, activation and fp8 quantiser in one launch (27B, Gemma 3 up to 64 rows:
  TranslateGemma +2-5% at 2-8 streams)
- ParoQuant int4/int5 tiled GEMMs 6-9% faster
- Speculation: a step's tokens are sent before the drafter's passes end, no step waits behind one
  that ends its requests, and the MTP head's first draft no longer collapses after short chats in
  the prefix cache

Features:
- --kv-resident N: KV streaming for a context bigger than VRAM (qwen4exp_fp8, GLM-5.3)
- MiniMax-H3: reference media and keyframe conditioning with the VAE encoders
- Krea 2 rebalance presets balanced, detail and subtle
- The dashboard's request history; a stall watch that reports a frozen step's thread and stack
- rad-tune at the served configuration, collectives measured as the exchange; Gemma 4 E2B/E4B's
  per-layer embeddings read ahead off the step path
- A GPTQ calibration tap and recipe for Gemma 4 31B's w4a8 container

Fixes:
- The two-rank all-reduce checks that a peer's push has landed before reducing it
- z-lab's DFlash drafter on Gemma 4 31B keeps drafting after a prefix-cache hit
- MiniMax-H3's modulation rows

Changes: Plugin ABI 31: out-of-tree plugins must be rebuilt. RADIANCE_PREFETCH_BESIDE is
--weight-prefetch now; RADIANCE_NO_HUGE_PAGES, RADIANCE_IDS_EARLY, RADIANCE_ATTN_BAND_SPLIT,
R4D_PREFILL_SPLITS, RAD_PLE_TIMING and RAD_PLE_CACHE_ROWS are gone.
2026-10-27 16:47:35 +01:00

64 lines
2.7 KiB
C++

/* stallwatch.h -- naming where a phase that has gone quiet is waiting.
*
* A hang (a driver call that never returns, a lock inside a runtime library) leaves no trace in
* the log, often on machines that cannot be reproduced locally (a guest kernel, a passed-through
* card), so the process reports where it waits.
*
* A StallWatch is held across a phase by the thread doing it. When nothing has been logged for the
* quiet interval it reports what that thread is doing:
* - its scheduler state and kernel wait channel;
* - the system call it is in, an ioctl with its device and request, and the library that made
* the call;
* - when the thread waits in user space (a lock, a sleep), its stack as module+offset frames,
* which addr2line symbolises against the released binary. A thread inside an ioctl is not
* signalled: the call already names where it waits, and a signal could end a driver wait
* early;
* - the process's other threads that are inside an ioctl, since a lock in a runtime library is
* usually held by one of them.
* It reports again each time the silence doubles, showing whether the thread moved. A phase whose
* progress is not logged (a loop of steps) marks it with progress(). The watch reads only its own
* process's /proc entries and wakes every quarter of the quiet interval, at most once a second,
* while held.
*/
#pragma once
#include <atomic>
#include <cstdint>
#include <memory>
#include <string>
#include <sys/types.h>
namespace rad {
class StallWatch {
public:
/* `phase` names what is being watched in the report ("startup"). */
explicit StallWatch(const char* phase, uint64_t quiet_ms = 60000);
~StallWatch();
StallWatch(const StallWatch&) = delete;
StallWatch& operator=(const StallWatch&) = delete;
/* Progress the log does not show: the silence restarts as if a line had been logged. */
void progress();
struct Impl;
private:
std::unique_ptr<Impl> p_;
std::atomic<uint64_t> beat_{0}; /* rad_mono_ns of the last progress() */
};
/* What thread `tid` of this process is doing, as the report words it: state, wait channel, system
* call. With `stack`, a thread waiting in user space is also asked for its frames. */
std::string stall_describe_thread(pid_t tid, bool stack);
/* One line of /proc/<pid>/task/<tid>/syscall in words: "running", "not in a system call", or the
* call with its arguments decoded where they name something (an ioctl's device and request). */
std::string stall_decode_syscall(const std::string& line);
/* `addr` as the module that maps it and its offset from the module's load base, "libfoo.so+0x1a2b":
* the number addr2line takes for that module. */
std::string stall_module_offset(uintptr_t addr);
} /* namespace rad */