exp: 轮次33——限幅实测要付5.1pp到达(57.4→52.3%);GPU真实周期36.7ms≈27Hz,瓶颈是重复几何而非推理

- 四组单变量对照(同256题同seed):base / inc_cap / gap_margin 0.5 / 两者同开
  限幅后 到达 0.5742→0.5234、time_ok 0.3906→0.2656、2s误差比 0.210→0.279、超VMAX 1.0→0.0、刹停几乎不变
  → 之前那部分到达率是超速换来的;损失在逼近末段,不在刹停
- 0.5mm 余量门只付 3 题(0.5742→0.5625);但 plans['gaps'] 在 0.5mm 截顶,5mm 护栏可达性需抬 cap 重算
- 前提更正:eval_cl 不传 steps、rollout 默认 steps=1(policy.py:156 一步生成),先前按 steps=16 得到的
  "当前配方 116ms≈8.6Hz" 作废;真实配方 36.68ms P50 / 49.17ms P99 ≈ 27.3Hz
- 归因更正:空算子 0.028ms、空 sync 0.005ms、encode 2.27ms → 不是启动/同步地板;
  单步推理仅 7.2ms 且 K=1→8 免费,周期里 ~27ms 是 cum_xf+宽相位的重复计算
- certify_uniform 挂上后 36.7→45.3ms(n=8)/49.6ms(n=16)
- kin_torch 补 a/b 形状守卫(脚本里广播不一致会算错 view),测试 30→31 项
This commit is contained in:
cbb
2026-10-20 20:32:19 +08:00
parent 6ecd33db0c
commit 48cc566c3f
8 changed files with 610 additions and 1 deletions
+4
View File
@@ -280,6 +280,8 @@ class Kin:
"""
if self.dtype != torch.float64 or a.dtype != torch.float64 or b.dtype != torch.float64:
raise ValueError('segment certification requires float64')
if a.shape != b.shape or a.ndim != 2 or a.shape[1] != 6:
raise ValueError('a and b must be [count,6] with identical shape')
# 预算给成张量时 max_depth + 1 会在 uint8 这类窄类型上回绕成 0,循环整个跳过,把碰撞段当安全返回。
if type(max_queries) is not int or type(max_depth) is not int:
raise ValueError('certification budgets must be plain ints')
@@ -336,6 +338,8 @@ class Kin:
raise ValueError('segment certification requires float64')
if type(n) is not int or n < 1 or eps <= 0 or (cap is not None and cap <= eps):
raise ValueError('invalid subdivision count or tolerance')
if a.shape != b.shape or a.ndim != 2 or a.shape[1] != 6:
raise ValueError('a and b must be [count,6] with identical shape')
count = a.shape[0]
inside = (((a >= self.lo) & (a <= self.hi) & (b >= self.lo) & (b <= self.hi)) | self.cont).all(-1)
bound = (b - a).abs() @ self.cert_lever.T / n # [count,15] 子段界