oa::ml::matrix::moe_gather
Pack token rows into stable expert-major route order. input is F32 [T, D]; packed_token and inverse are the U32 [T*K] maps produced by crate::matrix::moe_expert_plan. inverse is retained for the deterministic reverse pass and is not read by the forward kernel. Errors Returns an error for incompatible shapes, dtypes, engine ownership, shader ABI overflow, allocation failure, or runtime recording failure.
Function Documentation
Pack token rows into stable expert-major route order. input is F32 [T, D]; packed_token and inverse are the U32 [T*K] maps produced by crate::matrix::moe_expert_plan. inverse is retained for the deterministic reverse pass and is not read by the forward kernel. Errors Returns an error for incompatible shapes, dtypes, engine ownership, shader ABI overflow, allocation failure, or runtime recording failure.