已合并
PTA适配dispatch\combine性能打点 #3768
lyt_claire创建于 2025年12月11日
PTA适配dispatch\combine性能打点 #3768
已合并
共 2 个文件变更+2-2
| @@ -98,7 +98,7 @@ at::Tensor npu_moe_distribute_combine_v2(const at::Tensor &expand_x, const at::T | |||
| 98 | expert_shard_type, shared_expert_num, shared_expert_rank_num, global_bs_real, out_dtype, comm_quant_mode, group_list_type, | 98 | expert_shard_type, shared_expert_num, shared_expert_rank_num, global_bs_real, out_dtype, comm_quant_mode, group_list_type, |
| 99 | comm_alg_ptr, zero_expert_num, copy_expert_num, const_expert_num, output); | 99 | comm_alg_ptr, zero_expert_num, copy_expert_num, const_expert_num, output); |
| 100 | } else if (check_aclnn_kernel_available("aclnnMoeDistributeCombineV3")) { | 100 | } else if (check_aclnn_kernel_available("aclnnMoeDistributeCombineV3")) { |
| 101 | - TORCH_CHECK(performance_info.has_value(), | 101 | + TORCH_CHECK(!performance_info.has_value(), |
| 102 | "The performance_info is not supported in this CANN version, aclnnMoeDistributeDispatchV4 is not available, please update CANN version.", | 102 | "The performance_info is not supported in this CANN version, aclnnMoeDistributeDispatchV4 is not available, please update CANN version.", |
| 103 | OPS_ERROR(ErrCode::PARAM)); | 103 | OPS_ERROR(ErrCode::PARAM)); |
| 104 | EXEC_NPU_CMD(aclnnMoeDistributeCombineV3, expand_x, expert_ids, assist_info_for_combine, ep_send_counts, expert_scales, tp_send_counts, x_active_mask, | 104 | EXEC_NPU_CMD(aclnnMoeDistributeCombineV3, expand_x, expert_ids, assist_info_for_combine, ep_send_counts, expert_scales, tp_send_counts, x_active_mask, |
| @@ -189,7 +189,7 @@ tensor_list npu_moe_distribute_dispatch_v2(const at::Tensor &x, const at::Tensor | |||
| 189 | dynamic_scales, assist_info_forcombine, expert_token_nums, ep_recv_counts, | 189 | dynamic_scales, assist_info_forcombine, expert_token_nums, ep_recv_counts, |
| 190 | tp_recv_counts, expand_scales); | 190 | tp_recv_counts, expand_scales); |
| 191 | } else if (check_aclnn_kernel_available("aclnnMoeDistributeDispatchV3")) { | 191 | } else if (check_aclnn_kernel_available("aclnnMoeDistributeDispatchV3")) { |
| 192 | - TORCH_CHECK(performance_info.has_value(), | 192 | + TORCH_CHECK(!performance_info.has_value(), |
| 193 | "The performance_info is not supported in this CANN version, aclnnMoeDistributeDispatchV4 is not available, please update CANN version.", | 193 | "The performance_info is not supported in this CANN version, aclnnMoeDistributeDispatchV4 is not available, please update CANN version.", |
| 194 | OPS_ERROR(ErrCode::PARAM)); | 194 | OPS_ERROR(ErrCode::PARAM)); |
| 195 | EXEC_NPU_CMD(aclnnMoeDistributeDispatchV3, x_wrapper, expert_ids, scales_wrapper, x_active_mask, expert_scales, elastic_info, | 195 | EXEC_NPU_CMD(aclnnMoeDistributeDispatchV3, x_wrapper, expert_ids, scales_wrapper, x_active_mask, expert_scales, elastic_info, |