Archived
libxe2: strided cast and libref's sigmoid -- MiniCPM5-2B serves on the B65, greedy-identical
Serving MiniCPM5-2B bf16 on the Arc Pro B65 found two things rad-kbench's dense operands did not: - cast is handed the q slice of the fused qkv row (2048 of every 2560 elements) and refused it, stopping the first step by name. It now walks any strides in libref's offlin order. - gated_quant_fp8 took sigmoid with an f32 exp, within rad-kbench's tolerance but not libref's double exp: now and then an ulp in silu moved the bf16 narrowing and one E4M3 code, in some of the 42 layers, enough to flip a greedy near-tie tokens later. The engine's own op oracle (RADIANCE_OP_ORACLE='*', which runs libref on the operands the device kernel was handed) found it: 9 of 600 issues before, 600 of 600 bit-identical after, over a 26-token prefill. With both, a greedy run on the B65 matches a libref-only host server token for token on all eight prompts of scripts/sycl/greedy_compare.py (64 tokens each), and the top-5 logprobs agree exactly over 96 decode steps. /v1/chat/completions answers coherently, reasoning split out. 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
d0e797844e
commit
8db5b6efff
5 files changed
+120
-11
No files matched your search
+5
-3
@@ -29,9 +29,11 @@ namespace {
|
||||
|
||||
constexpr size_t kWg = 256; /* work-items a row */
|
||||
|
||||
/* sigmoid as libref's act_sigmoid, in f32 (libref computes exp in double and rounds once; the
|
||||
* device's f32 exp is within an ulp, inside the tolerance). */
|
||||
inline float sigmoidf(float x) { return 1.0f / (1.0f + sycl::exp(-x)); }
|
||||
/* sigmoid exactly as libref's act_sigmoid: exp in double, rounded once to f32 (ref_exp). An f32
|
||||
* exp is within an ulp, inside rad-kbench's tolerance, but an ulp in silu now and then moves the
|
||||
* bf16 narrowing and then an E4M3 code; the engine-level oracle (RADIANCE_OP_ORACLE) caught one
|
||||
* such code in some of MiniCPM5-2B's 42 layers, enough to flip a greedy near-tie later. */
|
||||
inline float sigmoidf(float x) { return 1.0f / (1.0f + (float)sycl::exp((double)-x)); }
|
||||
|
||||
/* The sum of src(i)^2 over i < n in ascending order, f32, as libref sums it, computed by work-item
|
||||
* 0 and returned to every work-item of the group. */
|
||||
|
||||
Reference in new issue
Block a user