A Domain-Specific Language for PDE Solvers on Structured Grids
Project description
Bamboo: A Domain-Specific Language for PDE Solvers on Structured Grids
Copyright@Tsinghua High-Performance Computing Applications Group (TH-HPCA)
Introduction
from bamboo import Grid, Stencil
grid = Grid(shape=(100, 100))
@Stencil
def laplace(u):
return 0.25 * (u[1, 0] + u[-1, 0] + u[0, 1] + u[0, -1])
Bamboo is a high-level domain-specific language (DSL) designed to simplify PDE solver development on structured grids. It abstracts away parallelization and optimization, allowing domain scientists to focus on physical algorithms rather than low-level performance tuning.
Embedded in Python, Bamboo provides an intuitive syntax for defining computations in terms of grids, discretization, and time integration. The back-end generates optimized code for CPUs (including Huawei Kunpeng), GPUs/DCUs, and next-generation Sunway architectures, ensuring performance portability across platforms.
Installation
[Online] Install Bamboo via pip:
pip install bamboolang
[Local] Install Bamboo locally via poetry at the root directory of bamboo:
poetry install
Prerequisites
- Python 3.7.10
- Visual Studio Code (for developers)
- sphinx with sphinx_rtd_theme (for documentation)
Getting Started
Refer to the official documentation for detailed usage and examples.
[Build] Build html documentation using sphinx:
make docs -C docs
Code Style
- Formatted using Black.
- Naming follows PEP 8 guidelines.
License
Bamboo is licensed under the GNU General Public License v3. See the license file for details.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file bamboolang-1.0.0.tar.gz.
File metadata
- Download URL: bamboolang-1.0.0.tar.gz
- Upload date:
- Size: 79.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.5.1 CPython/3.7.10 Darwin/23.6.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
955a23fd8aac43fbdc5d11326c9521ed9c9aeb08dd7543f2a1f4c0b498cfc156
|
|
| MD5 |
06d41f46f7a052d80ee560ef50e6fa9c
|
|
| BLAKE2b-256 |
f170ceee666e6e53529c24af07785a90fb1b6181137df844ce5c8b66b24f0d30
|
File details
Details for the file bamboolang-1.0.0-py3-none-any.whl.
File metadata
- Download URL: bamboolang-1.0.0-py3-none-any.whl
- Upload date:
- Size: 93.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.5.1 CPython/3.7.10 Darwin/23.6.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1ac3cf4f2d2c8fe2623779a9c741bb76268456b1fdd8040e119cc9c7db7afe04
|
|
| MD5 |
04aa9004665cb3d863fad31eb9d45a0c
|
|
| BLAKE2b-256 |
285b2767c0ae5d9fbec8801f24a1b9cbbdb1ed7f05c5bc96e764da803f8aa57d
|