torch_npu.npu_moe_compute_expert_tokens

功能描述

接口原型

npu_moe_compute_expert_tokens(Tensor sorted_expert_for_source_row, int num_expert) -> Tensor

参数说明

输出说明

expertTokens:Device侧的aclTensor,公式中的输出,要求的是一个1D的Tensor,数据类型与sorted_expert_for_source_row保持一致。

约束说明

支持的型号

Atlas A2 训练系列产品/Atlas 800I A2 推理产品

调用示例