---
title: "How to Use NVIDIA Warp and MjWarp to Accelerate Robotics Simulation and Learning Workflows"
description: "NVIDIA Warp is a Python framework for writing GPU-accelerated kernels that compiles statically typed Python to CUDA. MuJoCo Warp (MJWarp) implements MuJoCo physics on Warp, enabling batched simulation of hundreds to thousands of independent robot environments on NVIDIA GPUs. The core API transition is small: mjw.put_model and mjw.put_data replace mujoco.MjModel and mujoco.MjData, and mjw.step advances the entire batch. Proper throughput measurement requires GPU synchronization and warm-up to avoid timing queue latency instead of actual GPU work. The post demonstrates moving an SO-101 follower arm from a single CPU world to 2,048 parallel MJWarp environments, validating parity and measuring aggregate world-steps per second."
---

# How to Use NVIDIA Warp and MjWarp to Accelerate Robotics Simulation and Learning Workflows

[Hugging Face](https://yomu.fyi/company/hugging-face) · Johnny Nuñez Cano, Asier Arranz, Rishabh Chadha, Ben Oliveri · Sep 23, 2026

**Type:** Tutorial

## Summary

NVIDIA Warp is a Python framework for writing GPU-accelerated kernels that compiles statically typed Python to CUDA. MuJoCo Warp (MJWarp) implements MuJoCo physics on Warp, enabling batched simulation of hundreds to thousands of independent robot environments on NVIDIA GPUs. The core API transition is small: mjw.put\_model and mjw.put\_data replace mujoco.MjModel and mujoco.MjData, and mjw.step advances the entire batch. Proper throughput measurement requires GPU synchronization and warm-up to avoid timing queue latency instead of actual GPU work. The post demonstrates moving an SO-101 follower arm from a single CPU world to 2,048 parallel MJWarp environments, validating parity and measuring aggregate world-steps per second.

## Context

This is the second article in the State of Simulation for Physical AI series. The first article mapped the robot-simulation landscape. This post prepares and scales the simulation environment but does not train a policy. Later posts cover Newton and Isaac Lab integration layers.

## Approach / What changed

The post describes moving an SO-101 follower arm from a single MuJoCo CPU world to as many as 2,048 parallel MJWarp environments on GPU. It covers the core API transition (mjw.put\_model, mjw.put\_data, mjw.step), batching with np.tile for identical starting states, and proper throughput measurement using CUDA Graphs, warm-up, and GPU synchronization. The workflow validates one MuJoCo world, migrates it to MJWarp, forms a batch, verifies parity, and measures aggregate world-steps per second.

## Takeaways

- MJWarp enables parallel simulation of hundreds to thousands of environments on GPU, improving aggregate throughput for reinforcement learning and large-scale sampling.
- The core API transition from MuJoCo to MJWarp is small: use mjw.put\_model, mjw.put\_data, and mjw.step instead of mujoco.mj\_step.
- Proper throughput measurement requires GPU synchronization and warm-up; a naive timer measures queue time, not GPU work.

## FAQ

### What is the difference between MuJoCo and MJWarp?

MuJoCo runs one or a few CPU worlds with low latency per step. MJWarp implements MuJoCo physics on NVIDIA GPUs via Warp, allowing hundreds or thousands of independent worlds to be advanced in a single batched step, improving aggregate throughput for reinforcement learning and large-scale sampling.

### How do I measure MJWarp throughput correctly?

GPU launches are asynchronous, so a naive timer measures queue time, not GPU work. Warm up first to pay compilation costs, then synchronize immediately before and after the timed region. Use wp.synchronize() and time.perf\_counter() to measure actual GPU execution.

### What batch sizes does MJWarp support?

The post demonstrates scaling from 1 to 2,048 parallel environments for an SO-101 arm. The scaling\_study.py script sweeps batch sizes like 1, 64, 1024, 2048, and 8192. Results depend on scene, simulation settings, and hardware; the measured curve shows where additional worlds improve throughput and where memory or compute limits reduce benefit.

**Tags:** [GPU](https://yomu.fyi/topic/gpu), [MuJoCo](https://yomu.fyi/topic/mujoco), [NVIDIA](https://yomu.fyi/topic/nvidia), [Robotics](https://yomu.fyi/topic/robotics), [Warp](https://yomu.fyi/topic/warp)

- Source: [Hugging Face](https://huggingface.co/blog/nvidia/how-to-use-nvidia-warp-and-mjwarp)
- Source URL: https://huggingface.co/blog/nvidia/how-to-use-nvidia-warp-and-mjwarp
- Ingested by Yomu: 2026-09-23T21:00:08.581Z

[Read original post](https://huggingface.co/blog/nvidia/how-to-use-nvidia-warp-and-mjwarp)
