fn
embedding_bag_sum_or_mean
::mlx::core::array embedding_bag_sum_or_mean(const ::mlx::core::array & emb, const ::mlx::core::array & seg, const ::mlx::core::array & valid, const ::mlx::core::array & oh, int B, int D, int n_idx, int mode)Pooled bag sum (mode == 0) or mean (mode == 1) for embedding_bag_forward, accumulated in float32 when emb is a half dtype, then rounded back to emb's dtype once.