feat(sp17-3.1): A_var_ema per-branch producer + HEALTH_DIAG emit
Phase 3 of SP17 dueling-Q identifiability — first of three diagnostic
producers landed atomically with kernel + launcher + Rust wrapper +
HEALTH_DIAG emit + GPU oracle test per `feedback_wire_everything_up`.
Per branch d ∈ {dir, mag, ord, urg}:
Var_d = (1/(B × n_d × NA)) Σ_{i, a, z} (A[i, a, z] − mean_a A[*, z])²
Block tree-reduce (no atomicAdd, `feedback_no_atomicadd`); 4 blocks ×
256 threads. Pearl-A first-observation bootstrap (sentinel 0.0 →
REPLACE on first launch); steady-state α = WELFORD_ALPHA_MIN=0.4 per
`pearl_wiener_alpha_floor_for_nonstationary` — the structural-control
floor preserves catch-up bandwidth without storing 24 Welford
accumulator slots for a cold-path-cadence diagnostic.
Cold-path emit: single launch per HEALTH_DIAG cadence (epoch boundary)
right after `v_a_means`. New line:
HEALTH_DIAG[N]: dueling [a_var=(d=X m=Y o=Z u=W)]
The line will be extended with V_share + advantage_clip_bound in
Phase 3.2, then finalised in Phase 3.3.
GPU oracle test on RTX 3050 Ti: synthetic A constructed so each branch
d has a closed-form Var(A_centered); kernel readback matches expected
value within ε=1e-4 (f32 rounding budget for ~8×n×51 accumulator
length).
Plan: docs/superpowers/plans/2026-05-08-sp17-dueling-q-network.md
Phase 3.1.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -925,6 +925,22 @@ fn main() {
|
||||
// the diagnostic baseline for the SP17 Phase 0 kill criterion (V
|
||||
// dominance pre-centering).
|
||||
"v_a_means_diag_kernel.cu",
|
||||
// SP17 Phase 3.1 (2026-05-08): per-branch EMA of the over-actions
|
||||
// variance of `A_centered`. 4 blocks × 256 threads (one block per
|
||||
// branch — dir/mag/ord/urg). Reads the same BRANCH-MAJOR
|
||||
// `on_b_logits_buf` that `compute_expected_q` consumes; computes
|
||||
// per-atom mean of A across actions in the branch; sums squared
|
||||
// deviations from the per-atom mean across (B × n_branch × NA);
|
||||
// writes to ISV[A_VAR_EMA_DIR/MAG/ORD/URG_INDEX] with Pearl-A
|
||||
// first-observation bootstrap (sentinel SENTINEL_A_VAR_EMA=0.0)
|
||||
// + α=WELFORD_ALPHA_MIN=0.4 EMA blend per
|
||||
// `pearl_wiener_alpha_floor_for_nonstationary`. Block tree-reduce
|
||||
// (no atomicAdd) per `feedback_no_atomicadd.md`. Diagnostic
|
||||
// observability — does NOT modify Q-head logits or any consumer
|
||||
// path. Consumed by HEALTH_DIAG `dueling [a_var=...]` line via
|
||||
// `read_a_var_ema_per_branch()` in gpu_dqn_trainer.rs. See
|
||||
// docs/dqn-wire-up-audit.md § "SP17 Phase 3.1" for rationale.
|
||||
"sp17_a_var_ema_kernel.cu",
|
||||
// SP14 Layer C Phase C.1 (2026-05-08): cubin entries for
|
||||
// alpha_grad_compute_kernel.cu, gradient_hack_detect_kernel.cu,
|
||||
// and sp14_scale_wire_col_kernel.cu deleted atomically with
|
||||
|
||||
Reference in New Issue
Block a user