shard_gdn_value_vector

Function shard_gdn_value_vector 

Source
pub fn shard_gdn_value_vector(
    src: DevicePtr,
    dims: &TpGdnDims,
    unit: usize,
    elem_bytes: usize,
    gpu: &dyn GpuBackend,
) -> Result<(DevicePtr, usize)>
Expand description

2026-09-25: Shard a per-value-head 1D vector on the value-head axis: [full_nv * unit] → [local_nv * unit], where unit is the number of elements per value head and elem_bytes their size. The loaders call it for a_log / dt_bias (unit = 1, elem_bytes = 4). Returns (ptr, local_len_elems).