Skip to main content

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.

Metadata

Release files for bamboolang 1.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for bamboolang 1.0.0
File Size Uploaded Provenance
bamboolang-1.0.0.tar.gz 79.9 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for bamboolang 1.0.0
File Interpreter ABI Platform
bamboolang-1.0.0-py3-none-any.whl Python 3 none any Details

Total release size: 173.2 kB

Release files / bamboolang-1.0.0.tar.gz

Download URL bamboolang-1.0.0.tar.gz
Size 79.9 kB
Tags Source
SHA-256 checksum
How to use checksums
955a23fd8aac43fbdc5d11326c9521ed9c9aeb08dd7543f2a1f4c0b498cfc156
BLAKE2b-256 checksum
How to use checksums
f170ceee666e6e53529c24af07785a90fb1b6181137df844ce5c8b66b24f0d30
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.5.1 CPython/3.7.10 Darwin/23.6.0

Release files / bamboolang-1.0.0-py3-none-any.whl

Download URL bamboolang-1.0.0-py3-none-any.whl
Size 93.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
1ac3cf4f2d2c8fe2623779a9c741bb76268456b1fdd8040e119cc9c7db7afe04
BLAKE2b-256 checksum
How to use checksums
285b2767c0ae5d9fbec8801f24a1b9cbbdb1ed7f05c5bc96e764da803f8aa57d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.5.1 CPython/3.7.10 Darwin/23.6.0

Security for bamboolang 1.0.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

Release history Release notifications | RSS feed

This release

1.0.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page