SIGN IN SIGN UP

glm5-next: give dead indexer slots unique scatter rows (#29745)

The sparse indexer mask is built with a set_rows scatter. Padded pools,
absent sequences and missing tail cells all pointed to the same n_kv
sentinel row, and invisible pools picked by top_k to fill the selection
overlap the tail cells of the token, so several CPU threads wrote the
same element (ThreadSanitizer data race in the sanitize CI).

Allocate the slot mask for both selection paths and route every dead
slot to its own dump row n_kv + slot. Live slots address disjoint cells,
so the scatter indices of a token are unique.
P
Pascal committed
05af0d2b1398394cfa67e1918fee7feabccaa9bc
Parent: 2149c00
Committed by GitHub <noreply@github.com> on 9/30/2026, 3:10:48 PM