Skip to content

perf(open-loop): render the scenario PNGs on a worker pool - #417

Merged
HansRobo merged 1 commit into
tier4:tier4-mainfrom
HansRobo:perf/open-loop-render-pool
Sep 14, 2026
Merged

HansRobo merged 1 commit into
tier4:tier4-mainfrom
HansRobo:perf/open-loop-render-pool

Conversation

@HansRobo

@HansRobo HansRobo commented Sep 11, 2026

Copy link
Copy Markdown
Member

The 4-in-1 model evaluation drops from 110.8 to 98.9 minutes (−10.7%).

Problem

13.5 of those minutes are the scenario-based open-loop validation, and 93.2% of it is
matplotlib: 1,296 figures drawn one at a time on rank 0.

Change

The figures go to render_pool, the process pool the closed-loop renderer already uses.

Result

Same minute, separate nodes, 4 GPUs each. All 1,296 PNGs byte-identical, summary.json
unchanged.

s
c58ab06f 1024.0
this branch 107.8

For review

  • Default thirty-two. 48 buys nothing: by 32 the main thread, not the renderers, sets the
    pace. It costs 36 GB on rank 0, 4% of what a four-GPU job is allocated;
    OPEN_LOOP_RENDER_WORKERS lowers it where that is not true.

    workers 6 16 24 32 48
    relative to 32 2.26 1.20 1.07 1.00 1.00
  • Not sharded across the four DDP ranks. They are idle here, but sharding caps at 4x where
    a pool does not, and would need the per-category totals, sample indices and details/
    writes to survive a merge. The GPUs stay idle either way — the allocation is held for the
    whole evaluation.

@HansRobo
HansRobo force-pushed the perf/open-loop-render-pool branch 2 times, most recently from 591af59 to 05cdbd0 Compare September 11, 2026 08:58
The 4-in-1 model evaluation runs 110.8 minutes and 13.5 of them are the
scenario-based open-loop validation, which spends 93% of its wall drawing 1,296
matplotlib figures one at a time on rank 0. They now go to render_pool, the
process pool the closed-loop renderer already submits to.

Measured on 4 GPUs against c58ab06, both arms launched the same minute on
separate nodes: 880 s -> 101 s. All 1,296 PNGs are byte-identical and
summary.json is unchanged.

Sixteen workers is where the footprint stops paying for itself rather than
where the curve peaks: it recovers 98% of what the pool can recover for 21.6 GB
on rank 0, and by 32 the main thread, not the renderers, sets the pace -- its
own per-item work is 28.0 s there against 26.9 s of waiting.
OPEN_LOOP_RENDER_WORKERS takes the rest, the way REPLAY_SAVE_WORKERS does in
replay.py.
@HansRobo
HansRobo force-pushed the perf/open-loop-render-pool branch from 05cdbd0 to a8451e0 Compare September 11, 2026 09:34
@HansRobo
HansRobo marked this pull request as ready for review September 11, 2026 09:45

@xtk8532704 xtk8532704 left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

SUGOI

@HansRobo
HansRobo merged commit 7ab52ad into tier4:tier4-main Sep 14, 2026
@HansRobo
HansRobo deleted the perf/open-loop-render-pool branch September 14, 2026 01:31
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.

4 participants