Glossary · Physics simulation

MuJoCo Warp

Also called MJWarp, mujoco-warp, Warp, NVIDIA Warp, GPU physics

A version of the MuJoCo physics engine that runs on a GPU and simulates thousands of copies of a world at once.

MuJoCo normally runs on a CPU: one core steps one copy of the world. MuJoCo Warp is a rewrite of it for the GPU, built by Google DeepMind and NVIDIA on NVIDIA’s Warp, a library for writing GPU code in Python. It takes the same model files and computes the same physics, but steps thousands of copies of the world in lockstep, one GPU thread or group of threads per copy.

That suits reinforcement learning, which needs lots of experience from many copies of the same task (parallel environments). The physics and the network then both live on the GPU, and nothing has to be copied back and forth.

It has limits a CPU simulator doesn’t. Every copy gets a fixed number of slots for contacts and constraints, chosen before the run. Every copy runs the solver until the slowest one has converged. And some of its fast paths only work for bodies up to a certain size.

In this project

Training on a rented GPU moved the stance environment onto MuJoCo Warp (version 3.16). The muscular body’s 89 degrees of freedom in one tree were too many for its fast mass-matrix factorisation, which took 53 % of the GPU time until it was replaced. The contact slots were set at 96 contacts and 512 constraint rows per copy after smaller ones overflowed. With 1,024 copies, an RTX 5090 trained the muscular-fast body at 37,000 steps a second.

Related terms

Used in

← All terms