Archived
libxe2: the DSpark drafter's ops -- speculative decoding on the B65, greedy-identical
Every op MiniCPM5-2B bf16's DSpark drafter issues now has a libxe2 row, each libref's arithmetic in libref's order: gemm_nt_q over fp8a8 block-scaled codes (quant_dot per output, the scale grids worked out on the host as make_scales does), gemm_nt_q_gated with the gated fp8 epilogue, the w2a8 vocabulary head (gemm_zp; b_scale in libref's joined planes form through a copy of libref's layout hook, so both libraries ask for the same stored bytes, its planes found on the device), quant_act_i8, silu_mul, row_topk and dflash_select. rad-kbench: MiniCPM5-2B 191/191 at rel_l2 0. The fixture found the gated GEMM refusing a 27B geometry its row accepted (it held the whole N-wide row in local memory); it now keeps the n gated values and declares N <= 57344. The engine oracle with speculation on: 1500/1500 issues bit-identical, the w2a8 head included. Greedy with speculation on matches libref's greedy without it on all eight prompts. Install and oot: a SYCL build installs librad_sycl.so and libxe2.so, its executables find the backend through $ORIGIN/../lib, and tests/oot_plugins.sh rebuilds libxe2 out of tree with icpx when RAD_OOT_ICPX is set; it passes in build-sycl. scripts/sycl/bench_report.sh: the report's screenshot is a JPEG, rendered with fonts (this host has none, and the first post had no text). docs/SYCL_PROGRESS.md: the first quick benchmark (4.2 tok/s decode, 17.3 tok/s prefill at 2000 tokens), Milestone B part 1. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018EpFgqQidSnH8zo7boVZC1
This commit is contained in:
1 parent
874f8d28b1
commit
43d84111c2
13 files changed
+1076
-36
No files matched your search
@@ -577,11 +577,16 @@ add_test(NAME oot_plugins
|
||||
COMMAND sh ${CMAKE_CURRENT_SOURCE_DIR}/oot_plugins.sh
|
||||
${CMAKE_BINARY_DIR} ${CMAKE_SOURCE_DIR} ${CMAKE_BINARY_DIR}/oot ${RAD_OOT_HIP})
|
||||
# RESOURCE_LOCK kbench_memory: its replay holds operands in host memory as the kbench entries do.
|
||||
# A SYCL build passes its icpx so libxe2 is rebuilt out of tree too.
|
||||
set(RAD_OOT_ENV "CMAKE_GENERATOR=${CMAKE_GENERATOR}" ${RAD_TEST_OMP_ENV})
|
||||
if(RAD_SYCL_FOUND)
|
||||
list(APPEND RAD_OOT_ENV "RAD_OOT_ICPX=${RAD_ICPX}")
|
||||
endif()
|
||||
set_tests_properties(oot_plugins PROPERTIES
|
||||
LABELS "oot"
|
||||
TIMEOUT 3600
|
||||
RESOURCE_LOCK kbench_memory
|
||||
ENVIRONMENT "CMAKE_GENERATOR=${CMAKE_GENERATOR};${RAD_TEST_OMP_ENV}")
|
||||
ENVIRONMENT "${RAD_OOT_ENV}")
|
||||
|
||||
# ================================================================== the kernel library, as a test
|
||||
#
|
||||
|
||||
+26
-5
@@ -24,6 +24,11 @@
|
||||
# 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.
|
||||
#
|
||||
# The SYCL kernel library (libxe2) is built out of tree when RAD_OOT_ICPX names the icpx it was
|
||||
# built with (a SYCL build's test registration passes it) and takes part in checks 1-3 then;
|
||||
# without it, it is left out of them like libr4d without a HIP compiler. Check 4 never runs it:
|
||||
# it needs an Intel card, which this test must not touch.
|
||||
set -eu
|
||||
B=$1; S=$2; W=$3
|
||||
HIPC=${4:-}; HIPT=${5:-}; VOPD=${6:-OFF}
|
||||
@@ -57,14 +62,24 @@ 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; }
|
||||
ICPX=${RAD_OOT_ICPX:-}
|
||||
sycllibs=""
|
||||
for d in libxe2; do
|
||||
[ -f "$S/$d/CMakeLists.txt" ] && [ -f "$B/radiance_home/kernels/$d.so" ] && sycllibs="$sycllibs $d"
|
||||
done
|
||||
[ -n "$ICPX" ] && dirs="$dirs $sycllibs"
|
||||
is_dev() { case " $devlibs $sycllibs " in *" $1 "*) return 0 ;; esac; return 1; }
|
||||
is_sycl() { case " $sycllibs " in *" $1 "*) return 0 ;; esac; return 1; }
|
||||
|
||||
for d in $dirs; do
|
||||
n=$(basename "$d")
|
||||
say "building $d against the installed package"
|
||||
extra=""
|
||||
is_dev "$n" && extra="-DCMAKE_HIP_COMPILER=$HIPC -DRAD_GPU_TARGETS=$HIPT
|
||||
-DRAD_HIP_VOPD_REPEATABLE=$VOPD"
|
||||
if is_sycl "$n"; then
|
||||
extra="-DCMAKE_CXX_COMPILER=$ICPX"
|
||||
elif is_dev "$n"; then
|
||||
extra="-DCMAKE_HIP_COMPILER=$HIPC -DRAD_GPU_TARGETS=$HIPT -DRAD_HIP_VOPD_REPEATABLE=$VOPD"
|
||||
fi
|
||||
# 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
|
||||
@@ -82,6 +97,9 @@ want=$(sets "$B/radiance_home")
|
||||
if [ -z "$HIPC" ]; then
|
||||
for d in $devlibs; do want=$(printf '%s\n' "$want" | grep -v "^kernels/$d\.so\$" || true); done
|
||||
fi
|
||||
if [ -z "$ICPX" ]; then
|
||||
for d in $sycllibs; 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"
|
||||
@@ -102,13 +120,16 @@ say "2. same schemas"
|
||||
# 3. The same registration, from each home alone. No card: the test must not depend on one, and
|
||||
# must not touch one a server is using.
|
||||
listing() {
|
||||
HIP_VISIBLE_DEVICES=-1 "$P/bin/rad-info" --plugins --home "$1" 2>/dev/null |
|
||||
HIP_VISIBLE_DEVICES=-1 ONEAPI_DEVICE_SELECTOR="!level_zero:*" "$P/bin/rad-info" --plugins --home "$1" 2>/dev/null |
|
||||
grep -v '^plugins on' | grep -v '^ /'
|
||||
}
|
||||
tree_list=$(listing "$B/radiance_home")
|
||||
if [ -z "$HIPC" ]; then
|
||||
for d in $devlibs; do tree_list=$(printf '%s\n' "$tree_list" | grep -v " $d " || true); done
|
||||
fi
|
||||
if [ -z "$ICPX" ]; then
|
||||
for d in $sycllibs; do tree_list=$(printf '%s\n' "$tree_list" | grep -v " $d " || true); done
|
||||
fi
|
||||
oot_list=$(listing "$H")
|
||||
# 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.
|
||||
@@ -129,7 +150,7 @@ for so in "$H"/kernels/*.so; do
|
||||
is_dev "$(basename "$so" .so)" || ln -s "$so" "$HH/kernels/"
|
||||
done
|
||||
# A fixed --max-bytes, so which cases run does not depend on the memory free at the start.
|
||||
run "$W/logs/kbench.log" env HIP_VISIBLE_DEVICES=-1 RADIANCE_HOME="$HH" \
|
||||
run "$W/logs/kbench.log" env HIP_VISIBLE_DEVICES=-1 ONEAPI_DEVICE_SELECTOR="!level_zero:*" RADIANCE_HOME="$HH" \
|
||||
"$P/bin/rad-kbench" --fixture "$P/share/radiance/kernels.rkb" --max-cases 1 \
|
||||
--max-bytes 2048 --op rmsnorm --op quant_act_fp8 --op silu_mul
|
||||
grep -E "passed|failed" "$W/logs/kbench.log" | tail -3
|
||||
|
||||
Reference in new issue
Block a user