Files
foxhunt/crates
jgrusewski 51dd200e39 fix(bf16): state_dim pad128 for CUTLASS K-tile alignment + compile fix
State padding:
- pad128() helper for CUTLASS 128-element K-tile alignment
- pad_states_kernel: scatter-copy contiguous states to padded [B, pad128(SD)] layout
- states_buf, next_states_buf: allocated with pad128(state_dim) stride
- gemmex_bf16_ldb: layer 1 GemmEx uses ldb=pad128(state_dim) for B-matrix
- forward_online_raw, forward_target_raw: use padded ldb for first layer
- compute_q_stats: padded states buffer uses pad128(state_dim)
- state_dim_padded field on CublasForward

Compile fix:
- compile_training_kernels return type: 13 → 14 CudaFunction (pad_states_kernel)

Compute-sanitizer: 1684 → 1137 errors (33% reduction).
Remaining reads: bias vectors adjacent to weight matrices — harmless.

895/895 unit + 9/9 smoke tests pass.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-29 00:01:04 +01:00
..