From b57ba5748f651071cc36abfbe8f92428ab17d1f4 Mon Sep 17 00:00:00 2001 From: admin Date: Thu, 3 Sep 2026 11:34:15 +0000 Subject: [PATCH] Update BMM_Theory: bmm_theory/__main__.py (fix review issues #4-#10) --- BMM/BMM_Theory/bmm_theory/__main__.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/BMM/BMM_Theory/bmm_theory/__main__.py b/BMM/BMM_Theory/bmm_theory/__main__.py index 347b53e..67d9018 100644 --- a/BMM/BMM_Theory/bmm_theory/__main__.py +++ b/BMM/BMM_Theory/bmm_theory/__main__.py @@ -82,9 +82,14 @@ def _print_case(case, r, res): f"{case.dtype_a} -> [{r['branch']}]") print(f" 仲裁: {r['arbitration']}") p = r["plan"] + if p is None: + print(" 方案: <无> (该区域暂无理论方案)") + return print(f" 方案: 核数={p.used_core_num} 切分=B{p.split_b}xM{p.m_cnt}xN{p.n_cnt}xK{p.grid_k} " f"b_core={p.b_core} b0={p.merge_b0} k_L1={p.k_l1} L1形态={p.l1_form}") - if t.t_total: + if r.get("self_check_violations"): + print(f" 自检违规: {'; '.join(r['self_check_violations'])}") + if t and t.t_total: print(f" 时延: 总={t.t_total*1e6:.2f}us 稳态={t.t_steady*1e6:.2f} drain={t.t_drain*1e6:.2f} " f"| MTE2={t.t_mte2*1e6:.2f}(GM={t.t_mte2_gm*1e6:.2f}+cmd={t.t_dma_cmd*1e6:.2f}) " f"MMAD={t.t_mmad*1e6:.2f} FIX={t.t_fixpipe*1e6:.2f} | 瓶颈={t.bottleneck}")