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

62 lines
2.7 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"
cmds=$(ninja -t commands libr4d)
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"