Skip to content

bench(env): consume public step timing without private probes - #1726

Merged
TATP-233 merged 4 commits into
develop/tensor-runtimefrom
feat/issue-1704-public-phase-timing
Sep 29, 2026
Merged

TATP-233 merged 4 commits into
develop/tensor-runtimefrom
feat/issue-1704-public-phase-timing

Conversation

@TATP-233

Copy link
Copy Markdown
Collaborator

Summary

  • Add per-phase process CPU-time measurements to the public TorchEnv.step() timing schema, paired with existing wall timings.
  • Rewrite the phase-CPU benchmark to consume only state.info["timing"] after public env.step() calls.
  • Remove benchmark probes of env._backend.step, env._backend._n_threads, and env._reset_done_envs.
  • Submit benchmark actions as float32 Torch tensors on env.device.
  • Add lifecycle timing coverage and a benchmark AST contract that rejects private attribute access or timing wrappers.

Part of #1704.

Stacked on #1725; merge #1725 first, or retarget this PR after that merge.

Validation

  • UNILAB_LOCAL_UNISIM=/home/user/ws/unilabsim/unisim uv run pytest -q tests/base/test_torch_env.py tests/benchmark/test_env_step_phase_cpu_public_contract.py tests/benchmark/test_env_step_config_contract.py — 26 passed
  • UNILAB_LOCAL_UNISIM=/home/user/ws/unilabsim/unisim uv run make check
  • UNILAB_LOCAL_UNISIM=/home/user/ws/unilabsim/unisim uv run make test-all — 1834 passed, 26 skipped; benchmark imports 35/35 and 36/36

Notes

  • The timing schema remains owned by TorchEnv; the benchmark does not monkey-patch owner methods.
  • backend_* sub-timings continue to come from the backend result through the existing public owner boundary.

@TATP-233
TATP-233 merged commit 7445509 into develop/tensor-runtime Sep 29, 2026
2 checks passed
@TATP-233
TATP-233 deleted the feat/issue-1704-public-phase-timing branch September 29, 2026 12:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant