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 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

58 lines
2.4 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. 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 <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;
struct Impl;
private:
std::unique_ptr<Impl> p_;
};
/* 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 */