biondizzle
84655d066a
CUDA graph: Fix MoE bincount and per-call allocations (Hazard #4)
1. Replace torch.bincount with scatter_add_ into pre-allocated buffer
- bincount produces data-dependent shapes → breaks graph capture
- scatter_add_ with pre-allocated _tokens_per_expert_buf (fixed shape)
- Pre-allocated _ones_buf to avoid per-call torch.ones()
2. Replace torch.full for l1_gsa with pre-allocated buffer + fill_
- torch.full allocates every call → breaks graph capture
- Use self._l1_gsa_buf.fill_(l1_gs) instead
2026-06-03 17:37:03 +00:00
..
2026-06-02 19:27:07 +00:00
2026-06-02 19:27:07 +00:00
2026-06-03 17:20:34 +00:00
2026-06-03 15:52:00 +00:00
2026-06-03 17:37:03 +00:00
2026-06-02 19:27:07 +00:00
2026-06-02 19:27:07 +00:00
2026-06-03 16:37:20 +00:00
2026-06-02 19:27:07 +00:00
2026-05-21 17:30:44 +00:00