oa::matrix::moe_routing_bias_update
Update an FP32 expert-routing bias from a dense FP32 selection mask. selection_mask is [T, E]; bias may be [E] or [1, E]. Each expert receives -gamma, +gamma, or no update when its observed route count is above, below, or equal to the balanced target T * K / E. The update stays device-resident and mutates bias through its existing value identity. Errors Returns an error unless both matrices are FP32 on the same engine, the mask and bias shapes agree, experts_per_token is in 1..=E, gamma is finite and positive, dimensions fit the shader ABI, or runtime recording fails.
Function Documentation
Update an FP32 expert-routing bias from a dense FP32 selection mask. selection_mask is [T, E]; bias may be [E] or [1, E]. Each expert receives -gamma, +gamma, or no update when its observed route count is above, below, or equal to the balanced target T * K / E. The update stays device-resident and mutates bias through its existing value identity. Errors Returns an error unless both matrices are FP32 on the same engine, the mask and bias shapes agree, experts_per_token is in 1..=E, gamma is finite and positive, dimensions fit the shader ABI, or runtime recording fails.