blk128x128_stride_ok

Function blk128x128_stride_ok 

Source
pub fn blk128x128_stride_ok(k: usize) -> bool
Expand description

Whether a checkpoint’s row-major [N/128, K/128] weight-scale grid already satisfies the BLK128x128 column-stride rule (“must be a multiple of 4”), i.e. whether L = ceil(K/128) needs no padding to L4.

True for every shape Atlas serves today (K=5120 → L=40, K=17408 → L=136), which is why the weight scales pass through untouched. A K that breaks it would need a padded copy, so the dispatch gate checks this rather than assuming it.