Update BMM_Theory: examples/result_evaluate.csv

This commit is contained in:
2026-09-03 12:44:18 +00:00
parent c9edf8d6b0
commit 2d9d9f3116

View File

@@ -1,11 +1,11 @@
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_tail_m_cnt,plan_tail_n_cnt,plan_tail_k_cnt,plan_tail_m_main,plan_tail_n_main,plan_tail_block_cnt,plan_tail_wave_num,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 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_tail_m_cnt,plan_tail_n_cnt,plan_tail_k_cnt,plan_tail_m_main,plan_tail_n_main,plan_tail_block_cnt,plan_tail_wave_num,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
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,0,0,1,"折叠为 Matmul [2048,2048]x[2048,2048], 复用 Matmul 切分体系",0,1,0,0,2048,0,1,,0,0,0,,,0,0,转Matmul后由 Matmul 体系决定,1,1,1,0,0,0,0,True,2,"BatchB=1免费折叠: 左矩阵 [1,2048,2048] 视图折叠为 [2048,2048], 零重排零 split",16777216,0.0,1.048576e-05,0.0,1.048576e-05,0.0,0.0,17179869184.0,3.534952506995885e-05,8388608,5.24288e-06,0.0,3.534952506995885e-05,0.0,3.534952506995885e-05,MMAD,True,,计算Bound,"瓶颈在 Cube 计算: 已接近理论算力上限, 检查是否有冗余计算 (MergeBatch 交叉项) 可消除" 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,0,0,1,"折叠为 Matmul [2048,2048]x[2048,2048], 复用 Matmul 切分体系",0,1,0,0,2048,0,1,,0,0,0,,,0,0,转Matmul后由 Matmul 体系决定,1,1,1,0,0,0,0,True,2,"BatchB=1免费折叠: 左矩阵 [1,2048,2048] 视图折叠为 [2048,2048], 零重排零 split",16777216,0.0,1.048576e-05,0.0,1.048576e-05,0.0,0.0,17179869184.0,3.534952506995885e-05,8388608,5.24288e-06,0.0,3.534952506995885e-05,0.0,3.534952506995885e-05,MMAD,True,,计算Bound,"瓶颈在 Cube 计算: 已接近理论算力上限, 检查是否有冗余计算 (MergeBatch 交叉项) 可消除"
special_k0_demo,128,128,256,256,0,bf16,bf16,bf16,False,False,False,True,0,special_k0_demo,特殊分支,Ascend950PR,batch_mat_mul_v3,64,1,1,1,1,AIV 核间按行均分 (无 Cube tile 概念),0,1,0,0,0,0,1,UB驻留(AIV),0,0,0,allocate,direct_gm,0,0,不涉及(AIV逐元素),1,1,1,0,0,0,0,False,2,"K=0纯写值: 无任何计算, C=bias 或 0, 纯 AIV 写值; 按行均分到 AIV 核",0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,16777216,1.048576e-05,0.0,1.048576e-05,0.0,1.048576e-05,FIXPIPE,True,,写出Bound,"瓶颈在 Fixpipe 写出: 检查输出 dtype (fp16/fp8 可减半写出量), 或评估输出驻留 L2 异步回写策略" special_k0_demo,128,128,256,256,0,bf16,bf16,bf16,False,False,False,True,0,special_k0_demo,特殊分支,Ascend950PR,batch_mat_mul_v3,64,1,1,1,1,AIV 核间按行均分 (无 Cube tile 概念),0,1,0,0,0,0,1,UB驻留(AIV),0,0,0,allocate,direct_gm,0,0,不涉及(AIV逐元素),1,1,1,0,0,0,0,False,2,"K=0纯写值: 无任何计算, C=bias 或 0, 纯 AIV 写值; 按行均分到 AIV 核",0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,16777216,1.048576e-05,0.0,1.048576e-05,0.0,1.048576e-05,FIXPIPE,True,,写出Bound,"瓶颈在 Fixpipe 写出: 检查输出 dtype (fp16/fp8 可减半写出量), 或评估输出驻留 L2 异步回写策略"
special_k1_demo,128,128,256,256,1,bf16,bf16,bf16,False,False,False,True,0,special_k1_demo,特殊分支,Ascend950PR,batch_mat_mul_v3,64,1,1,1,1,AIV 核间按行均分 (无 Cube tile 概念),0,1,0,0,1,0,1,UB驻留(AIV) UB乒乓,0,0,0,allocate,direct_gm,0,0,不涉及(AIV逐元素),1,1,1,0,0,0,0,False,2,"K=1逐元素乘: 退化为 C=A⊙B 无累加深度, Cube 16x16x16 粒度浪费 15/16; 走 AIV 通路 GM->UB->Mul->GM, UB乒乓 (B>=2*AIV 双batch乒乓流水)",131072,0.0,8.192e-08,0.0,8.192e-08,0.0,0.0,8388608.0,6.206060606060606e-07,16777216,1.048576e-05,0.0,1.048576e-05,0.0,1.048576e-05,FIXPIPE,True,,写出Bound,"瓶颈在 Fixpipe 写出: 检查输出 dtype (fp16/fp8 可减半写出量), 或评估输出驻留 L2 异步回写策略" special_k1_demo,128,128,256,256,1,bf16,bf16,bf16,False,False,False,True,0,special_k1_demo,特殊分支,Ascend950PR,batch_mat_mul_v3,64,1,1,1,1,AIV 核间按行均分 (无 Cube tile 概念),0,1,0,0,1,0,1,UB驻留(AIV),0,0,0,allocate,direct_gm,0,0,不涉及(AIV逐元素),1,1,1,0,0,0,0,False,2,"K=1逐元素乘: 退化为 C=A⊙B 无累加深度, Cube 16x16x16 粒度浪费 15/16; 走 AIV 通路 GM->UB->Mul->GM, UB 乒乓",131072,0.0,8.192e-08,0.0,8.192e-08,0.0,0.0,8388608.0,6.206060606060606e-07,16777216,1.048576e-05,0.0,1.048576e-05,0.0,1.048576e-05,FIXPIPE,True,,写出Bound,"瓶颈在 Fixpipe 写出: 检查输出 dtype (fp16/fp8 可减半写出量), 或评估输出驻留 L2 异步回写策略"
merge_demo_k_trunc,2048,2048,32,32,256,bf16,bf16,bf16,False,False,False,True,0,merge_demo_k_trunc,MergeBatch,Ascend950PR,batch_mat_mul_v3,32,32,1,1,1,切B均分(核间零重复读零依赖),64,4,128,128,256,256,8,合并驻留,128,128,128,allocate(GM->L1随路驻留L2),direct_gm,0,0,不涉及(核内不切M/N),1,1,1,0,0,0,0,True,2,"b0=4 (L0C上限5.7/算存比上限19.0/b_core=64); K截断; 合并后单次DMA搬入 A'[128,256]+B'[256,128]",2097152,0.0,4.194304e-05,0.0,4.2743039999999997e-05,16.0,8.000000000000001e-07,134217728.0,8.837381267489712e-06,131072,2.62144e-06,0.0,4.2743039999999997e-05,3.0192408230452674e-07,4.3044964082304525e-05,MTE2_GM,True,,访存Bound(GM),"瓶颈在 GM 搬入: 可考虑增大 tile 提升 dValue/单核搬移量, 或利用 L2 驻留吸收重复读 (MergeBatch/ASW swizzle 方向)" merge_demo_k_trunc,2048,2048,32,32,256,bf16,bf16,bf16,False,False,False,True,0,merge_demo_k_trunc,MergeBatch,Ascend950PR,batch_mat_mul_v3,32,32,1,1,1,切B均分(核间零重复读零依赖),64,4,128,128,256,256,8,合并驻留,128,128,128,allocate(GM->L1随路驻留L2),direct_gm,0,0,不涉及(核内不切M/N),1,1,1,0,0,0,0,True,2,"b0=4 (L0C上限5.7/算存比上限19.0/b_core=64); K截断; 合并后单次DMA搬入 A'[128,256]+B'[256,128]",2097152,0.0,4.194304e-05,0.0,4.2743039999999997e-05,16.0,8.000000000000001e-07,134217728.0,8.837381267489712e-06,131072,2.62144e-06,0.0,4.2743039999999997e-05,3.0192408230452674e-07,4.3044964082304525e-05,MTE2_GM,True,,访存Bound(GM),"瓶颈在 GM 搬入: 可考虑增大 tile 提升 dValue/单核搬移量, 或利用 L2 驻留吸收重复读 (MergeBatch/ASW swizzle 方向)"
merge_iter_arbitrate,128,128,64,64,512,bf16,bf16,bf16,False,False,False,True,0,merge_iter_arbitrate,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),1,1,1,0,0,0,0,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 方向)" merge_iter_arbitrate,128,128,64,64,512,bf16,bf16,bf16,False,False,False,True,0,merge_iter_arbitrate,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),1,1,1,0,0,0,0,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_form_b,128,128,64,64,256,bf16,bf16,bf16,False,False,False,True,0,iter_demo_form_b,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),1,1,1,0,0,0,0,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_form_b,128,128,64,64,256,bf16,bf16,bf16,False,False,False,True,0,iter_demo_form_b,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),1,1,1,0,0,0,0,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_form_d,64,64,64,64,8192,bf16,bf16,bf16,False,False,False,True,0,iter_demo_form_d,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),1,1,1,0,0,0,0,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 方向)" iter_demo_form_d,64,64,64,64,8192,bf16,bf16,bf16,False,False,False,True,0,iter_demo_form_d,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),1,1,1,0,0,0,0,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 方向)"
streamk_demo,4,4,128,128,10240,bf16,bf16,bf16,False,False,False,True,0,streamk_demo,StreamK,Ascend950PR,batch_mat_mul_v3,32,1,1,1,32,"B/M/N切出4块, 每块32核切K归约 (归约组内核c负责K段[c*K/32,(c+1)*K/32))",1,1,128,128,320,256,1,K段标准分块流水,128,128,64,allocate(部分和驻留L2),"resident(部分和4B驻留L2, 防精度丢失不随C的fp16/fp8转换)",0,8388608,grid_K=32路切K+归约,1,1,32,0,0,0,0,True,4,"P=1.00, grid_K=32, 部分和驻留L2按4B写出, AIV归约后按C dtype=2B写最终",327680.0,0.0,6.5536e-06,0.0,6.5536e-06,0.0,0.0,41943040.0,2.761681646090535e-06,0.0,0.0,3.4067453613053613e-06,6.5536e-06,3.4067453613053613e-06,9.960345361305361e-06,MTE2_GM,True,,访存Bound(GM),"瓶颈在 GM 搬入: 可考虑增大 tile 提升 dValue/单核搬移量, 或利用 L2 驻留吸收重复读 (MergeBatch/ASW swizzle 方向)" streamk_demo,4,4,128,128,10240,bf16,bf16,bf16,False,False,False,True,0,streamk_demo,StreamK,Ascend950PR,batch_mat_mul_v3,32,1,1,1,32,"B/M/N切出4块, 每块32核切K归约 (归约组内核c负责K段[c*K/32,(c+1)*K/32))",1,1,128,128,320,256,1,K段标准分块流水,128,128,64,allocate(部分和驻留L2),"resident(部分和4B驻留L2, 防精度丢失不随C的fp16/fp8转换)",0,8388608,grid_K=32路切K+归约,1,1,32,0,0,0,0,True,4,"P=1.00, grid_K=32, 部分和驻留L2按4B写出, AIV归约后按C dtype=2B写最终",327680.0,0.0,6.5536e-06,0.0,6.5536e-06,0.0,0.0,41943040.0,2.761681646090535e-06,8388608,5.162220307692308e-05,3.4067453613053613e-06,5.162220307692308e-05,3.4067453613053613e-06,5.5028948438228435e-05,FIXPIPE,True,,写出Bound,"瓶颈在 Fixpipe 写出: 检查输出 dtype (fp16/fp8 可减半写出量), 或评估输出驻留 L2 异步回写策略"
asw_demo_full,2,2,8192,8192,1024,bf16,bf16,bf16,False,False,False,True,0,asw_demo_full,ASW_Basic,Ascend950PR,batch_mat_mul_v3,32,1,47,47,1,B->M->N线性映射+ASW滑窗蛇形(W=4),0,1,176,176,1024,256,1,双缓冲驻留当前tile输入,176,176,80,allocate(输入驻留L2吸收重复读),direct_gm(输出直写GM不占L2),4,0,方案B,52,52,1,52,52,2,139,True,2,"L2场景B_输入驻留输出直写GM, r_in=1.00; 尾轮: 周长型主导, rho=0.06<rho_dv=0.53, A1b被dValue卡死, 方案B反超",67108864.0,0.0,4.194304e-05,0.0,4.194304e-05,0.0,0.0,274877906944.0,0.0005655924011193416,268435456,0.00016777216,0.0,0.0005655924011193416,0.0,0.0005655924011193416,MMAD,True,,计算Bound,"瓶颈在 Cube 计算: 已接近理论算力上限, 检查是否有冗余计算 (MergeBatch 交叉项) 可消除" asw_demo_full,2,2,8192,8192,1024,bf16,bf16,bf16,False,False,False,True,0,asw_demo_full,ASW_Basic,Ascend950PR,batch_mat_mul_v3,32,1,47,47,1,B->M->N线性映射+ASW滑窗蛇形(W=4),0,1,176,176,1024,256,1,双缓冲驻留当前tile输入,176,176,80,allocate(输入驻留L2吸收重复读),direct_gm(输出直写GM不占L2),4,0,方案B,52,52,1,52,52,2,139,True,2,"L2场景B_输入驻留输出直写GM, r_in=1.00; 尾轮: 周长型主导, rho=0.06<rho_dv=0.53, A1b被dValue卡死, 方案B反超",67108864.0,0.0,4.194304e-05,0.0,4.194304e-05,0.0,0.0,274877906944.0,0.0005655924011193416,268435456,0.00016777216,0.0,0.0005655924011193416,0.0,0.0005655924011193416,MMAD,True,,计算Bound,"瓶颈在 Cube 计算: 已接近理论算力上限, 检查是否有冗余计算 (MergeBatch 交叉项) 可消除"
asw_demo_reduce_core,16,16,256,256,128,bf16,bf16,bf16,False,False,False,True,0,asw_demo_reduce_core,ASW_Basic_降核,Ascend950PR,batch_mat_mul_v3,16,1,1,1,1,"降核: 只用16核, 每核一个L0C满载输出块, 其余核闲置",0,1,256,256,128,128,1,标准核内流水,256,256,64,allocate,direct_gm,0,0,不涉及(每核一块无尾轮),1,1,1,0,0,0,0,True,2,"P=16.00<C, 降核是理性选择 (强切则 tile 跌破搬移效率下限反而更慢)",2097152.0,0.0,2.62144e-06,0.0,2.62144e-06,0.0,0.0,268435456.0,1.104672658436214e-06,2097152,2.62144e-06,0.0,2.62144e-06,0.0,2.62144e-06,MTE2_GM,True,,访存Bound(GM),"瓶颈在 GM 搬入: 可考虑增大 tile 提升 dValue/单核搬移量, 或利用 L2 驻留吸收重复读 (MergeBatch/ASW swizzle 方向)" asw_demo_reduce_core,16,16,256,256,128,bf16,bf16,bf16,False,False,False,True,0,asw_demo_reduce_core,ASW_Basic_降核,Ascend950PR,batch_mat_mul_v3,16,1,1,1,1,"降核: 只用16核, 每核一个L0C满载输出块, 其余核闲置",0,1,256,256,128,128,1,标准核内流水,256,256,64,allocate,direct_gm,0,0,不涉及(每核一块无尾轮),1,1,1,0,0,0,0,True,2,"P=16.00<C, 降核是理性选择 (强切则 tile 跌破搬移效率下限反而更慢)",2097152.0,0.0,2.62144e-06,0.0,2.62144e-06,0.0,0.0,268435456.0,1.104672658436214e-06,2097152,2.62144e-06,0.0,2.62144e-06,0.0,2.62144e-06,MTE2_GM,True,,访存Bound(GM),"瓶颈在 GM 搬入: 可考虑增大 tile 提升 dValue/单核搬移量, 或利用 L2 驻留吸收重复读 (MergeBatch/ASW swizzle 方向)"
1 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_tail_m_cnt plan_tail_n_cnt plan_tail_k_cnt plan_tail_m_main plan_tail_n_main plan_tail_block_cnt plan_tail_wave_num 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
2 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 0 0 1 折叠为 Matmul [2048,2048]x[2048,2048], 复用 Matmul 切分体系 0 1 0 0 2048 0 1 0 0 0 0 0 转Matmul后由 Matmul 体系决定 1 1 1 0 0 0 0 True 2 BatchB=1免费折叠: 左矩阵 [1,2048,2048] 视图折叠为 [2048,2048], 零重排零 split 16777216 0.0 1.048576e-05 0.0 1.048576e-05 0.0 0.0 17179869184.0 3.534952506995885e-05 8388608 5.24288e-06 0.0 3.534952506995885e-05 0.0 3.534952506995885e-05 MMAD True 计算Bound 瓶颈在 Cube 计算: 已接近理论算力上限, 检查是否有冗余计算 (MergeBatch 交叉项) 可消除
3 special_k0_demo 128 128 256 256 0 bf16 bf16 bf16 False False False True 0 special_k0_demo 特殊分支 Ascend950PR batch_mat_mul_v3 64 1 1 1 1 AIV 核间按行均分 (无 Cube tile 概念) 0 1 0 0 0 0 1 UB驻留(AIV) 0 0 0 allocate direct_gm 0 0 不涉及(AIV逐元素) 1 1 1 0 0 0 0 False 2 K=0纯写值: 无任何计算, C=bias 或 0, 纯 AIV 写值; 按行均分到 AIV 核 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 16777216 1.048576e-05 0.0 1.048576e-05 0.0 1.048576e-05 FIXPIPE True 写出Bound 瓶颈在 Fixpipe 写出: 检查输出 dtype (fp16/fp8 可减半写出量), 或评估输出驻留 L2 异步回写策略
4 special_k1_demo 128 128 256 256 1 bf16 bf16 bf16 False False False True 0 special_k1_demo 特殊分支 Ascend950PR batch_mat_mul_v3 64 1 1 1 1 AIV 核间按行均分 (无 Cube tile 概念) 0 1 0 0 1 0 1 UB驻留(AIV) UB乒乓 UB驻留(AIV) 0 0 0 allocate direct_gm 0 0 不涉及(AIV逐元素) 1 1 1 0 0 0 0 False 2 K=1逐元素乘: 退化为 C=A⊙B 无累加深度, Cube 16x16x16 粒度浪费 15/16; 走 AIV 通路 GM->UB->Mul->GM, UB乒乓 (B>=2*AIV 双batch乒乓流水) K=1逐元素乘: 退化为 C=A⊙B 无累加深度, Cube 16x16x16 粒度浪费 15/16; 走 AIV 通路 GM->UB->Mul->GM, UB 乒乓 131072 0.0 8.192e-08 0.0 8.192e-08 0.0 0.0 8388608.0 6.206060606060606e-07 16777216 1.048576e-05 0.0 1.048576e-05 0.0 1.048576e-05 FIXPIPE True 写出Bound 瓶颈在 Fixpipe 写出: 检查输出 dtype (fp16/fp8 可减半写出量), 或评估输出驻留 L2 异步回写策略
5 merge_demo_k_trunc 2048 2048 32 32 256 bf16 bf16 bf16 False False False True 0 merge_demo_k_trunc MergeBatch Ascend950PR batch_mat_mul_v3 32 32 1 1 1 切B均分(核间零重复读零依赖) 64 4 128 128 256 256 8 合并驻留 128 128 128 allocate(GM->L1随路驻留L2) direct_gm 0 0 不涉及(核内不切M/N) 1 1 1 0 0 0 0 True 2 b0=4 (L0C上限5.7/算存比上限19.0/b_core=64); K截断; 合并后单次DMA搬入 A'[128,256]+B'[256,128] 2097152 0.0 4.194304e-05 0.0 4.2743039999999997e-05 16.0 8.000000000000001e-07 134217728.0 8.837381267489712e-06 131072 2.62144e-06 0.0 4.2743039999999997e-05 3.0192408230452674e-07 4.3044964082304525e-05 MTE2_GM True 访存Bound(GM) 瓶颈在 GM 搬入: 可考虑增大 tile 提升 dValue/单核搬移量, 或利用 L2 驻留吸收重复读 (MergeBatch/ASW swizzle 方向)
6 merge_iter_arbitrate 128 128 64 64 512 bf16 bf16 bf16 False False False True 0 merge_iter_arbitrate 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) 1 1 1 0 0 0 0 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 方向)
7 iter_demo_form_b 128 128 64 64 256 bf16 bf16 bf16 False False False True 0 iter_demo_form_b 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) 1 1 1 0 0 0 0 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 方向)
8 iter_demo_form_d 64 64 64 64 8192 bf16 bf16 bf16 False False False True 0 iter_demo_form_d 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) 1 1 1 0 0 0 0 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 方向)
9 streamk_demo 4 4 128 128 10240 bf16 bf16 bf16 False False False True 0 streamk_demo StreamK Ascend950PR batch_mat_mul_v3 32 1 1 1 32 B/M/N切出4块, 每块32核切K归约 (归约组内核c负责K段[c*K/32,(c+1)*K/32)) 1 1 128 128 320 256 1 K段标准分块流水 128 128 64 allocate(部分和驻留L2) resident(部分和4B驻留L2, 防精度丢失不随C的fp16/fp8转换) 0 8388608 grid_K=32路切K+归约 1 1 32 0 0 0 0 True 4 P=1.00, grid_K=32, 部分和驻留L2按4B写出, AIV归约后按C dtype=2B写最终 327680.0 0.0 6.5536e-06 0.0 6.5536e-06 0.0 0.0 41943040.0 2.761681646090535e-06 0.0 8388608 0.0 5.162220307692308e-05 3.4067453613053613e-06 6.5536e-06 5.162220307692308e-05 3.4067453613053613e-06 9.960345361305361e-06 5.5028948438228435e-05 MTE2_GM FIXPIPE True 访存Bound(GM) 写出Bound 瓶颈在 GM 搬入: 可考虑增大 tile 提升 dValue/单核搬移量, 或利用 L2 驻留吸收重复读 (MergeBatch/ASW swizzle 方向) 瓶颈在 Fixpipe 写出: 检查输出 dtype (fp16/fp8 可减半写出量), 或评估输出驻留 L2 异步回写策略
10 asw_demo_full 2 2 8192 8192 1024 bf16 bf16 bf16 False False False True 0 asw_demo_full ASW_Basic Ascend950PR batch_mat_mul_v3 32 1 47 47 1 B->M->N线性映射+ASW滑窗蛇形(W=4) 0 1 176 176 1024 256 1 双缓冲驻留当前tile输入 176 176 80 allocate(输入驻留L2吸收重复读) direct_gm(输出直写GM不占L2) 4 0 方案B 52 52 1 52 52 2 139 True 2 L2场景B_输入驻留输出直写GM, r_in=1.00; 尾轮: 周长型主导, rho=0.06<rho_dv=0.53, A1b被dValue卡死, 方案B反超 67108864.0 0.0 4.194304e-05 0.0 4.194304e-05 0.0 0.0 274877906944.0 0.0005655924011193416 268435456 0.00016777216 0.0 0.0005655924011193416 0.0 0.0005655924011193416 MMAD True 计算Bound 瓶颈在 Cube 计算: 已接近理论算力上限, 检查是否有冗余计算 (MergeBatch 交叉项) 可消除
11 asw_demo_reduce_core 16 16 256 256 128 bf16 bf16 bf16 False False False True 0 asw_demo_reduce_core ASW_Basic_降核 Ascend950PR batch_mat_mul_v3 16 1 1 1 1 降核: 只用16核, 每核一个L0C满载输出块, 其余核闲置 0 1 256 256 128 128 1 标准核内流水 256 256 64 allocate direct_gm 0 0 不涉及(每核一块无尾轮) 1 1 1 0 0 0 0 True 2 P=16.00<C, 降核是理性选择 (强切则 tile 跌破搬移效率下限反而更慢) 2097152.0 0.0 2.62144e-06 0.0 2.62144e-06 0.0 0.0 268435456.0 1.104672658436214e-06 2097152 2.62144e-06 0.0 2.62144e-06 0.0 2.62144e-06 MTE2_GM True 访存Bound(GM) 瓶颈在 GM 搬入: 可考虑增大 tile 提升 dValue/单核搬移量, 或利用 L2 驻留吸收重复读 (MergeBatch/ASW swizzle 方向)