Metadata-Version: 2.4
Name: warp-lang
Version: 1.12.0.dev20260203
Summary: A Python framework for high-performance simulation and graphics programming
Author-email: NVIDIA Corporation <warp-python@nvidia.com>
License: Apache-2.0
Project-URL: Homepage, https://developer.nvidia.com/warp-python
Project-URL: Documentation, https://nvidia.github.io/warp
Project-URL: Repository, https://github.com/NVIDIA/warp
Project-URL: Issues, https://github.com/NVIDIA/warp/issues
Project-URL: Changelog, https://github.com/NVIDIA/warp/blob/main/CHANGELOG.md
Classifier: Development Status :: 5 - Production/Stable
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Science/Research
Classifier: Natural Language :: English
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Environment :: GPU :: NVIDIA CUDA
Classifier: Environment :: GPU :: NVIDIA CUDA :: 12
Classifier: Operating System :: OS Independent
Classifier: Topic :: Scientific/Engineering
Requires-Python: >=3.9
Description-Content-Type: text/markdown
License-File: LICENSE.md
License-File: licenses/Gaia-LICENSE.txt
License-File: licenses/appdirs-LICENSE.txt
License-File: licenses/asset_pixel_jpg-LICENSE.txt
License-File: licenses/cuda-LICENSE.txt
License-File: licenses/dlpack-LICENSE.txt
License-File: licenses/fp16-LICENSE.txt
License-File: licenses/libmathdx-LICENSE.txt
License-File: licenses/llvm-LICENSE.txt
License-File: licenses/moller-LICENSE.txt
License-File: licenses/nanovdb-LICENSE.txt
License-File: licenses/nvrtc-LICENSE.txt
License-File: licenses/svd-LICENSE.txt
License-File: licenses/unittest_parallel-LICENSE.txt
License-File: licenses/usd-LICENSE.txt
License-File: licenses/windingnumber-LICENSE.txt
Requires-Dist: numpy
Provides-Extra: docs
Requires-Dist: nvidia-sphinx-theme; python_version >= "3.9" and extra == "docs"
Requires-Dist: sphinx-copybutton; extra == "docs"
Requires-Dist: pre-commit; extra == "docs"
Requires-Dist: myst_parser; extra == "docs"
Provides-Extra: benchmark
Requires-Dist: usd-core>=25.5; (platform_machine != "aarch64" and python_version < "3.14") and extra == "benchmark"
Requires-Dist: usd-exchange>=2.1.0a3; (python_full_version >= "3.10" and platform_machine == "aarch64") and extra == "benchmark"
Provides-Extra: examples
Requires-Dist: blosc>=1.11.1; extra == "examples"
Requires-Dist: matplotlib>=3.7.5; extra == "examples"
Requires-Dist: pillow>=10.4.0; extra == "examples"
Requires-Dist: psutil>=7.1.0; extra == "examples"
Requires-Dist: pyglet>=2.1.9; extra == "examples"
Requires-Dist: usd-core>=25.5; (platform_machine != "aarch64" and python_version < "3.14") and extra == "examples"
Requires-Dist: usd-exchange>=2.1.0a3; (python_full_version >= "3.10" and platform_machine == "aarch64") and extra == "examples"
Provides-Extra: torch-cu12
Requires-Dist: warp-lang[examples]; extra == "torch-cu12"
Requires-Dist: torch>=2.7.0; python_version >= "3.9" and extra == "torch-cu12"
Provides-Extra: dev
Requires-Dist: warp-lang[examples]; extra == "dev"
Requires-Dist: warp-lang[docs]; extra == "dev"
Requires-Dist: nvtx; extra == "dev"
Requires-Dist: coverage[toml]; extra == "dev"
Dynamic: license-file

[![PyPI version](https://badge.fury.io/py/warp-lang.svg)](https://badge.fury.io/py/warp-lang)
[![License](https://img.shields.io/badge/License-Apache_2.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)
![GitHub commit activity](https://img.shields.io/github/commit-activity/m/NVIDIA/warp?link=https%3A%2F%2Fgithub.com%2FNVIDIA%2Fwarp%2Fcommits%2Fmain)
[![Downloads](https://static.pepy.tech/badge/warp-lang/month)](https://pepy.tech/project/warp-lang)
[![codecov](https://codecov.io/github/NVIDIA/warp/graph/badge.svg?token=7O1KSM79FG)](https://codecov.io/github/NVIDIA/warp)
![GitHub - CI](https://github.com/NVIDIA/warp/actions/workflows/ci.yml/badge.svg)

# NVIDIA Warp

Warp is a Python framework for writing high-performance simulation and graphics code. Warp takes
regular Python functions and JIT compiles them to efficient kernel code that can run on the CPU or GPU.

Warp is designed for [spatial computing](https://en.wikipedia.org/wiki/Spatial_computing)
and comes with a rich set of primitives that make it easy to write
programs for physics simulation, perception, robotics, and geometry processing. In addition, Warp kernels
are differentiable and can be used as part of machine-learning pipelines with frameworks such as PyTorch, JAX and Paddle.

Please refer to the project [Documentation](https://nvidia.github.io/warp/) for API and language reference and
[CHANGELOG.md](https://github.com/NVIDIA/warp/blob/main/CHANGELOG.md) for release history.

A selection of physical simulations computed with Warp

## Installing

Python version 3.9 or newer is recommended. Warp can run on x86-64 and ARMv8 CPUs on Windows, Linux, and macOS.
GPU support requires a CUDA-capable NVIDIA GPU and driver (minimum GeForce GTX 9xx).

The easiest way to install Warp is from [PyPI](https://pypi.org/project/warp-lang/):

```text
pip install warp-lang
```

You can also use `pip install warp-lang[examples]` to install additional dependencies for running examples and USD-related features.

The binaries hosted on PyPI are currently built with the CUDA 12 runtime.
We also provide binaries built with the CUDA 13.0 runtime on the [GitHub Releases](https://github.com/NVIDIA/warp/releases) page.
Copy the URL of the appropriate wheel file (`warp-lang-{ver}+cu13-py3-none-{platform}.whl`) and pass it to
the `pip install` command, e.g.

| Platform        | Install Command                                                                                                               |
| --------------- | ----------------------------------------------------------------------------------------------------------------------------- |
| Linux aarch64   | `pip install https://github.com/NVIDIA/warp/releases/download/v1.11.0/warp_lang-1.11.0+cu13-py3-none-manylinux_2_34_aarch64.whl` |
| Linux x86-64    | `pip install https://github.com/NVIDIA/warp/releases/download/v1.11.0/warp_lang-1.11.0+cu13-py3-none-manylinux_2_28_x86_64.whl`  |
| Windows x86-64  | `pip install https://github.com/NVIDIA/warp/releases/download/v1.11.0/warp_lang-1.11.0+cu13-py3-none-win_amd64.whl`             |

The `--force-reinstall` option may need to be used to overwrite a previous installation.

### Nightly Builds

Nightly builds of Warp from the `main` branch are available on the [NVIDIA Package Index](https://pypi.nvidia.com/warp-lang/).

To install the latest nightly build, use the following command:

```text
pip install -U --pre warp-lang --extra-index-url=https://pypi.nvidia.com/
```

Note that the nightly builds are built with the CUDA 12 runtime and are not published for macOS.

If you plan to install nightly builds regularly, you can simplify future installations by adding NVIDIA's package
repository as an extra index via the `PIP_EXTRA_INDEX_URL` environment variable. For example:

```text
export PIP_EXTRA_INDEX_URL="https://pypi.nvidia.com"
```

This ensures the index is automatically used for `pip` commands, avoiding the need to specify it explicitly.

### CUDA Requirements

* Warp packages built with CUDA Toolkit 12.x require NVIDIA driver 525 or newer.
* Warp packages built with CUDA Toolkit 13.x require NVIDIA driver 580 or newer.

This applies to pre-built packages distributed on PyPI and GitHub and also when building Warp from source.

Note that building Warp with the `--quick` flag changes the driver requirements.  The quick build skips CUDA backward compatibility, so the minimum required driver is determined by the CUDA Toolkit version.  Refer to the [latest CUDA Toolkit release notes](https://docs.nvidia.com/cuda/cuda-toolkit-release-notes/index.html) to find the minimum required driver for different CUDA Toolkit versions (e.g., [this table from CUDA Toolkit 12.6](https://docs.nvidia.com/cuda/archive/12.6.0/cuda-toolkit-release-notes/index.html#id5)).

Warp checks the installed driver during initialization and will report a warning if the driver is not suitable, e.g.:

```text
Warp UserWarning:
   Insufficient CUDA driver version.
   The minimum required CUDA driver version is 12.0, but the installed CUDA driver version is 11.8.
   Visit https://github.com/NVIDIA/warp/blob/main/README.md#installing for guidance.
```

This will make CUDA devices unavailable, but the CPU can still be used.

To remedy the situation there are a few options:

* Update the driver.
* Install a compatible pre-built Warp package.
* Build Warp from source using a CUDA Toolkit that's compatible with the installed driver.

## Tutorial Notebooks

The [NVIDIA Accelerated Computing Hub](https://github.com/NVIDIA/accelerated-computing-hub) contains the current,
actively maintained set of Warp tutorials:

| Notebook | Colab Link |
|----------|------------|
| [Introduction to NVIDIA Warp](https://github.com/NVIDIA/accelerated-computing-hub/blob/32fe3d5a448446fd52c14a6726e1b867cbfed2d9/Accelerated_Python_User_Guide/notebooks/Chapter_12_Intro_to_NVIDIA_Warp.ipynb) | [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/NVIDIA/accelerated-computing-hub/blob/32fe3d5a448446fd52c14a6726e1b867cbfed2d9/Accelerated_Python_User_Guide/notebooks/Chapter_12_Intro_to_NVIDIA_Warp.ipynb) |
| [GPU-Accelerated Ising Model Simulation in NVIDIA Warp](https://github.com/NVIDIA/accelerated-computing-hub/blob/32fe3d5a448446fd52c14a6726e1b867cbfed2d9/Accelerated_Python_User_Guide/notebooks/Chapter_12.1_IsingModel_In_Warp.ipynb) | [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/NVIDIA/accelerated-computing-hub/blob/32fe3d5a448446fd52c14a6726e1b867cbfed2d9/Accelerated_Python_User_Guide/notebooks/Chapter_12.1_IsingModel_In_Warp.ipynb) |

Additionally, several notebooks in the [notebooks](https://github.com/NVIDIA/warp/tree/main/notebooks) directory
provide additional examples and cover key Warp features:

| Notebook | Colab Link |
|----------|------------|
| [Warp Core Tutorial: Basics](https://github.com/NVIDIA/warp/blob/main/notebooks/core_01_basics.ipynb) | [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/NVIDIA/warp/blob/main/notebooks/core_01_basics.ipynb) |
| [Warp Core Tutorial: Generics](https://github.com/NVIDIA/warp/blob/main/notebooks/core_02_generics.ipynb) | [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/NVIDIA/warp/blob/main/notebooks/core_02_generics.ipynb) |
| [Warp Core Tutorial: Points](https://github.com/NVIDIA/warp/blob/main/notebooks/core_03_points.ipynb) | [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/NVIDIA/warp/blob/main/notebooks/core_03_points.ipynb) |
| [Warp Core Tutorial: Meshes](https://github.com/NVIDIA/warp/blob/main/notebooks/core_04_meshes.ipynb) | [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/NVIDIA/warp/blob/main/notebooks/core_04_meshes.ipynb) |
| [Warp Core Tutorial: Volumes](https://github.com/NVIDIA/warp/blob/main/notebooks/core_05_volumes.ipynb) | [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/NVIDIA/warp/blob/main/notebooks/core_05_volumes.ipynb) |
| [Warp PyTorch Tutorial: Basics](https://github.com/NVIDIA/warp/blob/main/notebooks/pytorch_01_basics.ipynb) | [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/NVIDIA/warp/blob/main/notebooks/pytorch_01_basics.ipynb) |
| [Warp PyTorch Tutorial: Custom Operators](https://github.com/NVIDIA/warp/blob/main/notebooks/pytorch_02_custom_operators.ipynb) | [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/NVIDIA/warp/blob/main/notebooks/pytorch_02_custom_operators.ipynb) |

## Running Examples

The [warp/examples](https://github.com/NVIDIA/warp/tree/main/warp/examples) directory contains a number of scripts categorized under subdirectories
that show how to implement various simulation methods using the Warp API.
Most examples will generate USD files containing time-sampled animations in the current working directory.
Before running examples, users should ensure that the ``usd-core``, ``matplotlib``, and ``pyglet`` packages are installed using:

```text
pip install warp-lang[extras]
```

These dependencies can also be manually installed using:

```text
pip install usd-core matplotlib pyglet
```

Examples can be run from the command-line as follows:

```text
python -m warp.examples.<example_subdir>.<example>
```

To browse the example source code, you can open the directory where the files are located like this:

```text
python -m warp.examples.browse
```

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.

USD files can be viewed or rendered inside [NVIDIA Omniverse](https://developer.nvidia.com/omniverse), Pixar's UsdView, and Blender. Note that Preview in macOS is not recommended as it has limited support for time-sampled animations.

Built-in unit tests can be run from the command-line as follows:

```text
python -m warp.tests
```

### warp/examples/core

             dem
             fluid
             graph capture
             marching cubes

             mesh
             nvdb
             raycast
             raymarch

             sample mesh
             sph
             torch
             wave

### warp/examples/fem

             diffusion 3d
             mixed elasticity
             apic fluid
             streamlines

             distortion energy
             navier stokes
             burgers
             magnetostatics

             adaptive grid
             nonconforming contact
             darcy level-set optimization
             elastic shape optimization

### warp/examples/optim

             diffray
             fluid checkpoint
             particle repulsion

### warp/examples/tile

             mlp
             nbody
             mcgp

## Building

For developers who want to build the library themselves, the following tools are required:

* Microsoft Visual Studio 2019 upwards (Windows)
* GCC 9.4 upwards (Linux)
* CUDA Toolkit 12.0 or higher
* [Git LFS](https://git-lfs.github.com/) installed

After cloning the repository, users should run:

```text
python build_lib.py
```

Upon success, the script will output platform-specific binary files in `warp/bin/`.
The build script will look for the CUDA Toolkit in its default installation path.
This path can be overridden by setting the `CUDA_PATH` environment variable. Alternatively,
the path to the CUDA Toolkit can be passed to the build command as
`--cuda_path="..."`. After building, the Warp package should be installed using:

```text
pip install -e .
```

This ensures that subsequent modifications to the library will be reflected in the Python package.

## Learn More

Please see the following resources for additional background on Warp:

* [Product Page](https://developer.nvidia.com/warp-python)
* [SIGGRAPH 2024 Course Slides](https://dl.acm.org/doi/10.1145/3664475.3664543)
* [GTC 2024 Presentation](https://www.nvidia.com/en-us/on-demand/session/gtc24-s63345/)
* [GTC 2022 Presentation](https://www.nvidia.com/en-us/on-demand/session/gtcspring22-s41599)
* [GTC 2021 Presentation](https://www.nvidia.com/en-us/on-demand/session/gtcspring21-s31838)
* [SIGGRAPH Asia 2021 Differentiable Simulation Course](https://dl.acm.org/doi/abs/10.1145/3476117.3483433)

The underlying technology in Warp has been used in a number of research projects at NVIDIA including the following publications:

* Accelerated Policy Learning with Parallel Differentiable Simulation - Xu, J., Makoviychuk, V., Narang, Y., Ramos, F., Matusik, W., Garg, A., & Macklin, M. [(2022)](https://short-horizon-actor-critic.github.io)
* DiSECt: Differentiable Simulator for Robotic Cutting - Heiden, E., Macklin, M., Narang, Y., Fox, D., Garg, A., & Ramos, F [(2021)](https://github.com/NVlabs/DiSECt)
* gradSim: Differentiable Simulation for System Identification and Visuomotor Control - Murthy, J. Krishna, Miles Macklin, Florian Golemo, Vikram Voleti, Linda Petrini, Martin Weiss, Breandan Considine et al. [(2021)](https://gradsim.github.io)

## Frequently Asked Questions

See the [FAQ](https://nvidia.github.io/warp/faq.html) in the Warp documentation.

## Support

Problems, questions, and feature requests can be opened on [GitHub Issues](https://github.com/NVIDIA/warp/issues).

For inquiries not suited for GitHub Issues, please email warp-python@nvidia.com.

## Versioning

Versions take the format X.Y.Z, similar to [Python itself](https://devguide.python.org/developer-workflow/development-cycle/#devcycle):

* Increments in X are reserved for major reworks of the project causing disruptive incompatibility (or reaching the 1.0 milestone).
* Increments in Y are for regular releases with a new set of features.
* Increments in Z are for bug fixes. In principle, there are no new features. Can be omitted if 0 or not relevant.

This is similar to [Semantic Versioning](https://semver.org/) but is less strict regarding backward compatibility.
Like with Python, some breaking changes can be present between minor versions if well-documented and gradually introduced.

Note that prior to 0.11.0, this schema was not strictly adhered to.

## License

Warp is provided under the Apache License, Version 2.0.
Please see [LICENSE.md](https://github.com/NVIDIA/warp/blob/main/LICENSE.md) for full license text.

This project will download and install additional third-party open source software projects.
Review the license terms of these open source projects before use.

## Contributing

Contributions and pull requests from the community are welcome.
Please see the [Contribution Guide](https://nvidia.github.io/warp/user_guide/contribution_guide.html) for more
information on contributing to the development of Warp.

## Publications & Citation

### Research Using Warp

Our [PUBLICATIONS.md](https://github.com/NVIDIA/warp/blob/main/PUBLICATIONS.md) file lists academic and research
publications that leverage the capabilities of Warp.
We encourage you to add your own published work using Warp to this list.

### Citing Warp

To cite Warp itself in your own publications, please use the following BibTeX entry:

```bibtex
@misc{warp2022,
  title        = {Warp: A High-performance Python Framework for GPU Simulation and Graphics},
  author       = {Miles Macklin},
  month        = {March},
  year         = {2022},
  note         = {NVIDIA GPU Technology Conference (GTC)},
  howpublished = {\url{https://github.com/nvidia/warp}}
}
```
