Closed
【cleancode】matmulallreduce cleancode整改 #8636
Simple_Bright&ManAdd on 4 days agoClosed at 3 days ago
4 days ago Associated pull request
周云飞
4 days ago Comments:
4 days ago Comments:
这些告警可以作为 MatmulAllReduce 代码可读性和维护性的优化线索,但函数行数或圈复杂度较高本身不代表功能错误。
可以考虑分别梳理 arch22 的量化处理函数和 arch31 的 matmul_all_reduce,按职责拆分较长的处理流程,并评估拆分对分支行为、计算结果和性能的影响;也可以保留有必要的复杂分支,避免为降低指标而增加理解成本。具体拆分范围仍需结合相关实现确认。


4 days ago Assign SimpleBright_Man as responsible person
3 days ago Modify description of issue
3 days ago Associated pull request
3 days ago Close issue
3 days ago Added label: resolved
文件 告警函数(行数 / 圈复杂度)
op_kernel/arch22/matmul_all_reduce.cpp quant_matmul_allreduce(81 行 / CC 49)、weight_quant_matmul_allreduce(58 行 / CC 64)
op_kernel/arch22/matmul_all_reduce_dequant_perchannel.h Process(87 行)、MatmulAllReduceDequantPerchannelCommInt8(81 行)
op_kernel/arch22/matmul_all_reduce_quant_perchannel.h Process(78 行)、MatmulAllReduceQuantPerchannelCommInt8(81 行)
op_kernel/arch22/matmul_all_reduce_quant_pertoken_comm_int8_arch22.h InnerProcess(51 行)
op_kernel/arch22/matmul_all_reduce_quant_reduce_sum.h Process(80 行)、MatmulAllReduceReduceSumInt8(54 行)
op_kernel/arch31/matmul_all_reduce.cpp matmul_all_reduce(230 行 / CC 145)
mc2/all_gather_matmul、mc2/all_gather_matmul_v2 略