diff --git a/docs/superpowers/audit/2026-04-18-cufunction-sharing-audit.md b/docs/superpowers/audit/2026-04-18-cufunction-sharing-audit.md new file mode 100644 index 000000000..9ed3f2f58 --- /dev/null +++ b/docs/superpowers/audit/2026-04-18-cufunction-sharing-audit.md @@ -0,0 +1,30 @@ +# CUfunction Sharing Audit (2026-04-18) + +## Summary +- 104 CUfunction fields total +- **21 active conflicts** (same CUfunction in graphed child + ungraphed op) +- 3 disabled but latent conflicts +- 4 already mitigated (separate CUmodule) +- ~64 no conflict +- ~12 dead fields + +## Critical Conflicts + +### Vaccine (15+ kernels): uses forward_child CUfunctions ungraphed +c51_loss_kernel, c51_loss_reduce_kernel, c51_grad_kernel, mse_loss_kernel, +mse_grad_kernel, fill_gamma_buf_kernel, scale_f32_kernel, saxpy_f32_kernel, +curiosity_prepare_input_func, curiosity_bias_leaky_relu_func, curiosity_bias_mse_func, +bn_tanh_concat_kernel, stochastic_depth_kernel, bn_tanh_backward_kernel, +strided_accumulate_kernel + +### Causal intervention: uses CublasForward cloned kernels ungraphed +vsn_kernel, kan_gate_combine_kernel, strided_scatter_kernel (clones from forward_child) + +### Cross-child sharing +saxpy_f32_kernel: forward_child + aux_child + adam_grad_child (3-way) +strided_accumulate_kernel: forward_child + aux_child + +### Eval path +expected_q_kernel: aux_child + ungraphed (reduce_current_q_stats) + +## Fix: Move ALL into child graphs → zero ungraphed kernel launches