Skip to content

perf(profiling): motion tracking update_state/reset_done 逐 term profiling(#1292 杠杆 1) #1293

Description

@TATP-233

Parent: #1292("更优先的杠杆"第 1 条)

⚠️ 临时需求(TODO: #1292 完成后删除)
本 issue 引入的 per-term profiling 埋点是临时代码:profiling 本身有计时开销、会影响被测路径效率,不作为永久功能维护。TODO:#1292 的优化开发(#1294/#1295/#1296)全部完成后,删除这些埋点。 实现时请把埋点集中、标记清楚(如统一 PROFILING_TEMP 注释),保证届时可低成本移除。

背景

#1292 的三后端同机 benchmark 已确认:sac/g1_motion_tracking 在 mjwarp 把物理压到 ~18 ms 后,瓶颈落在 manager 数值层(update_state + reset_done 占 env step 约 69–79%,跨 Xeon/Ryzen 两台机器复现)。但目前只有阶段级计时,不知道 update_state 的 29–83 ms 具体花在哪几个 term。

目标

用现有 instrumentation + 最小新增埋点,产出 motion tracking task 的逐 term profiling 报告,回答:

  1. update_state 中 observation / reward / metrics / curriculum 各 manager 及其内部每个 term 的耗时分布。
  2. reset_done 中 event terms 采样、row-scoped obs 重建各 term 的耗时分布(现有 RESET_DONE_DETAIL_TIMING_KEYS,见 src/unilab/base/np_env.py:25-66,只到阶段级,不含 per-term)。

范围

验收

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions