How nvidia/warp works
Warp is a Python framework that turns Python kernel functions into CPU- or GPU-executable code for simulation, robotics, geometry processing, and machine learning. A typical user defines kernels and data through the public Python API, launches them on a device, and receives updated arrays; the README also identifies differentiable kernels and framework integration as major capabilities. The graph includes compilation/runtime, autodiff, FEM, geometry, sparse operations, optimization, and rendering. Some subsystem links reflect documented capabilities and tree structure; their detailed internal call wiring was not sampled.
Main entry points: __init__.py Warp API · codegen.py JIT compiler · warp.cpp Native runtime · context.py Device context
Components 19
Python API
- Warp API
warp/__init__.py - Kernel language
warp/_src/lang.py - Types and math
warp/_src/types.py
Kernel Execution
- JIT compiler
warp/_src/codegen.py - Module registry
warp/_src/module_registry.py - Device context
warp/_src/context.py - Native runtime
warp/native/warp.cpp
Simulation Numerics
- Finite elements
warp/_src/fem/integrate.py - Geometry processing
warp/_src/geometry/__init__.py - Sparse operations
warp/_src/sparse.py
Differentiation
- Autodiff tape
warp/_src/tape.py - Autograd
warp/_src/autograd.py - Optimizers
warp/_src/optim/__init__.py
Interoperability
- PyTorch bridge
warp/_src/torch.py - JAX bridge
warp/_src/jax/__init__.py - Paddle bridge
warp/_src/paddle.py - Rendering
warp/_src/render/__init__.py
Other components
- Python user
- CPU or GPU
Connections 19
- Python user → Warp API: uses
- Warp API → Kernel language: defines kernels
- Warp API → Types and math: creates data
- Warp API → Device context: selects device
- Warp API → JIT compiler: launches kernels
- JIT compiler → Module registry: registers code
- JIT compiler → Native runtime: compiles for
- Device context → Native runtime: dispatches execution
- Native runtime → CPU or GPU: executes kernels
- Warp API → Autodiff tape: records launches
- Autodiff tape → Autograd: computes gradients
- Autograd → Optimizers: supports updates
- Warp API → Finite elements: provides FEM
- Warp API → Geometry processing: provides geometry
- Warp API → Sparse operations: provides sparse ops
- PyTorch bridge → Warp API: integrates with
- JAX bridge → Warp API: integrates with
- Paddle bridge → Warp API: integrates with
- Warp API → Rendering: provides rendering