Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JAX installation is now handled correctly for different configurations #82

Merged
merged 1 commit into from
Oct 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Fixed
- mkdocs is now configured correctly for the new project structure
- JAX installation is now handled correctly for different configurations (CPU, CUDA, TPU)

## [0.2.0] - 2024-10-22

Expand Down
21 changes: 20 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,30 @@ XLB can now be installed via pip: `pip install xlb`.
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.

## Getting Started
To get started with XLB, you can install it using pip:
To get started with XLB, you can install it using pip. There are different installation options depending on your hardware and needs:

### Basic Installation (CPU-only)
```bash
pip install xlb
```

### Installation with CUDA support (for NVIDIA GPUs)
This installation is for the JAX backend with CUDA support:
```bash
pip install "xlb[cuda]"
```

### Installation with TPU support
This installation is for the JAX backend with TPU support:
```bash
pip install "xlb[tpu]"
```

### Notes:
- For Mac users: Use the basic CPU installation command as JAX's GPU support is not available on MacOS
- The NVIDIA Warp backend is included in all installation options and supports CUDA automatically when available
- The installation options for CUDA and TPU only affect the JAX backend

To install the latest development version from source:

```bash
Expand Down
13 changes: 10 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

setup(
name='xlb',
version='0.2.0',
version='0.2.1',
description='XLB: Accelerated Lattice Boltzmann (XLB) for Physics-based ML',
long_description=open('README.md').read(),
long_description_content_type='text/markdown',
Expand All @@ -11,15 +11,22 @@
license='Apache License 2.0',
packages=find_packages(),
install_requires=[
'jax[cuda]>=0.4.34',
'matplotlib>=3.9.2',
'numpy>=2.1.2',
'pyvista>=0.44.1',
'trimesh>=4.4.9',
'warp-lang>=1.4.0',
'numpy-stl>=3.1.2',
'pydantic>=2.9.1',
'ruff>=0.6.5'
'ruff>=0.6.5',
'jax>=0.4.34' # Base JAX CPU-only requirement
],
extras_require={
'cuda': ['jax[cuda12]>=0.4.34'], # For CUDA installations
'tpu': ['jax[tpu]>=0.4.34'], # For TPU installations
},
python_requires='>=3.10',
dependency_links=[
'https://storage.googleapis.com/jax-releases/libtpu_releases.html'

Check notice on line 30 in setup.py

View check run for this annotation

Autodesk Chorus / privacy/bearer

external_service.third_party: Google Cloud APIs

This check is currently in beta. - Personal Data at Autodesk: https://share.autodesk.com/:b:/r/sites/LegalTopicsToolkits/Shared%20Documents/Personal%20Data%20at%20Autodesk.pdf - Data Privacy & Governance Policies at Autodesk: https://share.autodesk.com/sites/DPG/SitePages/Policies-%26-Guidelines.aspx
],
)
Loading