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/docker/llvm-check.sh
T
Deadcode ddcb9c69bb radiance 2.0.0
Radiance becomes a multi-model engine: one process serves several models behind one port, loads
each when a request names it, parks it in host memory or restores it from its container, and
shares the cards between them (docs/MULTIMODEL.md). The configuration is one YAML file; the
command line flags are gone (`radiance --config FILE`, hot reload on SIGHUP).

Formats. IQ8R (rotated int8) and IQR-V4 replace FP8 and MXFP4 as whole-model formats, with an
int8 KV cache (`kv-cache-dtype: i8`) in place of the fp8 one. Containers whose weights are block
FP8, MXFP4, M2XFP4, NVFP4 or ParoQuant are refused at startup by the name of the first such
weight. Not served until they have int8 containers: GLM-5.3-Flash, Ornith-1.5, Sage-A1.5,
Nemotron-3.5-Bolt-74B, Ling-3.0-flash, drama-3 and Anima's FP8 container; Nemotron-3.5-Bolt-E4B,
the Gemma 4 31B DFlash containers and MiniCPM5-2B bf16 serve without their drafter. 1.17.0
serves all of them.

Speed. Chained launches for Qwen3.8-27B, Gemma 4, Gemma 3 and the small bf16 models, a new
Qwen3.8-Flash-Next container (IQR-V4 experts, int8 trunk) with its decode step and prefill
reworked, and a reworked adaptive draft window.

Deployment. deploy/compose has two fleet files, tp1.yaml and tp2.yaml, each with its
configuration beside it, in place of the per-model files. `host-pool-mib` is a model's host pool
in all, split among its ranks. The dashboard is rebuilt: an hour of history kept by the server,
each accelerator's memory by model, model states over time.

Merged since 1.17.0: Nemotron-3.5-Bolt-74B-A9B by keptn42 (#339); GLM-5.3-Flash on four cards by
AnimusNull (#397); chained launches for Flash-Next's decode step (#396) and preempted requests
keeping their prefix and place (#405) by mici81; --prefill-interleave auto by Code000 (#410);
eight more libr3d kernels and the w4a4 reference by RikshaDriver (#403, #407, #408); libr3d
large-BAR and E4M3 decode fixes by neuromanMD (#438, #439); int4/int5 decode tiles by Kezi
(#426); attention for Nanbeige 4.3 33B by everplays (#417); expert_stats_report.py by baKon
(#431). Fixed: #398, #402, #419, #437 (dschmitz's patch); added the metrics of #392, and
multi-model serving as asked for in #367 and #109.

Plugin ABI 39: out-of-tree plugins need to be rebuilt.

Thanks to @keptn42, @AnimusNull, @mici81, @Code000, @RikshaDriver, @neuromanMD, @Kezi, @everplays, @baKon and @dschmitz.
2026-11-14 22:32:28 +01:00

68 lines
3.1 KiB
Bash
Executable File

#!/bin/bash
# docker/llvm-check.sh BUILD -- check the image's HIP compiler on the build's compile command for
# r4d_hc_bf16.hip, a file whose device code is not repeatable under ROCm's stock clang. The command
# is rerun four ways, outputs in a scratch directory:
# 1. pairing off, by ROCm's clang and by the image's: the device code must match byte for byte,
# so the llvm stage's libLLVM is ROCm's apart from the patch;
# 2. pairing on, as the build ran it, twice by the image's clang: both must match the build's own
# object, so pairing is repeatable.
# A mismatch fails the image build.
set -euo pipefail
B=$1
STOCK=/opt/rocm/lib/llvm/bin/clang++
IMAGE=/opt/rocm-repeatable/lib/llvm/bin/clang++
OBJCOPY=/opt/rocm/lib/llvm/bin/llvm-objcopy
O=libr4d/CMakeFiles/libr4d.dir/r4d_hc_bf16.hip.o
fail() { echo "llvm-check: $*" >&2; exit 1; }
T=$(mktemp -d)
trap 'rm -rf "$T"' EXIT
cd "$B"
# A build for one card (`docker/build.sh -t gfx1151`) compiles no libr4d -- that library is
# another family's -- so there is no compile command to rerun and nothing to check: the
# pairing this script verifies lives in device code this build does not contain.
cmds=$(ninja -t commands libr4d 2>/dev/null) || {
echo "llvm-check: this build has no libr4d (its GPU targets are filtered); skipped"
exit 0
}
line=$(grep -m1 -F -- "-o $O " <<< "$cmds") || fail "no compile command for $O"
eval "set -- $line"
args=("$@")
[ "${args[0]}" = "$IMAGE" ] || fail "the build compiled with ${args[0]}, not $IMAGE"
for a in "${args[@]}"; do
case "$a" in *amdgpu-enable-vopd*) fail "the build turned VOPD pairing off ($a)" ;; esac
done
# variant NAME COMPILER [FLAG]: rerun the build's command with COMPILER, object and depfile in the
# scratch directory and FLAG appended; dump the object's device code to NAME.fb.
variant() {
local name=$1 cc=$2 extra=${3:-} i=1
local v=("$cc")
while [ $i -lt ${#args[@]} ]; do
case "${args[$i]}" in
-o) v+=(-o "$T/$name.o"); i=$((i + 2)); continue ;;
-MF) v+=(-MF "$T/$name.d"); i=$((i + 2)); continue ;;
*) v+=("${args[$i]}") ;;
esac
i=$((i + 1))
done
[ -z "$extra" ] || v+=("$extra")
"${v[@]}" > "$T/$name.log" 2>&1 || { cat "$T/$name.log" >&2; return 1; }
"$OBJCOPY" --dump-section=.hip_fatbin="$T/$name.fb" "$T/$name.o" /dev/null
}
OFF=-mllvm=-amdgpu-enable-vopd=false
pids=()
variant stock_off "$STOCK" "$OFF" & pids+=($!)
variant image_off "$IMAGE" "$OFF" & pids+=($!)
variant image_on1 "$IMAGE" & pids+=($!)
variant image_on2 "$IMAGE" & pids+=($!)
for p in "${pids[@]}"; do wait "$p" || fail "a compile of $O failed"; done
"$OBJCOPY" --dump-section=.hip_fatbin="$T/build.fb" "$O" /dev/null
cmp -s "$T/stock_off.fb" "$T/image_off.fb" \
|| fail "with pairing off the image's clang and ROCm's emit different device code: the llvm stage did not rebuild ROCm's libLLVM"
cmp -s "$T/build.fb" "$T/image_on1.fb" && cmp -s "$T/build.fb" "$T/image_on2.fb" \
|| fail "with pairing on, three compiles of $O emitted different device code"
echo "llvm-check: r4d_hc_bf16.hip -- pairing off, ROCm's clang and the image's agree; pairing on, three compiles agree"