Skip to content

Add headless EGL pixel rendering benchmark - #63

Open
eust-w wants to merge 1 commit into
NeuracoreAI:masterfrom
eust-w:upstream/headless-egl-rendering
Open

Add headless EGL pixel rendering benchmark#63
eust-w wants to merge 1 commit into
NeuracoreAI:masterfrom
eust-w:upstream/headless-egl-rendering

Conversation

@eust-w

@eust-w eust-w commented Aug 6, 2026

Copy link
Copy Markdown

Summary

  • document accelerated headless pixel rendering with MUJOCO_GL=egl
  • document MUJOCO_EGL_DEVICE_ID selection for multi-GPU hosts
  • clarify that BiGym's built-in MuJoCo renderer uses OpenGL/EGL, not CUDA or ROCm
  • add a deterministic pixel-observation smoke benchmark with JSON throughput output
  • fail the benchmark on wrong-shaped, non-finite, blank or constant frames
  • add focused validation tests for the render-output gate

Why

BiGym documents pixel observations but does not currently provide a reproducible way to validate headless GPU rendering. This makes blank frames, software-rendering fallbacks and container device-permission problems difficult to distinguish from environment or policy failures.

The new example exercises a real ReachTarget environment with rgb_head observations, reports physics-plus-rendering steps per second, and produces a small machine-readable result that can be compared across hosts.

AMD and portability boundary

On AMD Linux hosts, MuJoCo normally reaches the GPU through Mesa EGL/OpenGL and /dev/dri; installing ROCm is not required for BiGym's built-in pixel observations. External policies and renderers may still require ROCm, but those dependencies remain outside BiGym.

The same example works for other Linux EGL devices. MUJOCO_GL=osmesa remains documented as a CPU fallback, not a GPU performance result. MUJOCO_EGL_DEVICE_ID follows the device-selection support in the official MuJoCo Python EGL implementation.

Downstream Radeon W7900D integration evidence exists at https://github.com/eust-w/amd-bigym-openpi-eval/blob/main/evidence/amd-full-recorder-smoke-20260805.json, but this PR does not present that forked/custom-renderer run as an execution of this exact canonical example.

Validation

  • 4 focused tests passed for valid, blank, mis-shaped and non-finite frames
  • Black 23.3.0, Ruff 0.0.272 and pydocstyle 6.3.0 passed
  • Python compilation and git diff checks passed
  • no new runtime dependency is introduced

Supersedes #58 after the source branch was renamed to remove the agent/ prefix.

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