rail_for_tensor

Function rail_for_tensor 

Source
pub fn rail_for_tensor(tensor_index: usize, n_rails: usize) -> usize
Expand description

Rail selection for a tensor under dual-rail striping: tensor N is served over rail N % n_rails. Factored out (un-gated) so the striping is unit- testable off the RDMA path — the client’s read loop calls this so the tested logic and the shipped logic are the same. n_rails is clamped to >= 1.