From d8bf6efad2074922aec75aa9d092e796cfbdb721 Mon Sep 17 00:00:00 2001 From: admin Date: Thu, 3 Sep 2026 08:10:36 +0000 Subject: [PATCH] Add BMM_Theory: examples/result_evaluate.csv --- BMM/BMM_Theory/examples/result_evaluate.csv | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 BMM/BMM_Theory/examples/result_evaluate.csv diff --git a/BMM/BMM_Theory/examples/result_evaluate.csv b/BMM/BMM_Theory/examples/result_evaluate.csv new file mode 100644 index 0000000..11ad9dd --- /dev/null +++ b/BMM/BMM_Theory/examples/result_evaluate.csv @@ -0,0 +1,10 @@ +case_id,batch_a,batch_b,m,n,k,dtype_a,dtype_b,dtype_c,trans_a,trans_b,has_bias,out_nd,deterministic_level,plan_case_id,plan_branch,plan_npu,plan_op,plan_used_core_num,plan_split_b,plan_m_cnt,plan_n_cnt,plan_grid_k,plan_core_map,plan_b_core,plan_merge_b0,plan_single_core_m,plan_single_core_n,plan_single_core_k,plan_k_l1,plan_b_l1,plan_l1_form,plan_base_m,plan_base_n,plan_base_k,plan_l2_policy_in,plan_l2_policy_out,plan_swizzle_w,plan_workspace_bytes,plan_tail_strategy,plan_fixpipe_unitflag,plan_out_dtype_bytes,plan_note,gm_read_bytes,l2_read_bytes,t_mte2_gm,t_mte2_l2,t_mte2,dma_cmd_count,t_dma_cmd,cube_flops,t_mmad,fixpipe_bytes,t_fixpipe,t_reduce,t_steady,t_drain,t_total,bottleneck,feasible,violations,bound_type,advice +merge_demo_1,128,128,64,64,512,bf16,bf16,bf16,False,False,False,True,0,merge_demo_1,IterBatch,Ascend950PR,batch_mat_mul_v3,32,32,1,1,1,切B轮转分配(核间零重复读零依赖),4,1,64,64,512,512,2,b_双batch乒乓,64,64,256,allocate(GM->L1随路驻留L2),"direct_gm(输出仅写一次,直写GM不占L2)",0,0,不涉及(核内不切M/N),True,2,双batch乒乓: 2*(MK+KN)*dtype=256KB <= L1,524288,0.0,1.048576e-05,0.0,1.0685759999999999e-05,4,2.0000000000000002e-07,16777216.0,1.104672658436214e-06,32768,6.5536e-07,0.0,1.0685759999999999e-05,4.400081646090535e-07,1.1125768164609053e-05,MTE2_GM,True,,访存Bound(GM),"瓶颈在 GM 搬入: 可考虑增大 tile 提升 dValue/单核搬移量, 或利用 L2 驻留吸收重复读 (MergeBatch/ASW swizzle 方向)" +iter_demo_1,128,128,64,64,256,bf16,bf16,bf16,False,False,False,True,0,iter_demo_1,IterBatch,Ascend950PR,batch_mat_mul_v3,32,32,1,1,1,切B轮转分配(核间零重复读零依赖),4,1,64,64,256,256,2,b_双batch乒乓,64,64,256,allocate(GM->L1随路驻留L2),"direct_gm(输出仅写一次,直写GM不占L2)",0,0,不涉及(核内不切M/N),True,2,双batch乒乓: 2*(MK+KN)*dtype=128KB <= L1,262144,0.0,5.24288e-06,0.0,5.4428799999999995e-06,4,2.0000000000000002e-07,8388608.0,5.52336329218107e-07,32768,6.5536e-07,0.0,5.4428799999999995e-06,3.0192408230452674e-07,5.744804082304526e-06,MTE2_GM,True,,访存Bound(GM),"瓶颈在 GM 搬入: 可考虑增大 tile 提升 dValue/单核搬移量, 或利用 L2 驻留吸收重复读 (MergeBatch/ASW swizzle 方向)" +iter_demo_2,512,512,128,128,128,bf16,bf16,bf16,False,False,False,True,0,iter_demo_2,IterBatch,Ascend950PR,batch_mat_mul_v3,32,32,1,1,1,切B轮转分配(核间零重复读零依赖),16,1,128,128,128,128,2,b_双batch乒乓,128,128,128,allocate(GM->L1随路驻留L2),"direct_gm(输出仅写一次,直写GM不占L2)",0,0,不涉及(核内不切M/N),True,2,双batch乒乓: 2*(MK+KN)*dtype=128KB <= L1,1048576,0.0,2.097152e-05,0.0,2.1771519999999998e-05,16,8.000000000000001e-07,67108864.0,4.418690633744856e-06,524288,1.048576e-05,0.0,2.1771519999999998e-05,9.315281646090535e-07,2.270304816460905e-05,MTE2_GM,True,,访存Bound(GM),"瓶颈在 GM 搬入: 可考虑增大 tile 提升 dValue/单核搬移量, 或利用 L2 驻留吸收重复读 (MergeBatch/ASW swizzle 方向)" +iter_demo_3,2048,2048,1024,1024,512,bf16,bf16,bf16,False,False,False,True,0,iter_demo_3,IterBatch,Ascend950PR,batch_mat_mul_v3,32,32,1,1,1,切B轮转分配(核间零重复读零依赖),64,1,1024,1024,512,64,1,d_两侧都切K,32,1024,16,allocate(GM->L1随路驻留L2),"direct_gm(输出仅写一次,直写GM不占L2)",0,0,不涉及(核内不切M/N),True,2,"两侧都切K: k_L1=64, K段成对流水, batch边界天然无缝",134217728,0.0,0.00268435456,0.0,0.00270995456,512,2.5600000000000002e-05,68719476736.0,0.004524739208954733,134217728,0.00268435456,0.0,0.004524739208954733,5.078042126748971e-05,0.004575519630222223,MMAD,True,,计算Bound,"瓶颈在 Cube 计算: 已接近理论算力上限, 检查是否有冗余计算 (MergeBatch 交叉项) 可消除" +iter_demo_4,64,64,64,64,8192,bf16,bf16,bf16,False,False,False,True,0,iter_demo_4,IterBatch,Ascend950PR,batch_mat_mul_v3,32,32,1,1,1,切B轮转分配(核间零重复读零依赖),2,1,64,64,8192,1024,1,d_两侧都切K,64,64,256,allocate(GM->L1随路驻留L2),"direct_gm(输出仅写一次,直写GM不占L2)",0,0,不涉及(核内不切M/N),True,2,"两侧都切K: k_L1=1024, K段成对流水, batch边界天然无缝",4194304,0.0,8.388608e-05,0.0,8.468608e-05,16,8.000000000000001e-07,134217728.0,8.837381267489712e-06,16384,3.2768e-07,0.0,8.468608e-05,7.16176329218107e-07,8.540225632921811e-05,MTE2_GM,True,,访存Bound(GM),"瓶颈在 GM 搬入: 可考虑增大 tile 提升 dValue/单核搬移量, 或利用 L2 驻留吸收重复读 (MergeBatch/ASW swizzle 方向)" +fp16_out_demo,128,128,64,64,512,bf16,bf16,fp16,False,False,False,True,0,fp16_out_demo,IterBatch,Ascend950PR,batch_mat_mul_v3,32,32,1,1,1,切B轮转分配(核间零重复读零依赖),4,1,64,64,512,512,2,b_双batch乒乓,64,64,256,allocate(GM->L1随路驻留L2),"direct_gm(输出仅写一次,直写GM不占L2)",0,0,不涉及(核内不切M/N),True,2,双batch乒乓: 2*(MK+KN)*dtype=256KB <= L1,524288,0.0,1.048576e-05,0.0,1.0685759999999999e-05,4,2.0000000000000002e-07,16777216.0,1.104672658436214e-06,32768,6.5536e-07,0.0,1.0685759999999999e-05,4.400081646090535e-07,1.1125768164609053e-05,MTE2_GM,True,,访存Bound(GM),"瓶颈在 GM 搬入: 可考虑增大 tile 提升 dValue/单核搬移量, 或利用 L2 驻留吸收重复读 (MergeBatch/ASW swizzle 方向)" +to_matmul_demo,1,1,2048,2048,2048,bf16,bf16,bf16,False,False,False,True,0,to_matmul_demo,转Matmul,Ascend950PR,batch_mat_mul_v3,32,1,1,1,1,,0,1,0,0,0,0,1,,0,0,0,,,0,0,,True,2,"BatchA=1或BatchB=1, 折叠转普通Matmul (该分支详实现待后续迭代)",0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,,False,"dValue=0B < 下限 128B, 搬移带宽利用率崩塌",,"分支 '转Matmul' 的评估模型待后续迭代; 当前支持: ['IterBatch', 'MergeBatch']" +special_k1,128,128,256,256,1,bf16,bf16,bf16,False,False,False,True,0,special_k1,特殊分支,Ascend950PR,batch_mat_mul_v3,32,1,1,1,1,,0,1,0,0,0,0,1,,0,0,0,,,0,0,,True,2,"K=1, Cube 无用, 走 AIV 向量通路 (该分支详实现待后续迭代)",0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,,False,"dValue=0B < 下限 128B, 搬移带宽利用率崩塌",,"分支 '特殊分支' 的评估模型待后续迭代; 当前支持: ['IterBatch', 'MergeBatch']" +asw_fallback_demo,32,32,4096,4096,4096,bf16,bf16,bf16,False,False,False,True,0,asw_fallback_demo,ASW_Basic,Ascend950PR,batch_mat_mul_v3,32,1,1,1,1,,0,1,0,0,0,0,1,,0,0,0,,,0,0,,True,2,"IterBatch/MergeBatch 进入条件均不满足 (如负载均衡/搬移效率不达标), 回落 ASW_Basic (该分支详实现待后续迭代); IterBatch未过: 3_L1驻留形态(四选一, 核心要求: 单batch核内零重复读); MergeBatch未过: 1_batch关系与每核份额: BatchA==BatchB 且 b_core=B/C>=2*b0; 2_L0C容量: 2*(b0*M)*(b0*N)*4B <= L0C; 5_访存Bound: 2MN/(M+N) < R16/b0",0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,,False,"dValue=0B < 下限 128B, 搬移带宽利用率崩塌",,"分支 'ASW_Basic' 的评估模型待后续迭代; 当前支持: ['IterBatch', 'MergeBatch']"