Skip to content

v1.2.0

Choose a tag to compare

@thecosmicskye thecosmicskye released this 11 Nov 04:59
· 4 commits to main since this release
v1.2.0
e75d830

CUDA is 13% to 74% faster than 1.1.0 with bit-identical results; CPU speed is unchanged.

Arenas RocketGPU CUDA CUDA vs 1.1.0 RocketGPU CPU
96 0.66M +12.8% 4.26M
256 1.49M +15.0% 4.35M
512 2.53M +15.7% 4.44M
1,024 4.33M +18.4% 4.44M
4,096 10.71M +30.8% 3.62M
8,192 15.42M +54.3% 3.55M
16,384 18.55M +74.1% 3.65M

Arena-ticks/s from bench_cpp --replay; CUDA on an RTX 5090, CPU on a Ryzen 7 9800X3D with 14 threads. The CUDA comparison with 1.1.0 is paired runs on the same machine.

CUDA builds need CUDA 12.1 or newer. They now compile the kernels as seven translation units by default, which builds faster and in less than half the memory. This needs Python 3 at configure time; without it, with MSVC, or with -DROCKETGPU_CUDA_SPLIT=OFF, the kernels build as one file as before. Results are identical.

New: custom arenas, a soccar match (scoring, kickoffs, boost pads, demos) on your own geometry. BatchSim(config, layout) takes an ArenaLayout: collision meshes (a directory of .cmf files and/or ArenaMesh triangle lists), ArenaPlanes, boost pads, an ArenaGoal per team, kickoff and respawn ArenaSpawns and the ball spawn. A default ArenaLayout is the official arena; ArenaLayout::OfficialPlanes() gives its floor, ceiling and side walls for use with your own meshes. The same types are in the Python module. Positions must be within 11,500 uu of the origin on each axis and spawn yaws within 8 pi of zero, or the constructor throws std::invalid_argument. Custom geometry steps slower than the official arena, whose results are unchanged and which is no slower than before. See "Custom arenas" in the README.

Fixes:

  • Configs with max_cars_per_env above 8 silently overran per-env scratch memory, on CPU and CUDA. They are now rejected: the BatchSim constructor throws std::invalid_argument.
  • CUDA: with more than one BatchSim in a process, a step captured into the caller's own CUDA graph could read or write another simulator's step buffers out of bounds, or a buffer freed after a larger simulator stepped. Step buffers are now passed to the kernels of the step that sized them and are kept once a caller has captured a step.

Breaking changes:

  • max_cars_per_env above 8 is rejected (see Fixes).
  • CUDA builds, code that reads or writes car state directly in GPU memory (DeviceView::car_states, device_arrays()["car_states"], the Python device field views): car states are now stored in tiles of 32 car slots, so car i is at [i // 32, i % 32] and the field views have shape (tiles, 32, ...). DeviceView::car_states is void*; the tile layout is in state_layouts()["car_states"]["device"]. download_state_array and upload_state_array are unchanged and still take CarState structs.