Files
foxhunt/crates
jgrusewski 01204d471b feat: rewrite IQN head to batched cuBLAS GEMMs
Replace per-sample forward_loss_kernel, backward_kernel, and
weight_grad_reduce_kernel with batched cublasLtMatmul (TF32 FAST_TF32).
Forward/backward matmuls use pre-cached IqnGemmDesc descriptors
(same pattern as CachedGemmDesc in batched_forward/backward).

Element-wise ops (ReLU, sigmoid-hadamard, quantile Huber loss, bias
add/reduce, h_s2 tiling, d_h_s2 reduction) use cubin kernels.

- Constructor: new(stream, config) -> new(shared_handle, config)
- 13 GEMM descriptors: 1 embed fwd, 4 branch fwd, 1 embed dW,
  4 branch dW, 4 branch dX (backward accumulates with beta=1.0)
- 10 new cubin kernels: relu_fwd/bwd, hadamard_sigmoid/bwd,
  quantile_huber_loss, bias_add/grad_reduce, h_s2_tile,
  d_h_s2_reduce, cos_tile
- Zero atomicAdd, fully deterministic, CUDA Graph compatible

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-18 00:12:07 +02:00
..