Skip to content

Commit eba8aff

Browse files
authored
Added Oliver to contributor list, added CHANGELOG, updated README, added PR template. (#78)
* Added Oliver as a main contributor * Added changelogs and updated readme.md file. The address of assets are also changed to be absolute so that they show up correctly on PyPi * Added info on how to install the latest version * Added pull request template * Removed the example and shorten the description
1 parent 7e1d9d5 commit eba8aff

File tree

4 files changed

+102
-45
lines changed

4 files changed

+102
-45
lines changed

.github/PULL_REQUEST_TEMPLATE.md

+50
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
## Description
2+
3+
<!--
4+
Thank you for your contribution! Please include a summary of the changes and the related issue. Please also include relevant motivation and context. List any dependencies that are required for this change.
5+
-->
6+
7+
8+
## Type of change
9+
10+
<!-- Please select the options that are relevant. -->
11+
- [ ] Bug fix (non-breaking change which fixes an issue)
12+
- [ ] New feature (non-breaking change which adds functionality)
13+
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
14+
- [ ] Documentation update
15+
16+
## How Has This Been Tested?
17+
18+
<!-- Please describe the tests that you ran to verify your changes. Provide instructions so others can reproduce. Include details of your test environment, and the test cases you ran.
19+
20+
- [ ] Test A
21+
- [ ] Test B
22+
-->
23+
- [ ] All pytest tests pass
24+
25+
<!-- To run the tests, execute the following command from the root of the repository:
26+
27+
```bash
28+
pytest
29+
```
30+
-->
31+
32+
33+
## Linting and Code Formatting
34+
35+
Make sure the code follows the project's linting and formatting standards. This project uses **Ruff** for linting.
36+
37+
To run Ruff, execute the following command from the root of the repository:
38+
39+
```bash
40+
ruff check .
41+
```
42+
43+
<!-- You can also fix some linting errors automatically using Ruff:
44+
45+
```bash
46+
ruff check . --fix
47+
```
48+
-->
49+
50+
- [ ] Ruff passes

AUTHORS

+2-1
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,5 @@
44
# For a comprehensive view of all contributors, please refer to the revision history in the source control.
55

66
Mehdi Ataei (Autodesk Inc)
7-
Hesam Saleipour (Autodesk Inc)
7+
Hesam Saleipour (Autodesk Inc)
8+
Oliver Hennigh (NVIDIA)

CHANGELOG.md

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# Changelog
2+
3+
All notable changes to this project will be documented in this file.
4+
5+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7+
8+
## [Unreleased]
9+
- _No changes yet_ <!-- Placeholder for future changes -->
10+
11+
## [0.2.0] - 2024-10-22
12+
13+
### Added
14+
- XLB is now installable via pip
15+
- Complete rewrite of the codebase for better modularity and extensibility based on "Operators" design pattern
16+
- Added NVIDIA's Warp backend for state-of-the-art performance

README.md

+34-44
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,31 @@
11
[![License](https://img.shields.io/badge/License-Apache_2.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)
22
[![GitHub star chart](https://img.shields.io/github/stars/Autodesk/XLB?style=social)](https://star-history.com/#Autodesk/XLB)
33
<p align="center">
4-
<img src="assets/logo-transparent.png" alt="" width="300">
4+
<img src="https://raw.githubusercontent.com/autodesk/xlb/main/assets/logo-transparent.png" alt="" width="300">
55
</p>
66

77
# XLB: A Differentiable Massively Parallel Lattice Boltzmann Library in Python for Physics-Based Machine Learning
88

9-
XLB is a fully differentiable 2D/3D Lattice Boltzmann Method (LBM) library that leverages hardware acceleration. It's built on top of the [JAX](https://github.com/google/jax) library and is specifically designed to solve fluid dynamics problems in a computationally efficient and differentiable manner. Its unique combination of features positions it as an exceptionally suitable tool for applications in physics-based machine learning.
9+
🎉 **Exciting News!** 🎉 XLB version 0.2.0 has been released, featuring a complete rewrite of the library and introducing support for the NVIDIA Warp backend!
10+
XLB can now be installed via pip: `pip install xlb`.
11+
12+
XLB is a fully differentiable 2D/3D Lattice Boltzmann Method (LBM) library that leverages hardware acceleration. It supports [JAX](https://github.com/google/jax) and [NVIDIA Warp](https://github.com/NVIDIA/warp) backends, and is specifically designed to solve fluid dynamics problems in a computationally efficient and differentiable manner. Its unique combination of features positions it as an exceptionally suitable tool for applications in physics-based machine learning. With the new Warp backend, XLB now offers state-of-the-art performance for even faster simulations.
13+
14+
## Getting Started
15+
To get started with XLB, you can install it using pip:
16+
```bash
17+
pip install xlb
18+
```
19+
20+
To install the latest development version from source:
21+
22+
```bash
23+
pip install git+https://github.com/Autodesk/XLB.git
24+
```
25+
26+
The changelog for the releases can be found [here](https://github.com/Autodesk/XLB/blob/main/CHANGELOG.md).
27+
28+
For examples to get you started please refer to the [examples](https://github.com/Autodesk/XLB/tree/main/examples) folder.
1029

1130
## Accompanying Paper
1231

@@ -29,9 +48,10 @@ If you use XLB in your research, please cite the following paper:
2948
```
3049

3150
## Key Features
51+
- **Multiple Backend Support:** XLB now includes support for multiple backends including JAX and NVIDIA Warp, providing *state-of-the-art* performance for lattice Boltzmann simulations. Currently, only single GPU is supported for the Warp backend.
3252
- **Integration with JAX Ecosystem:** The library can be easily integrated with JAX's robust ecosystem of machine learning libraries such as [Flax](https://github.com/google/flax), [Haiku](https://github.com/deepmind/dm-haiku), [Optax](https://github.com/deepmind/optax), and many more.
3353
- **Differentiable LBM Kernels:** XLB provides differentiable LBM kernels that can be used in differentiable physics and deep learning applications.
34-
- **Scalability:** XLB is capable of scaling on distributed multi-GPU systems, enabling the execution of large-scale simulations on hundreds of GPUs with billions of cells.
54+
- **Scalability:** XLB is capable of scaling on distributed multi-GPU systems using the JAX backend, enabling the execution of large-scale simulations on hundreds of GPUs with billions of cells.
3555
- **Support for Various LBM Boundary Conditions and Kernels:** XLB supports several LBM boundary conditions and collision kernels.
3656
- **User-Friendly Interface:** Written entirely in Python, XLB emphasizes a highly accessible interface that allows users to extend the library with ease and quickly set up and run new simulations.
3757
- **Leverages JAX Array and Shardmap:** The library incorporates the new JAX array unified array type and JAX shardmap, providing users with a numpy-like interface. This allows users to focus solely on the semantics, leaving performance optimizations to the compiler.
@@ -42,29 +62,29 @@ If you use XLB in your research, please cite the following paper:
4262

4363

4464
<p align="center">
45-
<img src="assets/airfoil.gif" width="800">
65+
<img src="https://raw.githubusercontent.com/autodesk/xlb/main/assets/airfoil.gif" width="800">
4666
</p>
4767
<p align="center">
4868
On GPU in-situ rendering using <a href="https://github.com/loliverhennigh/PhantomGaze">PhantomGaze</a> library (no I/O). Flow over a NACA airfoil using KBC Lattice Boltzmann Simulation with ~10 million cells.
4969
</p>
5070

5171

5272
<p align="center">
53-
<img src="assets/car.png" alt="" width="500">
73+
<img src="https://raw.githubusercontent.com/autodesk/xlb/main/assets/car.png" alt="" width="500">
5474
</p>
5575
<p align="center">
5676
<a href=https://www.epc.ed.tum.de/en/aer/research-groups/automotive/drivaer > DrivAer model </a> in a wind-tunnel using KBC Lattice Boltzmann Simulation with approx. 317 million cells
5777
</p>
5878

5979
<p align="center">
60-
<img src="assets/building.png" alt="" width="700">
80+
<img src="https://raw.githubusercontent.com/autodesk/xlb/main/assets/building.png" alt="" width="700">
6181
</p>
6282
<p align="center">
6383
Airflow in to, out of, and within a building (~400 million cells)
6484
</p>
6585

6686
<p align="center">
67-
<img src="assets/XLB_diff.png" alt="" width="900">
87+
<img src="https://raw.githubusercontent.com/autodesk/xlb/main/assets/XLB_diff.png" alt="" width="900">
6888
</p>
6989
<p align="center">
7090
The stages of a fluid density field from an initial state to the emergence of the "XLB" pattern through deep learning optimization at timestep 200 (see paper for details)
@@ -73,7 +93,7 @@ The stages of a fluid density field from an initial state to the emergence of th
7393
<br>
7494

7595
<p align="center">
76-
<img src="assets/cavity.gif" alt="" width="500">
96+
<img src="https://raw.githubusercontent.com/autodesk/xlb/main/assets/cavity.gif" alt="" width="500">
7797
</p>
7898
<p align="center">
7999
Lid-driven Cavity flow at Re=100,000 (~25 million cells)
@@ -99,7 +119,8 @@ The stages of a fluid density field from an initial state to the emergence of th
99119
- D3Q27 (Must be used for KBC simulation runs)
100120

101121
### Compute Capabilities
102-
- Distributed Multi-GPU support
122+
- Single GPU support for the Warp backend with state-of-the-art performance
123+
- Distributed Multi-GPU support using the JAX backend
103124
- Mixed-Precision support (store vs compute)
104125
- Out-of-core support (coming soon)
105126

@@ -125,50 +146,19 @@ The stages of a fluid density field from an initial state to the emergence of th
125146
- **Regularized BC:** This boundary condition is used to impose a prescribed velocity or pressure profile at the boundary. This BC is more stable than Zouhe BC, but computationally more expensive.
126147
- **Extrapolation Outflow BC:** A type of outflow boundary condition that uses extrapolation to avoid strong wave reflections.
127148

128-
- **Interpolated Bounceback BC:** Interpolated bounce-back boundary condition due to Bouzidi for a lattice Boltzmann method simulation.
129-
130-
## Installation Guide
131-
132-
To use XLB, you must first install JAX and other dependencies using the following commands:
133-
149+
- **Interpolated Bounceback BC:** Interpolated bounce-back boundary condition for representing curved boundaries.
134150

135-
Please refer to https://github.com/google/jax for the latest installation documentation. The following table is taken from [JAX's Github page](https://github.com/google/jax).
136-
137-
| Hardware | Instructions |
138-
|------------|-----------------------------------------------------------------------------------------------------------------|
139-
| CPU | `pip install -U "jax[cpu]"` |
140-
| NVIDIA GPU on x86_64 | `pip install -U "jax[cuda12_pip]" -f https://storage.googleapis.com/jax-releases/jax_cuda_releases.html` |
141-
| Google TPU | `pip install -U "jax[tpu]" -f https://storage.googleapis.com/jax-releases/libtpu_releases.html` |
142-
| AMD GPU | Use [Docker](https://hub.docker.com/r/rocm/jax) or [build from source](https://jax.readthedocs.io/en/latest/developer.html#additional-notes-for-building-a-rocm-jaxlib-for-amd-gpus). |
143-
| Apple GPU | Follow [Apple's instructions](https://developer.apple.com/metal/jax/). |
144-
145-
**Note:** We encountered challenges when executing XLB on Apple GPUs due to the lack of support for certain operations in the Metal backend. We advise using the CPU backend on Mac OS. We will be testing XLB on Apple's GPUs in the future and will update this section accordingly.
146-
147-
148-
Install dependencies:
149-
```bash
150-
pip install pyvista numpy matplotlib Rtree trimesh jmp orbax-checkpoint termcolor
151-
```
152-
153-
Run an example:
154-
```bash
155-
git clone https://github.com/Autodesk/XLB
156-
cd XLB
157-
export PYTHONPATH=.
158-
python3 examples/CFD/cavity2d.py
159-
```
160151
## Roadmap
161152

162153
### Work in Progress (WIP)
163154
*Note: Some of the work-in-progress features can be found in the branches of the XLB repository. For contributions to these features, please reach out.*
164155

165-
- 🚀 **Warp Backend:** Achieving state-of-the-art performance by leveraging the [Warp](https://github.com/NVIDIA/warp) framework in combination with JAX.
166-
167156
- 🌐 **Grid Refinement:** Implementing adaptive mesh refinement techniques for enhanced simulation accuracy.
168157

169-
-**Multi-GPU Acceleration using [Neon](https://github.com/Autodesk/Neon) + Warp:** Using Neon's data structure for improved scaling.
158+
- 💾 **Out-of-Core Computations:** Enabling simulations that exceed available GPU memory, suitable for CPU+GPU coherent memory models such as NVIDIA's Grace Superchips (coming soon).
159+
170160

171-
- 💾 **Out-of-Core Computations:** Enabling simulations that exceed available GPU memory, suitable for CPU+GPU coherent memory models such as NVIDIA's Grace Superchips.
161+
- **Multi-GPU Acceleration using [Neon](https://github.com/Autodesk/Neon) + Warp:** Using Neon's data structure for improved scaling.
172162

173163
- 🗜️ **GPU Accelerated Lossless Compression and Decompression**: Implementing high-performance lossless compression and decompression techniques for larger-scale simulations and improved performance.
174164

0 commit comments

Comments
 (0)