#9917·carla

Multi-GPU support is broken in CARLA 0.10.0 / UE5

Author: JArmandoAnayaCreated Sep 30, 2026Updated Sep 30, 2026

Setup

  • CARLA version: 0.10.0 / ue58-dev
  • Platform: Linux / Ubuntu
  • Python version: 3.12
  • GPU: Multi-GPU NVIDIA setup
  • Unreal Engine version: UE5 (also reproduced and investigated on UE 5.8)

Describe the bug

Multi-GPU support is not reliably functional in the UE5-based version of CARLA.

The intended architecture is to run a primary server as the simulation authority, optionally with -nullrhi, and one or more secondary servers that render sensors. In CARLA 0.10.0, this path has several issues that make the setup unreliable or unusable in normal workloads.

During testing and the UE5.8 refactoring, the following problems were reproduced:

  • A -nullrhi primary can still enter camera capture/readback paths even though it has no rendering backend.
  • Secondary routing and pending requests are not safely handled when a secondary disconnects or a request is in flight.
  • After load_world(), secondary episode state can become stale or diverge from the primary.
  • Repeated episode reloads can replay frame state against the wrong episode and crash a secondary.
  • Stream IDs created independently by secondary servers can collide or differ from the stream ID known by the primary, causing incorrect subscriptions, failed unsubscribe operations and broken sensor streams.
  • Sensors created immediately after an episode transition can be routed before the corresponding secondary is ready.
  • Losing a secondary can leave cached routing state pointing to a server that is no longer available.

Together, these issues prevent the Multi-GPU path from behaving as a transparent extension of the normal CARLA server.

Steps to reproduce

A representative setup is:

  1. Start a CARLA primary server.
  2. Start two rendering secondary servers connected to the primary, each using a different GPU.
  3. Connect a Python client to the primary.
  4. Enable synchronous mode.
  5. Spawn multiple RGB cameras and call listen() on them.
  6. Call load_world() and recreate or resume the sensor rig.
  7. Repeat the world reload several times.
  8. Optionally terminate one secondary while sensors are active.

The failures are easier to reproduce with multiple cameras and repeated load_world() calls.

A -nullrhi primary also exposes additional failures when camera operations fall back to the primary instead of being handled entirely by a rendering secondary.

Expected behavior

Multi-GPU should preserve the same client-facing sensor semantics as a normal CARLA server:

  • The primary should remain the authority for simulation and world state.
  • A -nullrhi primary should not execute camera rendering, capture or GPU readback.
  • Rendering sensors assigned to a secondary should be captured and streamed by that secondary.
  • The client should see a stable, unique streamID regardless of which secondary owns the sensor.
  • Secondaries should stay synchronized with the primary across load_world().
  • Sensor streaming should resume correctly after an episode reload.
  • Disconnecting one secondary should not crash or wedge the primary or the remaining secondaries.
  • Requests to an unavailable secondary should fail or be rerouted cleanly instead of hanging.
  • CPU-side sensors should continue working on a non-rendering primary.

Logs

The individual failures produce different symptoms, including secondary crashes during episode transitions, sensor streams that stop delivering frames, failed token requests, duplicated stream IDs and invalid session/reconnect loops.

Scripts

The problem can be reproduced with standard Python API operations (spawn_actor, sensor.listen(), synchronous world.tick(), and client.load_world()`). No application-specific integration is required.

Additional context

We investigated the issue thoroughly while validating the Multi-GPU path against the UE5.8 development branch.

A physical two-GPU setup was used to exercise repeated episode reloads, multi-camera routing, secondary disconnection and a -nullrhi primary. The failures above were reproducible independently rather than being specific to a single application workload.

The expected Multi-GPU architecture is for the primary to own simulation authority while rendering secondaries own the GPU-backed sensors assigned to them, without exposing the distribution of those sensors to the client.