Fix review issues #17-#22: 恢复 #11/#12/#14 (StreamK fixpipe 单次计账/K=1 AIV单缓冲/advice) + 占位方案不可评估 + 转置 dValue 判据三处同源(form c 双缓冲适配修复) + 恢复 #13/#15 回归测试 + 清理临时 csv/.gitignore + 文档同步
This commit is contained in:
@@ -36,6 +36,13 @@ def check_plan_constraints(case: BmmCase, plan: ImplPlan,
|
||||
s = spec
|
||||
v = []
|
||||
|
||||
# 占位/无效方案: used_core_num<1 说明没有真实方案 (如 router._no_plan 的占位),
|
||||
# recommend 侧 advice 已标注"[无方案]", evaluate 侧必须判不可行 (issue#18),
|
||||
# 不得当作可行方案给正常时延.
|
||||
if plan.used_core_num < 1:
|
||||
v.append("used_core_num=0: 占位/未生成方案, 不可评估")
|
||||
return v
|
||||
|
||||
# AIV 通路: 只校验 AIV 核数
|
||||
if plan.branch in AIV_BRANCHES:
|
||||
if plan.used_core_num > s.aiv_num:
|
||||
@@ -77,9 +84,19 @@ def check_plan_constraints(case: BmmCase, plan: ImplPlan,
|
||||
|
||||
# --- dValue --- (issue#6 口径裁定: 只对"以 K 段为连续维"的方案生效)
|
||||
if _k_segment_is_contiguous(plan, case) and plan.k_l1 > 0:
|
||||
dv = plan.k_l1 * case.dtype_in_bytes
|
||||
if dv < s.dvalue_min:
|
||||
v.append(f"dValue={dv}B < 下限 {s.dvalue_min}B, K 段连续维搬移效率崩塌")
|
||||
if plan.branch == "IterBatch" and plan.l1_form.startswith(("c_", "d_")):
|
||||
# 转置感知判据与生成守卫/条件 4 同源 (issue#19):
|
||||
# dv_a = M*dt (A 转置) 或 k_l1*dt; dv_b = N*dt (B 不转置) 或 k_l1*dt;
|
||||
# 两侧连续维 dValue 均低于下限才算违规.
|
||||
from .models import dvalue_contig_dims
|
||||
dv_a, dv_b = dvalue_contig_dims(case, plan.k_l1)
|
||||
if dv_a < s.dvalue_min and dv_b < s.dvalue_min:
|
||||
v.append(f"dValueA={dv_a:.0f}B 与 dValueB={dv_b:.0f}B 均 < 下限 "
|
||||
f"{s.dvalue_min}B, 搬移连续维效率崩塌")
|
||||
else:
|
||||
dv = plan.k_l1 * case.dtype_in_bytes
|
||||
if dv < s.dvalue_min:
|
||||
v.append(f"dValue={dv}B < 下限 {s.dvalue_min}B, K 段连续维搬移效率崩塌")
|
||||
|
||||
# --- 写出 dtype --- (StreamK 部分和 4B 是正确行为)
|
||||
if plan.branch not in PARTIAL_SUM_4B_BRANCHES:
|
||||
|
||||
Reference in New Issue
Block a user