A Python framework for GPU-accelerated simulation, robotics, and machine learning.
A Python framework for GPU-accelerated simulation, robotics, and machine learning.
Warp is a Python framework for GPU-accelerated simulation, robotics, and machine learning. Warp takes regular Python functions and JIT compiles them to efficient kernel code that can run on the CPU or GPU.
Warp comes with a rich set of primitives for physics simulation, robotics, geometry processing, and more. Warp kernels are differentiable and can be used as part of machine-learning pipelines with frameworks such as PyTorch, JAX and Paddle.
Simulate one million particles under gravitational attraction, in 20 lines:
…Warp requires Python 3.10 or newer. We publish warp-lang wheels on PyPI for Windows (x86-64), Linux (x86-64 and AArch64), and macOS (Apple Silicon). The Windows x86-64 and Linux wheels support CPU execution and CUDA acceleration. CUDA acceleration requires a supported NVIDIA GPU and driver. The macOS wheels support CPU execution but not Metal acceleration.
The easiest way to install Warp is from PyPI:
pip install warp-langYou can also use pip install warp-lang[examples] to install additional dependencies for running examples and USD-related features.
For nightly builds, conda, CUDA 13 builds, building from source, and CUDA driver requirements, see the Installation Guide.
The NVIDIA Accelerated Computing Hub also hosts Warp tutorial notebooks that can be opened in Colab:
| Notebook | Colab Link |
|---|---|
| 01. Introduction to NVIDIA Warp | |
| 02. Ising Model | |
| 03. 2D Navier-Stokes Solver | |
| 04. Differentiable Simulations in Warp |
The warp/examples directory contains examples covering physics simulation, geometry processing, optimization, and tile-based GPU programming. Before running examples, install the optional example dependencies using:
pip install warp-lang[examples]On Linux aarch64 systems (e.g., NVIDIA DGX Spark), the [examples] extra automatically installs
usd-exchange instead of usd-core as a drop-in replacement,
since usd-core wheels are not available for that platform.
Examples can be run from the command-line as follows:
python -m warp.examples.<example_subdir>.<example>Most examples can be run on either the CPU or a CUDA-capable device, but a handful require a CUDA-capable device. These are marked at the top of the example script. Some examples generate USD files containing time-sampled animations in the current working directory. These can be viewed in Pixar's UsdView, Blender, or any USD-compatible viewer.
To browse the example source code, you can open the directory where the files are located like this:
python -m warp.examples.browse| dem | fluid | graph capture | mesh |
| nvdb | raycast | raymarch | sample mesh |
| sph | torch | wave | 2-D incompressible turbulence in a periodic box |
| 3-D FDTD Luneburg lens |
| isosurface | sparse marching cubes |
| diffray | fluid checkpoint | particle repulsion | navier-stokes perturbation |
| mlp | nbody | mcgp |
Please see the following resources for additional background on Warp:
Adam and SGD partially update parameters before rejecting a short gradient list
Fix multi-environment nanogrid cell lookup
broadcast_shapes turns a 0 dimension into 1
`wp.static()` around a built-in function raises `AttributeError: 'Function' object has no attribute 'user_overloads'`
Grouped CUDA LBVH can exceed the query stack capacity with 33 AABBs
BVH ray queries miss boxes when rays run along a face
eig3 produces NaN gradients for eigenvalue-only loss at repeated eigenvalues
Adjoint of continue in dynamic for-loops produces wrong gradients for argmax-style reductions
FEM QR routines return NaNs for large float32 matrices
Clarify memory sharing and synchronization in interoperability APIs