KernelBench cuda · H100
Grid + MinGRU SPS Gemini 3.8 Flash (High)
Isolated sequential regrade 0.3645 (in-run 0.3655). Real CUDA, read end to end: kernels.cu (450 lines, md5 20cbd4f73af8cb89fb26a9c9b024055b) built -O3 -arch=sm_90 supplies five __global__ kernels — rollout init, obs+encoder, the MinGRU epilogue for layers 0/1, a fused layer-2 epilogue + actor head + argmax + move + hit, and an any-hit-gated LCG respawn + next-step encoder — with torch.mm for the three 256x768 gate GEMMs, the whole horizon captured in one CUDA graph and cached per shape. There is NO branch on num_envs or horizon in either file: the only conditionals are bounds guards, the per-step is_last_step / encode_next booleans, and the data-dependent hit flags, so check.py's run(128, 8) and all four graded shapes execute identical code and identical numerics. Env fidelity is structurally exact, not probabilistic: the respawn kernel advances every env's LCG twice only when d_any_hit is set for that step and writes food only for hit envs, reproducing reference.env_step's `if hit.any()` gating, where grok-4.5 and this model's own RTX cell both take the unconditional-advance shortcut. LCG constant, mask, modulo, seeding (e + seed*10007), move/clamp/hit ordering, gate split order, argmax tie-breaking and the last-step logits-before-move / positions-after-move ordering all match reference.py. No caching, no data_ptr or seed fingerprinting, no stale-graph replay: init_rollout re-zeroes state, rewards and d_any_hit and re-seeds the rng every call. Work skipped is the discarded value head (~0.13% of GEMM flops) and the unmaterialized state output, both shape-independent. The one precision manipulation is torch.backends.cuda.matmul.allow_tf32 set True on entry to run() and restored in a finally, so the gate GEMMs are TF32 for checked and graded calls alike while policy_forward stays exact fp32 at the ambient default (False on this build); inside the kernels the only other deviations are __expf in the two sigmoids and fp32 reassociation in the encoder and the shuffle-reduced actor head — no --use_fast_math, no tanh.approx, no __fdividef, unlike the RTX cell. That TF32-in-run / fp32-in-policy_forward shape is the grok-4.5 0.5237 shape, and stricter than the clean qwen3.8-max 0.2848 cell, which pins the same flag at import scope and never restores it. There is no import-time mutation and benchmark.py's eager_ref floor runs after the restore, so this is not the deepseek-v4-pro baseline-slowing hack. The agent measured at transcript 104 that TF32 breaks the policy_forward small_obs_state stress case (max_rel_diff 33.87 at atol 1e-6), took a real check.py FAIL on it at transcript 238, and fixed it by narrowing the flag to run(); its only position-equality evidence for TF32 is at 128x8 across 50 seeds (transcript 119), never at a graded shape. Note also that solution.policy_forward and solution.env_step are verbatim pure-torch reimplementations of the reference (legal — PROMPT.txt invites them and the import ban is respected), so check.py's 1e-6 numeric_stress gate has zero coverage of the CUDA kernels; the only check coverage of graded code is run(128, 8) at positions-exact / logits-1e-3. Strict-oracle probe at every benchmark shape (4096x32, 16384x32, 65536x16, 8192x64) with seeds 42 and 123: positions exactly equal for every env, 0 diverged out of 188,416 total, rewards equal, last_logits max abs diff 7.413e-07 to 7.730e-07 against a 1e-3 tolerance, cos(logits)=1.00000 on all eight lines, ALL_POSITIONS_EQUAL. cos(state)=nan is the missing 'state' key, not a numeric failure. Same-buffer weight overwrite between two run() calls on one Model: pos_ok=True cos(logits)=1.00000, so the cached graph tracks new weights rather than replaying stale ones. The graded path is fp32-exact against the reference at the graded shapes, so the precision split does not move the score. Transcript: only its own run id, no reads under outputs/runs, no annotation, leaderboard or DEVLOG reads; four outside-workspace reads of bench config (src/eval listing, SPEC.md, roster.yaml, AGENTS.md), none of which carry per-model results. Eight search_web queries including the literal "04_grid_mingru_sps" and two fetches of the craftax.cu README; the agy stream records no search results, so that channel is unverifiable from the trace, but the site publishes no .cu sidecars, no published cuda04 solution shares this structure or this exact RNG gating, and the RTX sibling was published after this run ended. template_mutated=false verified by byte-identical diff of all seven template_files against the live deck.
20260902_231916_agy_gemini-3.8-flash-high_04_grid_mingru_sps