Archived
radiance 1.5.0
- Gemma 4 31B (PRs #74, #75, #81, #86; sfjes, keptn42): sliding and global attention with their own kernels, the assistant head as a drafter that reads the trunk's cache, the vision tower, a fused w4a8 decode step, bf16 and compressed-tensors int4 checkpoints, and window snapshots so a prefix hit on a sliding-window model resumes instead of prefilling again. deploy/compose/gemma4-31b-w4a8.yaml serves keptn42's container on two cards - ParoQuant (PRs #65, #66, #67; malic): Qwen3.8-27B checkpoints with learned Givens rotations, as int4, int5 and MXFP4, imported without re-quantising, the prefill's rotations on the matrix cores. deploy/compose/qwen3.8-27b-paro.yaml serves them on one card. A ParoQuant container made with the PR builds is refused: convert it again with --reuse <old container> - Gemma 4 26B-A4B with z-lab's DFlash drafter (PR #88; Perire): arch/gemma4 serves Google's bf16 checkpoint with the routed experts in block fp8 or bf16 (data/recipes/gemma4-26b-a4b-df*.recipe), and libr4d gains its windowed paged attention, the fused sandwich-norm joins, expert_scale and the sharded draft head's pair_argmax. A prefill chunk runs as two slices with its all-reduces beside the compute, bit-exact with the whole step. The 31B's global layers take the windowed attention too: an 11.5K-token prefill on two R9700s in 3.1 s instead of 4.9 - a startup that logs nothing for two minutes says where it waits (#89): the system call (a KFD request by name), the library that made it, and its stack, which addr2line resolves against the binary - the prefix cache is kept in VRAM and host memory only (#70): the disk tier wrote every block and snapshot a prompt produced, and its copies never outlived the process. --prefix-cache-host-mib is renamed --prefix-cache-mib; --prefix-cache-dir and --prefix-cache-disk-mib are removed, and startup refuses all three with what replaced them. The compose files no longer mount /data, and .env no longer needs RADIANCE_STATE - --prefix-cache-ttl S (default 3600, 0 never): a conversation no request has used for that long leaves the cache, whichever tier holds it; radiance:prefix_cache_expired_total counts them. A full host tier now drops its least recently used conversations - --vision-tower-placement vram|ram (#84): ram keeps an encoder tower in pinned host memory and gives its VRAM to the KV cache, read over the link once an image - timings carry ttft_ms and total_ms (#85): the server's own time from the request body's arrival to the first and the last token, queueing and tokenisation included - a KV-cache recall that found a moved expert with nowhere to go stopped halfway and leaked the slots it had already freed: after it every recall failed, the cache stayed short until a restart, and requests failed with HTTP 500. A recall now waits for the slots it is owed and always finishes - a tool result or tool-call arguments that are not JSON are no longer refused as nesting past 1024 levels for their unmatched brackets (#90): only text that parses as JSON is held to the bound, since nothing else is parsed into a tree - the host-pool refusal names the limit that applies to pinned memory (RAM less 1/64 and 1.5 GiB), not ttm.pages_limit - --embedding-placement auto, removed in 1.3.0, is refused with what replaced it - for out-of-tree kernel libraries: gemm_nt_q gains two operands (pb1, pb2, the part bounds), and the loader requires identical op schemas, so a library built against 1.4.0 must be rebuilt. For architecture plugins, rad_op_declared(b, op) asks whether an op is in the loaded vocabulary without declaring it
This commit is contained in:
commit
b93b531f63
127 files changed
+9609
-4796
No files matched your search
+42
-28
@@ -15,10 +15,11 @@
|
||||
# (rad-info --plugins), from the out-of-tree home alone;
|
||||
# 4. the installed rad-kbench replays the recorded fixture through the host libraries from that
|
||||
# home, and every check passes;
|
||||
# 5. with HIP_COMPILER given, libr4d is built out of tree too, for HIP_TARGETS, and compiles to
|
||||
# the tree's device code. A replay of a device library needs a card, and this test must not
|
||||
# touch one a server is using; the same instructions mean the tree's own GPU suite
|
||||
# (ctest -L gpu) has already checked what the out-of-tree build produced.
|
||||
# 5. with HIP_COMPILER given, the device library the tree built (libr4d) is built out of tree
|
||||
# too, for HIP_TARGETS, and compiles to the tree's device code. A replay of a device library
|
||||
# needs a card, and this test must not touch one a server is using; the same instructions mean
|
||||
# the tree's own GPU suite (ctest -L gpu) has already checked what the out-of-tree build
|
||||
# produced.
|
||||
set -eu
|
||||
B=$1; S=$2; W=$3
|
||||
HIPC=${4:-}; HIPT=${5:-}
|
||||
@@ -45,13 +46,20 @@ dirs="libref libquant"
|
||||
for d in "$S"/arch/*/; do
|
||||
[ -f "$d/CMakeLists.txt" ] && dirs="$dirs arch/$(basename "$d")"
|
||||
done
|
||||
[ -n "$HIPC" ] && dirs="$dirs libr4d"
|
||||
# The device libraries: built out of tree only with the tree's HIP compiler, and left out of every
|
||||
# comparison below without it.
|
||||
devlibs=""
|
||||
for d in libr4d; do
|
||||
[ -f "$S/$d/CMakeLists.txt" ] && [ -f "$B/radiance_home/kernels/$d.so" ] && devlibs="$devlibs $d"
|
||||
done
|
||||
[ -n "$HIPC" ] && dirs="$dirs $devlibs"
|
||||
is_dev() { case " $devlibs " in *" $1 "*) return 0 ;; esac; return 1; }
|
||||
|
||||
for d in $dirs; do
|
||||
n=$(basename "$d")
|
||||
say "building $d against the installed package"
|
||||
extra=""
|
||||
[ "$n" = libr4d ] && extra="-DCMAKE_HIP_COMPILER=$HIPC -DRAD_GPU_TARGETS=$HIPT"
|
||||
is_dev "$n" && extra="-DCMAKE_HIP_COMPILER=$HIPC -DRAD_GPU_TARGETS=$HIPT"
|
||||
# shellcheck disable=SC2086
|
||||
run "$W/logs/$n.configure.log" cmake -S "$S/$d" -B "$W/b/$n" -G "$GEN" \
|
||||
-DCMAKE_PREFIX_PATH="$P" -DRAD_PLUGIN_INSTALL_HOME="$H" $extra
|
||||
@@ -66,7 +74,9 @@ sets() {
|
||||
done | sort
|
||||
}
|
||||
want=$(sets "$B/radiance_home")
|
||||
[ -n "$HIPC" ] || want=$(printf '%s\n' "$want" | grep -v '^kernels/libr4d\.so$' || true)
|
||||
if [ -z "$HIPC" ]; then
|
||||
for d in $devlibs; do want=$(printf '%s\n' "$want" | grep -v "^kernels/$d\.so\$" || true); done
|
||||
fi
|
||||
have=$(sets "$H")
|
||||
if [ "$want" != "$have" ]; then
|
||||
say "in-tree:"; say "$want"; say "out of tree:"; say "$have"
|
||||
@@ -91,9 +101,11 @@ listing() {
|
||||
grep -v '^plugins on' | grep -v '^ /'
|
||||
}
|
||||
tree_list=$(listing "$B/radiance_home")
|
||||
[ -n "$HIPC" ] || tree_list=$(printf '%s\n' "$tree_list" | grep -v ' libr4d ' || true)
|
||||
if [ -z "$HIPC" ]; then
|
||||
for d in $devlibs; do tree_list=$(printf '%s\n' "$tree_list" | grep -v " $d " || true); done
|
||||
fi
|
||||
oot_list=$(listing "$H")
|
||||
# The in-tree list numbers libr4d's position when it is left out above; compare without the order
|
||||
# The in-tree list numbers a device library's position when it is left out above; compare without the order
|
||||
# column and check the order separately by name.
|
||||
strip() { printf '%s\n' "$1" | sed 's/^ *[0-9]* //'; }
|
||||
if [ "$(strip "$tree_list")" != "$(strip "$oot_list")" ]; then
|
||||
@@ -104,12 +116,12 @@ say "3. same registration:"
|
||||
say "$oot_list"
|
||||
|
||||
# 4. The installed tools serve from the out-of-tree home. The replay runs every library its home
|
||||
# holds, so it is given the out-of-tree home less its device library, which has no card here.
|
||||
# holds, so it is given the out-of-tree home less its device libraries, which have no card here.
|
||||
HH="$W/hosthome"
|
||||
mkdir -p "$HH/kernels"
|
||||
for k in architectures quantizers; do [ -d "$H/$k" ] && ln -s "$H/$k" "$HH/$k"; done
|
||||
for so in "$H"/kernels/*.so; do
|
||||
[ "$(basename "$so")" = libr4d.so ] || ln -s "$so" "$HH/kernels/"
|
||||
is_dev "$(basename "$so" .so)" || ln -s "$so" "$HH/kernels/"
|
||||
done
|
||||
run "$W/logs/kbench.log" env HIP_VISIBLE_DEVICES=-1 RADIANCE_HOME="$HH" \
|
||||
"$P/bin/rad-kbench" --fixture "$P/share/radiance/kernels.rkb" --max-cases 1
|
||||
@@ -134,8 +146,6 @@ if [ -n "$HIPC" ]; then
|
||||
for t in llvm-objcopy llvm-readelf clang-offload-bundler; do
|
||||
[ -x "$L/$t" ] || fail "no $t beside $HIPC"
|
||||
done
|
||||
td="$B/libr4d/CMakeFiles/libr4d.dir"
|
||||
od="$W/b/libr4d/CMakeFiles/libr4d.dir"
|
||||
mkdir -p "$W/co"
|
||||
fatbin() { # fatbin OBJ -- its fat binary into $W/co/fb; false for a source with no kernels
|
||||
"$L/llvm-objcopy" --dump-section .hip_fatbin="$W/co/fb" "$1" /dev/null 2>/dev/null
|
||||
@@ -169,22 +179,26 @@ if [ -n "$HIPC" ]; then
|
||||
descriptors "$W/co/co" "$W/co/.rodata" | cksum
|
||||
cksum < "$W/co/.rodata"
|
||||
}
|
||||
[ "$(ls "$td"/*.hip.o | wc -l)" = "$(ls "$od"/*.hip.o | wc -l)" ] ||
|
||||
fail "libr4d compiles a different set of HIP sources out of tree"
|
||||
n=0
|
||||
for o in "$td"/*.hip.o; do
|
||||
f=$(basename "$o")
|
||||
[ -f "$od/$f" ] || fail "libr4d's $f has no out-of-tree twin"
|
||||
if ! fatbin "$o"; then
|
||||
if fatbin "$od/$f"; then fail "libr4d's $f has device code out of tree only"; fi
|
||||
continue
|
||||
fi
|
||||
for t in $("$L/clang-offload-bundler" --type=o --input="$W/co/fb" --list | grep -v '^host-'); do
|
||||
[ "$(code "$o" "$t")" = "$(code "$od/$f" "$t")" ] ||
|
||||
fail "libr4d's $f compiles to different device code for $t out of tree"
|
||||
n=$((n + 1))
|
||||
for lib in $devlibs; do
|
||||
td="$B/$lib/CMakeFiles/$lib.dir"
|
||||
od="$W/b/$lib/CMakeFiles/$lib.dir"
|
||||
[ "$(ls "$td"/*.hip.o | wc -l)" = "$(ls "$od"/*.hip.o | wc -l)" ] ||
|
||||
fail "$lib compiles a different set of HIP sources out of tree"
|
||||
n=0
|
||||
for o in "$td"/*.hip.o; do
|
||||
f=$(basename "$o")
|
||||
[ -f "$od/$f" ] || fail "$lib's $f has no out-of-tree twin"
|
||||
if ! fatbin "$o"; then
|
||||
if fatbin "$od/$f"; then fail "$lib's $f has device code out of tree only"; fi
|
||||
continue
|
||||
fi
|
||||
for t in $("$L/clang-offload-bundler" --type=o --input="$W/co/fb" --list | grep -v '^host-'); do
|
||||
[ "$(code "$o" "$t")" = "$(code "$od/$f" "$t")" ] ||
|
||||
fail "$lib's $f compiles to different device code for $t out of tree"
|
||||
n=$((n + 1))
|
||||
done
|
||||
done
|
||||
say "5. $lib's device code is the tree's: $n code objects, the same instructions and descriptors"
|
||||
done
|
||||
say "5. libr4d's device code is the tree's: $n code objects, the same instructions and descriptors"
|
||||
fi
|
||||
say "PASS"
|
||||
Reference in new issue
Block a user