https://github.com/NVIDIA/warp Skip to content Navigation Menu Toggle navigation Sign in * Product + Actions Automate any workflow + Packages Host and manage packages + Security Find and fix vulnerabilities + Codespaces Instant dev environments + GitHub Copilot Write better code with AI + Code review Manage code changes + Issues Plan and track work + Discussions Collaborate outside of code Explore + All features + Documentation + GitHub Skills + Blog * Solutions For + Enterprise + Teams + Startups + Education By Solution + CI/CD & Automation + DevOps + DevSecOps Resources + Learning Pathways + White papers, Ebooks, Webinars + Customer Stories + Partners * Open Source + GitHub Sponsors Fund open source developers + The ReadME Project GitHub community articles Repositories + Topics + Trending + Collections * Enterprise + Enterprise platform AI-powered developer platform Available add-ons + Advanced Security Enterprise-grade security features + GitHub Copilot Enterprise-grade AI features + Premium Support Enterprise-grade 24/7 support * Pricing Search or jump to... Search code, repositories, users, issues, pull requests... Search [ ] Clear Search syntax tips Provide feedback We read every piece of feedback, and take your input very seriously. [ ] [ ] Include my email address so I can be contacted Cancel Submit feedback Saved searches Use saved searches to filter your results more quickly Name [ ] Query [ ] To see all available qualifiers, see our documentation. Cancel Create saved search Sign in Sign up You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session. Dismiss alert {{ message }} NVIDIA / warp Public * Notifications You must be signed in to change notification settings * Fork 156 * Star 2.2k * A Python framework for high performance GPU simulation and graphics nvidia.github.io/warp/ License View license 2.2k stars 156 forks Branches Tags Activity Star Notifications You must be signed in to change notification settings * Code * Issues 35 * Pull requests 7 * Discussions * Actions * Security * Insights Additional navigation options * Code * Issues * Pull requests * Discussions * Actions * Security * Insights NVIDIA/warp This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository. main BranchesTags Go to file Code Folders and files Last commit Last Name Name message commit date Latest commit History 3,290 Commits .github .github .gitlab .gitlab deps deps docs docs exts exts licenses licenses tools tools warp warp .gitattributes .gitattributes .gitignore .gitignore .gitlab-ci.yml .gitlab-ci.yml .pre-commit-config.yaml .pre-commit-config.yaml CHANGELOG.md CHANGELOG.md CONTRIBUTING.md CONTRIBUTING.md LICENSE.md LICENSE.md PACKAGING.md PACKAGING.md README.md README.md SECURITY.md SECURITY.md VERSION.md VERSION.md build_docs.py build_docs.py build_lib.py build_lib.py build_llvm.py build_llvm.py pyproject.toml pyproject.toml repo.toml repo.toml setup.py setup.py View all files Repository files navigation * README * License * Security PyPI version GitHub commit activity Downloads codecov GitHub - Build and Test Discord 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 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 and JAX. Please refer to the project Documentation for API and language reference and CHANGELOG.md for release history. [header] 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: pip install warp-lang You can also use pip install warp-lang[extras] to install additional dependencies for running examples and USD-related features. The binaries hosted on PyPI are currently built with the CUDA 11.8 runtime. We provide binaries built with the CUDA 12.5 runtime on the GitHub Releases page. Copy the URL of the appropriate wheel file (warp-lang-{ver}+cu12-py3-none-{platform}.whl) and pass it to the pip install command, e.g. pip install https://github.com/NVIDIA/warp/releases/download/v1.2.0/warp_lang-1.2.0+cu12-py3-none-manylinux2014_x86_64.whl The --force-reinstall option may need to be used to overwrite a previous installation. Getting Started An example first program that computes the lengths of random 3D vectors is given below: import warp as wp import numpy as np num_points = 1024 @wp.kernel def length(points: wp.array(dtype=wp.vec3), lengths: wp.array(dtype=float)): # thread index tid = wp.tid() # compute distance of each point from origin lengths[tid] = wp.length(points[tid]) # allocate an array of 3d points points = wp.array(np.random.rand(num_points, 3), dtype=wp.vec3) lengths = wp.zeros(num_points, dtype=float) # launch kernel wp.launch(kernel=length, dim=len(points), inputs=[points, lengths]) print(lengths) Running Examples The warp/examples directory contains a number of scripts categorized under different subdirectories that show how to implement different simulation methods using the Warp API. Most examples will generate USD files containing time-sampled animations (stored in the current working directory). Before running examples, users should ensure that the usd-core, matplotlib, and pyglet packages are installed using: pip install usd-core matplotlib pyglet Examples can be run from the command-line as follows: python -m warp.examples.. To browse the example source code, you can open the directory where the files are located like this: 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, 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: python -m warp.tests examples/core [core_dem] [core_fluid] [core_graph] [core_march] dem fluid graph capture marching cubes [core_mesh] [core_nvdb] [core_rayca] [core_rayma] mesh nvdb raycast raymarch [core_sph] [core_torch] [core_wave] sph torch wave examples/fem [fem_apic_f] [fem_convec] [fem_diffus] [fem_diffus] apic fluid convection diffusion diffusion 3d diffusion [fem_mixed_] [fem_navier] [fem_stokes] [fem_stokes] mixed elasticity navier stokes stokes transfer stokes examples/optim [optim_boun] [optim_clot] [optim_diff] [optim_dron] bounce cloth throw diffray drone [optim_inve] [optim_spri] [optim_traj] [optim_walk] inverse kinematics spring cage trajectory walker examples/sim [sim_cartpo] [sim_cloth] [sim_granul] [sim_granul] cartpole cloth granular granular collision sdf [sim_jacobi] [sim_quadru] [sim_rigid_] [sim_rigid_] jacobian ik quadruped rigid chain rigid contact [sim_rigid_] [sim_rigid_] [sim_rigid_] [sim_soft_b] rigid force rigid gyroscopic rigid soft soft body contact 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 11.5 or higher * Git LFS installed After cloning the repository, users should run: python build_lib.py This will generate the warp.dll / warp.so core library respectively. It will search for the CUDA Toolkit in the default install directory. 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: 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 * GTC 2022 Presentation * GTC 2021 Presentation * SIGGRAPH Asia 2021 Differentiable Simulation Course * GTC 2024 Presentation 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) * DiSECt: Differentiable Simulator for Robotic Cutting - Heiden, E., Macklin, M., Narang, Y., Fox, D., Garg, A., & Ramos, F (2021) * 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) Frequently Asked Questions See the FAQ in the Warp documentation. Support Problems, questions, and feature requests can be opened on GitHub Issues. The Warp team also monitors the #warp channel on the public Omniverse Discord server, come chat to us! Versioning Versions take the format X.Y.Z, similar to Python itself: * 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 but less strict around 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 NVIDIA Software License, please see LICENSE.md for full license text. Contributing Contributions and pull requests from the community are welcome and are taken under the terms described in the 9. Feedback section of the license. CONTRIBUTING.md provides additional information on how to open a pull request for Warp. Citing If you use Warp in your research please use the following citation: @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}} } About A Python framework for high performance GPU simulation and graphics nvidia.github.io/warp/ Resources Readme License View license Security policy Security policy Activity Custom properties Stars 2.2k stars Watchers 48 watching Forks 156 forks Report repository Releases 21 v1.2.1 Latest Jun 14, 2024 + 20 releases Packages 0 No packages published Contributors 25 * @mmacklin * @christophercrouzet * @shi-eric * @c0d1f1ed * @eric-heiden * @nvlukasz * @daedalus5 * @gdaviet * @actions-user * @jackkosaian * @nchentanez * @cadop * @daniela-hasenbring * @ArthurAllshire + 11 contributors Languages * Python 71.8% * C++ 19.5% * Cuda 4.6% * C 4.1% Footer (c) 2024 GitHub, Inc. Footer navigation * Terms * Privacy * Security * Status * Docs * Contact * Manage cookies * Do not share my personal information You can't perform that action at this time.