Add BMM_Theory: t_p.csv (fix review issues #4-#10)

This commit is contained in:
2026-09-03 11:34:14 +00:00
parent 64cfc4454f
commit 006aa5963b

4
BMM/BMM_Theory/t_p.csv Normal file
View File

@@ -0,0 +1,4 @@
case_id,branch,npu,op,used_core_num,split_b,m_cnt,n_cnt,grid_k,core_map,b_core,merge_b0,single_core_m,single_core_n,single_core_k,k_l1,b_l1,l1_form,base_m,base_n,base_k,l2_policy_in,l2_policy_out,swizzle_w,workspace_bytes,tail_strategy,tail_m_cnt,tail_n_cnt,tail_k_cnt,tail_m_main,tail_n_main,tail_block_cnt,tail_wave_num,fixpipe_unitflag,out_dtype_bytes,note
x,StreamK,Ascend950PR,batch_mat_mul_v3,32,1,1,1,3,"B/M/N切出51块, 每块3核切K归约 (归约组内核c负责K段[c*K/3,(c+1)*K/3))",1,1,255,42,228,128,1,K段标准分块流水,128,42,64,allocate(部分和驻留L2),"resident(部分和4B驻留L2, 防精度丢失不随C的fp16/fp8转换)",0,6554520,grid_K=3路切K+归约,1,1,3,0,0,0,0,True,4,"P=8.33, grid_K=3, 部分和驻留L2按4B写出, AIV归约后按C dtype=4B写最终"
y,ASW_Basic_降核,Ascend950PR,batch_mat_mul_v3,1,1,1,1,1,"降核: 只用1核, 每核一个L0C满载输出块, 其余核闲置",0,1,64,16,32,32,1,标准核内流水,64,16,32,allocate,direct_gm,0,0,不涉及(每核一块无尾轮),1,1,1,0,0,0,0,True,2,"P=0.03<C, 降核是理性选择 (强切则 tile 跌破搬移效率下限反而更慢)"
z,IterBatch,Ascend950PR,batch_mat_mul_v3,32,32,1,1,1,切B轮转分配(核间零重复读零依赖),8,1,128,1024,8,8,2,b_双batch乒乓,128,256,16,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=36KB <= L1
1 case_id branch npu op used_core_num split_b m_cnt n_cnt grid_k core_map b_core merge_b0 single_core_m single_core_n single_core_k k_l1 b_l1 l1_form base_m base_n base_k l2_policy_in l2_policy_out swizzle_w workspace_bytes tail_strategy tail_m_cnt tail_n_cnt tail_k_cnt tail_m_main tail_n_main tail_block_cnt tail_wave_num fixpipe_unitflag out_dtype_bytes note
2 x StreamK Ascend950PR batch_mat_mul_v3 32 1 1 1 3 B/M/N切出51块, 每块3核切K归约 (归约组内核c负责K段[c*K/3,(c+1)*K/3)) 1 1 255 42 228 128 1 K段标准分块流水 128 42 64 allocate(部分和驻留L2) resident(部分和4B驻留L2, 防精度丢失不随C的fp16/fp8转换) 0 6554520 grid_K=3路切K+归约 1 1 3 0 0 0 0 True 4 P=8.33, grid_K=3, 部分和驻留L2按4B写出, AIV归约后按C dtype=4B写最终
3 y ASW_Basic_降核 Ascend950PR batch_mat_mul_v3 1 1 1 1 1 降核: 只用1核, 每核一个L0C满载输出块, 其余核闲置 0 1 64 16 32 32 1 标准核内流水 64 16 32 allocate direct_gm 0 0 不涉及(每核一块无尾轮) 1 1 1 0 0 0 0 True 2 P=0.03<C, 降核是理性选择 (强切则 tile 跌破搬移效率下限反而更慢)
4 z IterBatch Ascend950PR batch_mat_mul_v3 32 32 1 1 1 切B轮转分配(核间零重复读零依赖) 8 1 128 1024 8 8 2 b_双batch乒乓 128 256 16 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=36KB <= L1