Skip to content

Qwen3.8-Flash-Next on any consumer hardware: one-click install for Windows / Linux. Strata inference engine, OpenAI/Anthropic API on localhost, optional image input.

C++

qsa_prompt_attn_parity: print a hash of the new kernel output bits

Niko1221609ce5a6452b
diff --git a/src/kernels/qsa_prompt_attn_parity.cpp b/src/kernels/qsa_prompt_attn_parity.cpp
index 8a2365299..e1edc38b9 100644
--- a/src/kernels/qsa_prompt_attn_parity.cpp
+++ b/src/kernels/qsa_prompt_attn_parity.cpp
@@ -182,6 +182,11 @@ int run(int fmt, int64_t ctx, int64_t nq, int reps) { // fmt 1 int8, 0 fp16
std::vector<float> o((size_t) (nq * NH * HD)), nw(o.size());
ck(cudaMemcpy(o.data(), d_old, o.size() * 4, cudaMemcpyDeviceToHost), "down");
ck(cudaMemcpy(nw.data(), d_new, nw.size() * 4, cudaMemcpyDeviceToHost), "down");
+ { // a hash of the new kernel's output bits (bitwise A/B of two builds / switches)
+ uint64_t hh = 1469598103934665603ull;
+ for (float x : nw) { uint32_t u; std::memcpy(&u, &x, 4); hh = (hh ^ u) * 1099511628211ull; }
+ std::printf("NEWHASH %016llx\n", (unsigned long long) hh);
+ }
// 1. FP64 reference on a sample of queries
double err_old = 0, err_new = 0, ref_scale = 0;
for (int64_t i = 0; i < nq; i += std::max<int64_t>(1, nq / 16)) {