warp-lang-1.9.1


توضیحات

A Python framework for high-performance simulation and graphics programming
ویژگی مقدار
سیستم عامل OS Independent
نام فایل warp-lang-1.9.1
نام warp-lang
نسخه کتابخانه 1.9.1
نگهدارنده []
ایمیل نگهدارنده []
نویسنده -
ایمیل نویسنده NVIDIA Corporation <warp-python@nvidia.com>
آدرس صفحه اصلی -
آدرس اینترنتی https://pypi.org/project/warp-lang/
مجوز Apache-2.0
[![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 **[Documentation](https://nvidia.github.io/warp/)** | [Changelog](https://github.com/NVIDIA/warp/blob/main/CHANGELOG.md) 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. <div align="center"> <img src="https://github.com/NVIDIA/warp/raw/main/docs/img/header.jpg"> <p><i>A selection of physical simulations computed with Warp</i></p> </div> ## Quick Start Simulate one million particles under gravitational attraction, in 20 lines: ```python import warp as wp import numpy as np num_particles = 1_000_000 dt = 0.01 @wp.kernel def gravity_step(pos: wp.array[wp.vec3], vel: wp.array[wp.vec3]): i = wp.tid() position = pos[i] dist_sq = wp.length_sq(position) + 0.01 # softened distance acc = -1000.0 / dist_sq * wp.normalize(position) # gravitational pull toward origin vel[i] = vel[i] + acc * dt pos[i] = pos[i] + vel[i] * dt rng = np.random.default_rng(42) positions = wp.array(rng.normal(size=(num_particles, 3)), dtype=wp.vec3) velocities = wp.array(rng.normal(size=(num_particles, 3)), dtype=wp.vec3) for _ in range(100): wp.launch(gravity_step, dim=num_particles, inputs=[positions, velocities]) print(positions.numpy()) ``` ## Installing Python version 3.9 or newer is required. Warp can run on x86-64 and ARMv8 CPUs on Windows and Linux, and on Apple Silicon (ARMv8) on 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. For nightly builds, conda, CUDA 13 builds, building from source, and CUDA driver requirements, see the [Installation Guide](https://nvidia.github.io/warp/user_guide/installation.html). ## 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 examples covering physics simulation, geometry processing, optimization, and tile-based GPU programming. Before running examples, install the optional example dependencies using: ```text pip install warp-lang[examples] ``` On Linux aarch64 systems (e.g., NVIDIA DGX Spark), the `[examples]` extra automatically installs [`usd-exchange`](https://pypi.org/project/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: ```text 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: ```text python -m warp.examples.browse ``` ### warp/examples/core <table> <tbody> <tr> <td width="25%"><a href="https://github.com/NVIDIA/warp/blob/main/warp/examples/core/example_dem.py"><img src="https://media.githubusercontent.com/media/NVIDIA/warp/refs/heads/main/docs/img/examples/core_dem.png"></a></td> <td width="25%"><a href="https://github.com/NVIDIA/warp/blob/main/warp/examples/core/example_fluid.py"><img src="https://media.githubusercontent.com/media/NVIDIA/warp/refs/heads/main/docs/img/examples/core_fluid.png"></a></td> <td width="25%"><a href="https://github.com/NVIDIA/warp/blob/main/warp/examples/core/example_graph_capture.py"><img src="https://media.githubusercontent.com/media/NVIDIA/warp/refs/heads/main/docs/img/examples/core_graph_capture.png"></a></td> <td width="25%"><a href="https://github.com/NVIDIA/warp/blob/main/warp/examples/core/example_marching_cubes.py"><img src="https://media.githubusercontent.com/media/NVIDIA/warp/refs/heads/main/docs/img/examples/core_marching_cubes.png"></a></td> </tr> <tr> <td align="center">dem</td> <td align="center">fluid</td> <td align="center">graph capture</td> <td align="center">marching cubes</td> </tr> <tr> <td width="25%"><a href="https://github.com/NVIDIA/warp/blob/main/warp/examples/core/example_mesh.py"><img src="https://media.githubusercontent.com/media/NVIDIA/warp/refs/heads/main/docs/img/examples/core_mesh.png"></a></td> <td width="25%"><a href="https://github.com/NVIDIA/warp/blob/main/warp/examples/core/example_nvdb.py"><img src="https://media.githubusercontent.com/media/NVIDIA/warp/refs/heads/main/docs/img/examples/core_nvdb.png"></a></td> <td width="25%"><a href="https://github.com/NVIDIA/warp/blob/main/warp/examples/core/example_raycast.py"><img src="https://media.githubusercontent.com/media/NVIDIA/warp/refs/heads/main/docs/img/examples/core_raycast.png"></a></td> <td width="25%"><a href="https://github.com/NVIDIA/warp/blob/main/warp/examples/core/example_raymarch.py"><img src="https://media.githubusercontent.com/media/NVIDIA/warp/refs/heads/main/docs/img/examples/core_raymarch.png"></a></td> </tr> <tr> <td align="center">mesh</td> <td align="center">nvdb</td> <td align="center">raycast</td> <td align="center">raymarch</td> </tr> <tr> <td width="25%"><a href="https://github.com/NVIDIA/warp/blob/main/warp/examples/core/example_sample_mesh.py"><img src="https://media.githubusercontent.com/media/NVIDIA/warp/refs/heads/main/docs/img/examples/core_sample_mesh.png"></a></td> <td width="25%"><a href="https://github.com/NVIDIA/warp/blob/main/warp/examples/core/example_sph.py"><img src="https://media.githubusercontent.com/media/NVIDIA/warp/refs/heads/main/docs/img/examples/core_sph.png"></a></td> <td width="25%"><a href="https://github.com/NVIDIA/warp/blob/main/warp/examples/core/example_torch.py"><img src="https://media.githubusercontent.com/media/NVIDIA/warp/refs/heads/main/docs/img/examples/core_torch.png"></a></td> <td width="25%"><a href="https://github.com/NVIDIA/warp/blob/main/warp/examples/core/example_wave.py"><img src="https://media.githubusercontent.com/media/NVIDIA/warp/refs/heads/main/docs/img/examples/core_wave.png"></a></td> </tr> <tr> <td align="center">sample mesh</td> <td align="center">sph</td> <td align="center">torch</td> <td align="center">wave</td> </tr> <tr> <td width="25%"><a href="https://github.com/NVIDIA/warp/blob/main/warp/examples/core/example_fft_poisson_navier_stokes_2d.py"><img src="https://media.githubusercontent.com/media/NVIDIA/warp/refs/heads/main/docs/img/examples/core_fft_poisson_navier_stokes_2d.png"></a></td> </tr> <tr> <td align="center">2-D incompressible turbulence in a periodic box</td> </tr> </tbody> </table> ### warp/examples/fem <table> <tbody> <tr> <td width="25%"><a href="https://github.com/NVIDIA/warp/blob/main/warp/examples/fem/example_diffusion_3d.py"><img src="https://media.githubusercontent.com/media/NVIDIA/warp/refs/heads/main/docs/img/examples/fem_diffusion_3d.png"></a></td> <td width="25%"><a href="https://github.com/NVIDIA/warp/blob/main/warp/examples/fem/example_mixed_elasticity.py"><img src="https://media.githubusercontent.com/media/NVIDIA/warp/refs/heads/main/docs/img/examples/fem_mixed_elasticity.png"></a></td> <td width="25%"><a href="https://github.com/NVIDIA/warp/blob/main/warp/examples/fem/example_apic_fluid.py"><img src="https://media.githubusercontent.com/media/NVIDIA/warp/refs/heads/main/docs/img/examples/fem_apic_fluid.png"></a></td> <td width="25%"><a href="https://github.com/NVIDIA/warp/blob/main/warp/examples/fem/example_streamlines.py"><img src="https://media.githubusercontent.com/media/NVIDIA/warp/refs/heads/main/docs/img/examples/fem_streamlines.png"></a></td> </tr> <tr> <td align="center">diffusion 3d</td> <td align="center">mixed elasticity</td> <td align="center">apic fluid</td> <td align="center">streamlines</td> </tr> <tr> <td width="25%"><a href="https://github.com/NVIDIA/warp/blob/main/warp/examples/fem/example_distortion_energy.py"><img src="https://media.githubusercontent.com/media/NVIDIA/warp/refs/heads/main/docs/img/examples/fem_distortion_energy.png"></a></td> <td width="25%"><a href="https://github.com/NVIDIA/warp/blob/main/warp/examples/fem/example_taylor_green.py"><img src="https://media.githubusercontent.com/media/NVIDIA/warp/refs/heads/main/docs/img/examples/fem_taylor_green.png"></a></td> <td width="25%"><a href="https://github.com/NVIDIA/warp/blob/main/warp/examples/fem/example_kelvin_helmholtz.py"><img src="https://media.githubusercontent.com/media/NVIDIA/warp/refs/heads/main/docs/img/examples/fem_kelvin_helmholtz.png"></a></td> <td width="25%"><a href="https://github.com/NVIDIA/warp/blob/main/warp/examples/fem/example_magnetostatics.py"><img src="https://media.githubusercontent.com/media/NVIDIA/warp/refs/heads/main/docs/img/examples/fem_magnetostatics.png"></a></td> </tr> <tr> <td align="center">distortion energy</td> <td align="center">taylor green</td> <td align="center">kelvin helmholtz</td> <td align="center">magnetostatics</td> </tr> <tr> <td width="25%"><a href="https://github.com/NVIDIA/warp/blob/main/warp/examples/fem/example_adaptive_grid.py"><img src="https://media.githubusercontent.com/media/NVIDIA/warp/refs/heads/main/docs/img/examples/fem_adaptive_grid.png"></a></td> <td width="25%"><a href="https://github.com/NVIDIA/warp/blob/main/warp/examples/fem/example_nonconforming_contact.py"><img src="https://media.githubusercontent.com/media/NVIDIA/warp/refs/heads/main/docs/img/examples/fem_nonconforming_contact.png"></a></td> <td width="25%"><a href="https://github.com/NVIDIA/warp/blob/main/warp/examples/fem/example_darcy_ls_optimization.py"><img src="https://media.githubusercontent.com/media/NVIDIA/warp/refs/heads/main/docs/img/examples/fem_darcy_ls_optimization.png"></a></td> <td width="25%"><a href="https://github.com/NVIDIA/warp/blob/main/warp/examples/fem/example_elastic_shape_optimization.py"><img src="https://media.githubusercontent.com/media/NVIDIA/warp/refs/heads/main/docs/img/examples/fem_elastic_shape_optimization.png"></a></td> </tr> <tr> <td align="center">adaptive grid</td> <td align="center">nonconforming contact</td> <td align="center">darcy level-set optimization</td> <td align="center">elastic shape optimization</td> </tr> </tbody> </table> ### warp/examples/optim <table> <tbody> <tr> <td width="25%"><a href="https://github.com/NVIDIA/warp/blob/main/warp/examples/optim/example_diffray.py"><img src="https://media.githubusercontent.com/media/NVIDIA/warp/refs/heads/main/docs/img/examples/optim_diffray.png"></a></td> <td width="25%"><a href="https://github.com/NVIDIA/warp/blob/main/warp/examples/optim/example_fluid_checkpoint.py"><img src="https://media.githubusercontent.com/media/NVIDIA/warp/refs/heads/main/docs/img/examples/optim_fluid_checkpoint.png"></a></td> <td width="25%"><a href="https://github.com/NVIDIA/warp/blob/main/warp/examples/optim/example_particle_repulsion.py"><img src="https://media.githubusercontent.com/media/NVIDIA/warp/refs/heads/main/docs/img/examples/optim_particle_repulsion.png"></a></td> <td width="25%"><a href="https://github.com/NVIDIA/warp/blob/main/warp/examples/optim/example_navier_stokes_perturbation.py"><img src="https://media.githubusercontent.com/media/NVIDIA/warp/refs/heads/main/docs/img/examples/optim_navier_stokes_perturbation.png"></a></td> </tr> <tr> <td align="center">diffray</td> <td align="center">fluid checkpoint</td> <td align="center">particle repulsion</td> <td align="center">navier-stokes perturbation</td> </tr> </tbody> </table> ### warp/examples/tile <table> <tbody> <tr> <td width="25%"><a href="https://github.com/NVIDIA/warp/blob/main/warp/examples/tile/example_tile_mlp.py"><img src="https://media.githubusercontent.com/media/NVIDIA/warp/refs/heads/main/docs/img/examples/tile_mlp.png"></a></td> <td width="25%"><a href="https://github.com/NVIDIA/warp/blob/main/warp/examples/tile/example_tile_nbody.py"><img src="https://media.githubusercontent.com/media/NVIDIA/warp/refs/heads/main/docs/img/examples/tile_nbody.png"></a></td> <td width="25%"><a href="https://github.com/NVIDIA/warp/blob/main/warp/examples/tile/example_tile_mcgp.py"><img src="https://media.githubusercontent.com/media/NVIDIA/warp/refs/heads/main/docs/img/examples/tile_mcgp.png"></a></td> <td width="25%"></td> </tr> <tr> <td align="center">mlp</td> <td align="center">nbody</td> <td align="center">mcgp</td> <td align="center"></td> </tr> </tbody> </table> ## 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) ## Support See the [FAQ](https://nvidia.github.io/warp/user_guide/faq.html) for common questions. 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>. ## 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. ## 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. ## 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 If you use Warp in your research, please use the "Cite this repository" button on the [GitHub repository](https://github.com/NVIDIA/warp) page or refer to the [CITATION.cff](https://github.com/NVIDIA/warp/blob/main/CITATION.cff) file for citation information.


نیازمندی

مقدار نام
- numpy
ython_versio nvidia-sphinx-theme;
xtr sphinx-copybutton;
xtr pre-commit;
xtr myst_parser;
platform_machin usd-core>=25.5;
python_versio usd-exchange>=2.2;
xtr blosc>=1.11.1;
xtr matplotlib>=3.7.5;
xtr pillow>=10.4.0;
xtr psutil>=7.1.0;
xtr pyglet>=2.1.9;
platform_machin usd-core>=25.5;
python_versio usd-exchange>=2.2;
xtr warp-lang[examples];
ython_versio torch>=2.7.0;
xtr warp-lang[examples];
xtr warp-lang[docs];
xtr nvtx;
xtr coverage[toml];


زبان مورد نیاز

مقدار نام
>=3.9 Python


نحوه نصب


نصب پکیج whl warp-lang-1.9.1:

    pip install warp-lang-1.9.1.whl


نصب پکیج tar.gz warp-lang-1.9.1:

    pip install warp-lang-1.9.1.tar.gz