Skip to content

Add neighbor cache support - #550

Open
vcharraut wants to merge 5 commits into
3.0from
vcha/neighbor-cacche
Open

Add neighbor cache support#550
vcharraut wants to merge 5 commits into
3.0from
vcha/neighbor-cacche

Conversation

@vcharraut

@vcharraut vcharraut commented Aug 4, 2026

Copy link
Copy Markdown
Collaborator

What

  • Makes neighbor caching configurable while keeping the cached fast path available.
  • Uses a reusable on-demand scratch buffer when neighbor caching is disabled.
  • Covers all map-cache and neighbor-cache combinations, including shared-map ownership and output parity.

Why

Neighbor caching was always enabled and precomputed road neighbors for every grid cell. On nuPlan maps, this can consume excessive RAM and exhaust the process memory.

@Victorbares Victorbares left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I will try it out to check if max_sdc_replay_workers is still needded

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

We should be able to remove the max_sdc_replay_workers

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

We could put it also for the womd

raise pufferlib.APIUsageError(
f"Benchmark config has unsupported environment keys: {', '.join(sorted(unknown_env_keys))}"
)
default_use_neighbor_cache = environment_config.get("use_neighbor_cache", 1)

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Remove the 1 as default value

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.

2 participants