CuWave
CuWave is a single-GPU, differentiable finite difference wave propagation code. Possible applications include
| nondestructive testing via full waveform inversion | |
| transient acoustic topology optimization | |
| analog neural networks | |
| transient photonic topology optimization |
Documentation
- see the documentation for how the code works (AI-assisted; verify with sources for critical details)
- see examples for how to apply the code
Development status
Scalar & acoustic wave equations have been developed over the last 2 years and are thoroughly validated.
Performance
CuWave's runtime for identical discretizations is comparable to that of other established wave propagation finite difference codes. Speedups in 2D with reflecting boundaries (a ratio above 1 means CuWave is that many times faster) compared to the following frameworks:
- scalar wave equation
- Deepwave (forward: ~1.1x, sensitivity: ~1x)
- NVIDIA Warp (forward: ~2.1x, sensitivity: ~1.8x)
- SeismicWaves.jl (forward: ~4.4x, sensitivity: ~4x)
- Devito on CPU (forward: ~3.6x, sensitivity: ~3.8x)
- elastic wave equation
- Deepwave (forward: ~1.1x, sensitivity: ~1.3x)
- SeismicWaves.jl (forward: ~4x, sensitivity: ~5x)
Tested on one NVIDIA RTX PRO 500 Blackwell laptop GPU (6 GB) on the largest possible grids with CuWave's
superposition_sensitivityas reference for the sensitivities. The specific numbers need to be taken with a grain of salt, as they are subject to specific hardware and simulation setup. All implementations operate on the same order of magnitude.
Additional benefits of CuWave are
- the built-in higher order finite difference schemes, allowing for fewer grid points
- a sensitivity analysis whose memory is independent of the number of timesteps, allowing for orders of magnitude larger grids
Install
Dependencies are kept lightweight. Only CuPy is required beyond standard Python library.
pip install cupy-cuda12x # or cupy-cuda11x, to match your CUDA
pip install cuwave # or `pip install -e .` from a checkout
CuPy must be installed separately because the wheel depends on your CUDA toolkit;
all remaining dependencies are declared in pyproject.toml.
PyTorch is optional for the regularization via neural optimization; see pytorch for the installation. Otherwise it is not needed.
The tests under tests/ are unittest classes, but pytest is the recommended runner:
pip install pytest
python -m pytest tests/ -q # ~20 s on a GPU, ~3 s without: CUDA and PyTorch tests skip when unavailable
References
If you use our code for your scientific research, please acknowledge this by referring to the following publication:
Herrmann, L., Bürchner, T., Kudela, L., Kollmannsberger, S., 2026, A memory-efficient adjoint method to enable billion parameter optimization on a single GPU in dynamic problems, Structural and Multidisciplinary Optimization, Volume 69, 52 (2026), DOI: 10.1007/s00158-025-04237-y
Contact
For questions, bug reports, or collaboration inquiries, please don't hesitate to contact Leon Herrmann at herrmann.leon@pm.me.
License
MIT; see LICENSE.
Metadata
Release files for cuwave 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| cuwave-0.1.0.tar.gz | 62.3 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| cuwave-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 139.6 kB
Release files / cuwave-0.1.0.tar.gz
| Download URL | cuwave-0.1.0.tar.gz |
|---|---|
| Size | 62.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ff97344e7b4acc506e8ad168d632dc5a302d09c6f4bece7efc530fd46e5191bf
|
|
BLAKE2b-256 checksum How to use checksums |
1cc71e9f2a8e62408cd7cc8e0d2e7e4441ddaf367e8110af3cf7c4cf12e8ef9f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 18, 2026.
Transparency logRelease files / cuwave-0.1.0-py3-none-any.whl
| Download URL | cuwave-0.1.0-py3-none-any.whl |
|---|---|
| Size | 77.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
1ae65c1536dbc7a271d5612c51b7f683f43cbb3c575e21d7c9c1815ff050e5ea
|
|
BLAKE2b-256 checksum How to use checksums |
391688c291740032202548963ff06889ec2555c07f9cc54d7ff7e0d4d5d4ea89
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 18, 2026.
Transparency log