MuJoCo Warp documentation: Memory.

PiperOrigin-RevId: 857148640
Change-Id: I7f21bebb2186a5dd4287a8d2ee9b430f823b9051
This commit is contained in:
Taylor Howell
2026-01-16 07:12:34 -08:00
committed by Copybara-Service
parent 77d1ac10fe
commit 9ba545b8b0
+35 -1
View File
@@ -220,7 +220,7 @@ Minimal example
Command line scripts
--------------------
Benchmark an environment with testspeed
Benchmark an environment with _`testspeed`
.. code-block:: shell
@@ -379,6 +379,40 @@ To enable this routine set ``Model.opt.ls_parallel=True`` or add a custom numeri
.. _mjwBatch:
Memory
------
Simulation throughput is often limited by memory requirements for large numbers of worlds. Considerations for optimizing
memory utilization include:
- CCD colliders require more memory than primitive colliders, see MuJoCo's :ref:`pair-wise colliders table <coPairwise>`
for information about colliders.
- :ref:`multiccd <option-flag-multiccd>` requires more memory than CCD.
- CCD memory requirements scale linearly with :ref:`Option.ccd_iterations <option-ccd-iterations>`.
- A scene with at least one mesh geom and using :ref:`multiccd <option-flag-multiccd>` will have memory requirements
that scale linearly with the maximum number of vertices per face and with the maximum number of edges per vertex,
computed over all meshes.
`testspeed`_ provides the flag ``--memory`` for reporting a simulation's total memory utilization and information about
:class:`mjw.Model <mujoco_warp.Model>` and :class:`mjw.Data <mujoco_warp.Data>` fields that require significant memory.
Memory allocated inline, including for CCD and the constraint solver, can also be significant and is reported as
``Other memory``.
.. admonition:: Maximum number of contacts per collider
:class: note
Some MJWarp colliders have a different maximum number of contacts compared to MuJoCo:
- ``PLANE<>MESH``: 4 versus 3
- ``HFieldCCD``: 4 versus ``mjMAXCONPAIR``
.. admonition:: Sparsity
:class: note
Sparse Jacobians can enable significant memory savings. Updates for this feature are tracked in GitHub issue
`#88 <https://github.com/google-deepmind/mujoco_warp/issues/88>`__.
Batched :class:`Model <mujoco_warp.Model>` Fields
=================================================