DustPy-GPU
dustpy-gpu is a GPU-enabled fork of DustPy, a Python package for simulating gas and dust evolution in protoplanetary disks.
Designed as a drop-in replacement, it retains the upstream dustpy import name and original API, so migrating existing scripts requires minimal changes (mainly backend selection, see below).
Installation
To avoid package conflicts, please install this drop-in replacement in a fresh virtual environment:
python -m venv .venv && source .venv/bin/activate
python -m pip install --upgrade pip
# For GPU runs: Install CuPy matching your CUDA version (e.g., CUDA 13)
python -m pip install cupy-cuda13x
# Install dustpy-gpu (automatically installs the required simframe-gpu fork)
# Alternatively: python -m pip install dustpy-gpu
python -m pip install git+https://github.com/astroboylrx/dustpy-gpu.git
Backends
Select your backend when initializing a simulation:
import dustpy
sim_cpu = dustpy.Simulation(backend="numpy") # Default (preserves upstream behavior)
sim_gpu = dustpy.Simulation(backend="cupy")
sim_auto = dustpy.Simulation(backend="auto") # Uses CuPy if available, else NumPy
When using the cupy backend, remember to convert CuPy arrays back to NumPy with cupy.asnumpy() for plotting or analysis. For those new to CuPy, we recommend checking out the Basics of CuPy.
Multiple backends can be used together in a single script if run sequentially, but concurrent execution is not supported due to process-global bindings.
Documentation
Most official tutorials from the upstream DustPy documentation have been adapted for the GPU backend. These examples, alongside the validation benchmarks, are available in gpu_examples.
Parity and benchmarks
Users should expect numerical and scientific parity, though not strictly identical arrays across long or repeated GPU runs.
- NumPy Backend: Reproduces upstream
DustPyresults bitwise. - CuPy Backend: Agrees with NumPy to strict FP64 tolerances initially. Long-run differences remain quite small and non-accumulating. Official examples (ice lines, planetary gaps, planetesimal formation, etc.) are visually indistinguishable.
- GPU Determinism: CuPy runs are not bitwise deterministic. The use of an iterative solver (sparse GMRES) — necessitated because CuPy's direct sparse solver API currently falls back to the CPU — combined with parallel GPU accumulation, can produce tiny run-to-run differences.
For detailed comparisons and performance results, see the parity and benchmark notebook.
Metadata
Release files for dustpy-gpu 1.0.9.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| dustpy_gpu-1.0.9.2.tar.gz | 22.2 MB | Without provenance | Details for dustpy_gpu-1.0.9.2.tar.gz |
Release files / dustpy_gpu-1.0.9.2.tar.gz
| Download URL | dustpy_gpu-1.0.9.2.tar.gz |
|---|---|
| Size | 22.2 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
809a00eaebb1c3eaf6d3f0f5bd58e2e647430d69006c65ed264410f3f9d0c63d
|
|
BLAKE2b-256 checksum How to use checksums |
09a271d65da3c8fbf3071274456f276a3ae624ef98fa0a325c76495e38498064
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.10.12
|
Security for dustpy-gpu 1.0.9.2
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.
To learn more about protecting yourself from malicious actors, visit our package security documentation.