oa::ml::matrix::moe_combine

Combine expert-major packed rows into token-major output using route gates. packed is F32 [T*K, D], route_gate is F32 [T, K], and the U32 maps come from crate::matrix::moe_expert_plan. Errors Returns an error for incompatible shapes, dtypes, engine ownership, shader ABI overflow, allocation failure, or runtime recording failure.

FnRust public API

Function Documentation

pub fn moe_combine( packed: &Matrix, route_gate: &Matrix, inverse: &Matrix, packed_slot: &Matrix ) -> Result<Matrix>
Combine expert-major packed rows into token-major output using route gates. packed is F32 [T*K, D], route_gate is F32 [T, K], and the U32 maps come from crate::matrix::moe_expert_plan. Errors Returns an error for incompatible shapes, dtypes, engine ownership, shader ABI overflow, allocation failure, or runtime recording failure.