From 0cc27b0cac08aec9acff37bd38437556e7ec8a1f Mon Sep 17 00:00:00 2001 From: igneum-labs <337424239+igneum-labs@users.noreply.github.com> Date: Thu, 8 Oct 2026 16:15:49 +0000 Subject: [PATCH] class-v6: the window-text test counts OpenCL's shuffle blocks as statements Co-Authored-By: Claude Fable 5.1 --- igneum-pow/tests/packs.rs | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/igneum-pow/tests/packs.rs b/igneum-pow/tests/packs.rs index 1ef9234f9..9b3aecf48 100644 --- a/igneum-pow/tests/packs.rs +++ b/igneum-pow/tests/packs.rs @@ -1112,13 +1112,12 @@ fn reg64_cpu_verifier_and_cuda_text_agree() { let terms: Vec = (k + 8..64).step_by(8).map(|j| format!("r{j}")).collect(); assert!(text.contains(&format!(" r{k} = r{k} ^ {};\n", terms.join(" ^ "))), "{name}: the fold of r{k}"); } - let per_kernel = if name.ends_with(".metal") { 1 } else { 1 }; - let _ = per_kernel; - let lines: Vec<&str> = text.lines().filter(|l| l.starts_with(" r") && l.contains(" // ")).collect(); + // a statement line opens with its register, or with the shuffle's block in OpenCL ("{ uint t_; ...") + let lines: Vec<&str> = text.lines().filter(|l| (l.starts_with(" r") || l.starts_with(" { uint t_;")) && l.contains(" // ")).collect(); assert!(lines.len() % 128 == 0 && !lines.is_empty(), "{name}: {} statement lines, a multiple of 128", lines.len()); for (k, (line, ins)) in lines.iter().take(128).zip(sched.iter()).enumerate() { let stmt = line.trim_start(); - assert!(stmt.starts_with(&format!("r{} = ", ins.dst)) || stmt.starts_with("{ uint t_;"), "{name} statement {k}: dst r{}: {stmt}", ins.dst); + assert!(stmt.starts_with(&format!("r{} = ", ins.dst)) || (stmt.starts_with("{ uint t_;") && stmt.contains(&format!("r{} = r{} ^ t_", ins.dst, ins.dst))), "{name} statement {k}: dst r{}: {stmt}", ins.dst); } assert_eq!(text.matches("rotl_imm(").count() >= 2 * LOAD_SLOTS, true, "{name}: the era loads"); }