pub fn apply_rotary(
x: &mut [f32],
row_len: usize,
rope_dim: usize,
pos: &[usize],
fc: &[(f32, f32)],
inverse: bool,
)Expand description
apply_rotary_emb on the last rope_dim elements of each row_len-wide row of x, row r
at position pos[r]; adjacent pairs are complex numbers, multiplied in f32, written back bf16.