Framework
NVIDIA/warp avatar
NVIDIA/warp

NVIDIA Warp: A Python JIT Compiler for GPU Simulation and Differentiable Kernels

A Python framework for GPU-accelerated simulation, robotics, and machine learning.

7,117 stars618 forksPythonApache-2.0

At a glance

What is it?
NVIDIA Warp JIT-compiles Python functions into CUDA or CPU kernels for physics simulation, robotics, and ML pipelines. This review covers its mechanism, setup, limitations, and fit for engineers.
Who is it for?
Adopt Warp if you write Python-based physics or geometry kernels and need GPU speed with automatic differentiation for ML integration. Skip it if you prefer a full physics engine with built-in solvers or require macOS Metal support, which is absent.
Can I use it commercially?
Yes. Apache-2.0 is a permissive licence: you can use, modify and sell software built on it, as long as you keep its copyright and licence notices.
Is it still maintained?
Yes. The repository last received commits 1 day ago.
What is it written in?
Mainly Python, according to GitHub's language statistics.

Answers come from the project's GitHub data, last synced on September 15, 2026, and from our analysis. They are not legal advice.

DEEP OPEN-SOURCE ANALYSIS

What Warp Solves and Who It Targets

Warp addresses a specific pain: Python is slow for numerical loops, but writing CUDA C++ is tedious and breaks the Python workflow. Warp lets you write a Python function decorated with @wp.kernel and have it compiled to efficient CPU or GPU code. The intended users are engineers in simulation, robotics, and machine learning who need custom kernels, not just prebuilt solvers. The README shows a 20-line gravity simulation with one million particles, which signals the performance target. This is not a physics engine with collision detection and constraints out of the box; it is a kernel language and runtime. If your work involves differentiable simulations, Warp's kernels can plug into PyTorch, JAX, or Paddle pipelines, which is a strong draw for research teams.

The JIT Compilation Mechanism

The core mechanism is JIT compilation of Python functions. When you mark a function with @wp.kernel, Warp parses the Python bytecode and generates CUDA or CPU code. Inside the kernel, you use wp.tid() to get the thread index, similar to CUDA's threadIdx.x. Arrays are typed, as in wp.array(rng.normal(size=(num_particles, 3)), dtype=wp.vec3). The kernel operates element-wise on these arrays. The compilation happens at runtime, so the first call incurs a delay. The README does not detail the compilation pipeline, but the presence of an LLVM SDK release tag suggests the backend uses LLVM for code generation. This design means you get native performance without leaving Python, but you also inherit the constraints of a restricted kernel language: no arbitrary Python objects or dynamic control flow inside kernels.

Installation and First Run

Warp requires Python 3.10 or newer. The standard install is pip install warp-lang. For examples and USD support, use pip install warp-lang[examples]. The package name is warp-lang, not warp, which is an important detail for dependency management. The README states that Windows x86-64 and Linux wheels support both CPU and CUDA, while macOS wheels are CPU-only with no Metal acceleration. That is a hard constraint for Apple Silicon users. After install, you can run examples with python -m warp.examples.<example_subdir>.<example>. For instance, python -m warp.examples.core.example_fluid would run a fluid simulation. There is also a browser helper: python -m warp.examples.browse. The README does not show a minimal complete script beyond the kernel definition; you would need to allocate arrays and launch the kernel, which is standard in the documentation.

Differentiability and ML Integration

Warp kernels are differentiable, and the framework is designed to interoperate with PyTorch, JAX, and Paddle. The README mentions this in the opening description, and the tutorial notebooks include a differentiable Navier-Stokes solver. This is a differentiator: most GPU simulation frameworks either are not differentiable or require a separate autodiff system. Warp computes gradients through its own kernels, which means you can backpropagate through a fluid simulation or a rigid-body step. The integration with PyTorch likely involves converting between wp.array and torch tensors, though the README does not specify the exact API. For ML researchers, this removes the need to hand-write gradient passess. However, the differentiation comes with memory and compute overhead, which the documentation does not quantify. You should test gradient performance on your specific workload.

Platform and Hardware Limitations

The most concrete limitation is macOS: no Metal acceleration, only CPU execution. That makes Warp impractical for GPU work on Apple Silicon. On Linux and Windows, CUDA acceleration requires a supported NVIDIA GPU and driver, but the README does not list specific driver versions. There is a separate installation guide for CUDA driver requirements, which you must consult. Another limitation is that some examples require a CUDA-capable device; the README marks these at the top of each script. If you are on a CPU-only machine, those examples will not run. Also, the wheels for Linux AArch64 exist, but the [examples] extra swaps usd-core for usd-exchange because usd-core has no wheels for that platform. This shows platform-specific packaging quirks. For teams using AMD GPUs, there is no mention of ROCm support, so assume it is not available.

Alternatives and How They Differ

The closest alternative is Taichi, another Python-based JIT compiler for GPU kernels. Taichi also uses decorators and compiles to native code, but its syntax and data structures differ. Taichi has its own automatic differentiation and a larger ecosystem for graphics. The key difference is that Warp is built by NVIDIA and likely optimized for CUDA and integration with NVIDIA's libraries, while Taichi supports multiple backends including Vulkan and Metal. If you need macOS GPU support, Taichi might be a better fit. Another alternative is writing raw CUDA kernels with PyCUDA or Numba, which gives you more control but requires manual memory management and lacks Warp's built-in physics primitives. Warp's advantage is its collection of primitives for physics and geometry, which the README mentions but does not enumerate. You should compare the specific primitives you need before choosing.

Maintenance and Licensing

Warp is licensed under Apache-2.0, which is permissive for commercial use. The repository is active, with a recent release v1.16.0 and an LLVM SDK tag, indicating ongoing maintenance. The changelog is linked in the README, so you can track changes. The project is not archived. For upgrade cost, Warp's API may change between minor versions; the changelog is the primary source for breaking changes. The JIT compilation means that upgrading the package can change kernel code generation, which may affect performance or numerical results. You should pin the version in your environment and test after upgrades. The README does not mention a migration guide, so plan for manual review of changelogs. The LLVM SDK release suggests that Warp bundles its own LLVM, which could affect binary size and update frequency.

Editorial conclusion

Adopt Warp if you write Python-based physics or geometry kernels and need GPU speed with automatic differentiation for ML integration. Skip it if you prefer a full physics engine with built-in solvers or require macOS Metal support, which is absent. Before committing, verify your CUDA driver version and test a representative kernel on your target GPU, since CPU-only mode may be too slow for large simulations.

Official sources

  1. Official documentation
  2. Official README
  3. Project repository
  4. Release notes
Community notes

Community notes