Skip to main content

solprop-native

solprop-native is the compiled backend of solprop, a Python package for ultrafast nonlinear pulse propagation, and a required dependency of it. It implements solprop's propagation kernels in C++20 on Kokkos, bound to Python with nanobind and built with scikit-build-core. One build runs either on the CPU (OpenMP, with FFTW and a vendor BLAS) or on a GPU (CUDA with cuFFT and cuBLAS, or HIP with rocFFT and rocBLAS). solprop's default backend="auto" selects it, with no fallback. solprop's NumPy reference backend is the numerical oracle this package is tested against.

The distribution is solprop-native and the import package solprop_native. It is built from the native/ directory of the solprop repository and released at solprop's own version.

Installing

pip install solprop

installs the precompiled wheel on macOS on Apple silicon (osx-arm64), Linux on x86-64 (linux-64), Linux on aarch64 (linux-aarch64), Windows on x86-64 (win-64) and Windows on Arm (win-arm64), with no extra; the x86-64 wheels need an x86-64-v2 processor (Intel Nehalem or AMD Bulldozer and newer) and run faster on x86-64-v3 (AVX2), the aarch64 wheel needs a Neoverse N1 or newer. On any other platform the installer finds no matching distribution. A build from source is the way past a wheel's limits, for NVIDIA (CUDA) or AMD (HIP) GPUs above all; a new release replaces a source build with its CPU wheel, so rebuild on upgrading. The documentation covers both:

Development

The package is a member of the repository's uv workspace and shares its environment and lockfile. At the repository root,

uv sync

builds it from native/ and installs it, editable, beside solprop; a contributor with no compiler has uv run --no-project tools/setup_light.py, which leaves it out. The editable install does not rebuild itself: after changing C++ sources or CMake options, run uv sync --reinstall-package solprop-native, passing options through CMAKE_ARGS (a device build is made the same way, with the CUDA or HIP options). The contributor rules for this directory are in AGENTS.md, beside the repository's AGENTS.md.

Tests

From native/, in that environment:

uv run pytest                                  # Python tests
cmake --preset cpu-debug -DPython_EXECUTABLE="$PWD/../.venv/bin/python"
cmake --build --preset cpu-debug --parallel
ctest --test-dir build/presets/cpu-debug --output-on-failure   # native GoogleTest

On macOS add -DCMAKE_CXX_COMPILER=/opt/homebrew/opt/llvm/bin/clang++ to the cmake --preset command. cpu-sanitize builds the native tests with ASan and UBSan (--target solprop_native_tests). A wheel built with -Ccmake.define.BUILD_TESTING=ON leaves the native tests in its build directory for ctest --test-dir build/<wheel tag>.

The Python suite compares this backend with solprop's reference backend within derived bounds and runs thread-count probes in subprocesses; set SOLPROP_NATIVE_THREADS and OMP_PROC_BIND as for a normal run. On a GPU build the same suite runs on the device, and host-only tests skip themselves. pytest -m gpu selects the focused numerical tests (tests/test_numerics.py), small enough to run under Compute Sanitizer, and the band rule's device qualification (tests/test_band_plasma.py). To compare the band rule's two halo reads (SOLPROP_NATIVE_BAND_STAGING), run python tests/band_thread_probe.py under each build and compare the arrays it writes within the band test's rounding bound. To qualify the GPU's tiled band column on a CPU build, run tests/test_band_plasma.py and tests/test_band_stress.py with SOLPROP_NATIVE_BAND_TILES=4; on a GPU, SOLPROP_NATIVE_BAND_TILES=0 runs the team column instead.

Quality gate

uv run poe check-native   # at the repository root; runs native/scripts/check.sh
uv run poe check-all      # solprop's gate, then this one

poe check-native runs everything a change to native/ must pass: Ruff formatting and lint, strict Pyright, the pinned clang-format from the dev group, clang-tidy with strict warnings, the native tests, the native tests under ASan and UBSan, an editable local build with the Python tests, a distribution wheel build, and an import smoke test of that wheel in a clean environment (on Linux it checks that the wheel's OpenBLAS loads from the package). It syncs the repository's environment without removing the native build, honours CMAKE_ARGS, and needs Node.js (npx) for Pyright. SOLPROP_NATIVE_QUALIFICATION_PYTHON=/path/to/python installs the wheel into that environment and runs the Python tests there instead. A change to the backend also passes solprop's own suite with this package installed (poe check-all, or uv run poe test with SOLPROP_TEST_BACKEND=native).

The kernel contract

This source implements solprop's kernel contract. A build pins no solprop version: it requires the solprop members listed in the exported tuples DRIVER_SURFACE, STAGE_TERMS_FIELDS, STAGE_SCALARS_FIELDS and the other *_FIELDS tuples, which check_build() looks up, naming any that are missing. In an editable checkout it also compares build_info().source_digest, the digest of what the extension was compiled from, with this directory's sources. Rebuild with uv sync --reinstall-package solprop-native when it refuses for either reason; a wheel carries no sources, and solprop's metadata pins it to solprop's own version. The version recorded at configure time (solprop_version_built_against: the repository's version, or unknown for a direct CMake configure) is provenance only. The TDSE electronic response is refused by name before anything is allocated; TDSE propagation uses backend="numpy_ref".

Native source coverage

Build coverage in a separate build directory and Python environment. On Linux select Clang and its matching OpenMP runtime explicitly; the usual GCC build cannot provide Clang source coverage. On macOS the configured Homebrew LLVM toolchain supplies the compiler and tools. With solprop installed in that environment, from native/:

uv build --wheel -Ccmake.define.SOLPROP_NATIVE_ENABLE_COVERAGE=ON \
    -Ccmake.define.CMAKE_CXX_COMPILER=/path/to/llvm/bin/clang++ \
    -Cbuild-dir=build/coverage

This instruments the core, the bindings and the instantiated headers at -O1 with -fprofile-instr-generate -fcoverage-mapping -fprofile-update=atomic, with IPO disabled. build_info().coverage_instrumented identifies it, and coverage_source_hash binds the build to its ordered C++ sources, uncommitted edits included. Its wall times are not performance evidence.

Set LLVM_PROFILE_FILE before importing the extension, using a new directory for each case and %p-%m.profraw filenames so that processes and instrumented modules do not overwrite each other's profiles. Use llvm-profdata and llvm-cov from the same LLVM installation as the compiler, keep the extension hash and source revision with every collection, and never combine profiles from different binaries. Filter reports to native/src/ and native/include/solprop_native/: templates from Kokkos, Kokkos-FFT, Kokkos Kernels and other dependencies are not project coverage.

The coverage build also installs solprop_native_labels, a host-only Kokkos Tools module that counts parallel-for/reduce/scan labels and profile regions without requesting fences. Set KOKKOS_TOOLS_LIBS to this module and SOLPROP_NATIVE_LABEL_FILE to a new JSON-lines output path for a separate label pass. Reports, raw profiles and binary snapshots belong in ignored local .benchmarks/ storage, not in git. An uninstantiated template or compiled-out path has no counter and is not an executed path with a zero count; CPU coverage has no target percentage.

AI-assisted development

The C++ code and build infrastructure here are slightly gnarly, and developing and maintaining them is enormously aided by AI coding agents working under the lead developer's direction, as in solprop. Verification rests on solprop's 100% test coverage and systematic comparisons of this backend against its validated NumPy reference backend: the results agree within derived floating-point error bounds. See solprop's account of AI-assisted development for the wider approach to derivation, testing and review.

Licence

solprop-native is free software: you can redistribute it and modify it under the terms of the GNU General Public License, version 3 or (at your option) any later version (GPL-3.0-or-later), like solprop; see LICENSE, a copy of the repository's for the wheel. The documentation is under CC BY 4.0. Every file states its copyright and licence, in an SPDX header or in the repository's REUSE.toml, following the REUSE specification; uv run poe reuse at the repository root checks it, as part of poe check. Start a new code file with the header that uv run reuse annotate --copyright "John C. Travers and contributors" --year 2026 --license GPL-3.0-or-later <file> writes.

The fetched dependencies (Kokkos, Kokkos Kernels, Kokkos-FFT, SLEEF, GoogleTest) and the libraries a build links (FFTW, the BLAS, the CUDA or ROCm libraries) carry their own licences.

Metadata

Release files for solprop-native 0.2.0

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

Built distributions (wheels)

Table of built distributions (wheels) for solprop-native 0.2.0
File Actions
solprop_native-0.2.0-cp314-abi3-win_arm64.whl CPython 3.14 abi3 Windows ARM64 Details for solprop_native-0.2.0-cp314-abi3-win_arm64.whl
solprop_native-0.2.0-cp314-abi3-win_amd64.whl CPython 3.14 abi3 Windows x86-64 Details for solprop_native-0.2.0-cp314-abi3-win_amd64.whl
solprop_native-0.2.0-cp314-abi3-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl CPython 3.14 abi3 Linux glibc 2.27+ x86-64, Linux glibc 2.28+ x86-64 Details for solprop_native-0.2.0-cp314-abi3-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
solprop_native-0.2.0-cp314-abi3-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl CPython 3.14 abi3 Linux glibc 2.27+ ARM64, Linux glibc 2.28+ ARM64 Details for solprop_native-0.2.0-cp314-abi3-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl
solprop_native-0.2.0-cp314-abi3-macosx_14_0_arm64.whl CPython 3.14 abi3 macOS 14.0+ ARM64 Details for solprop_native-0.2.0-cp314-abi3-macosx_14_0_arm64.whl

Total release size: 50.5 MB

Release files / solprop_native-0.2.0-cp314-abi3-win_arm64.whl

Download URL solprop_native-0.2.0-cp314-abi3-win_arm64.whl
Size 4.8 MB
Tags CPython 3.14 Windows ARM64 abi3
SHA-256 checksum
How to use checksums
4ec9320d74d26e1ac76bfe75a199d4428e8de6c5ed73bc9ccf994a63c3498a0d
BLAKE2b-256 checksum
How to use checksums
fc07c7f0d11fca0c06659f692ff5980cfc18c102d1ec1d09e6760c5cf6176d1a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Nov 7, 2026.

Transparency log

Release files / solprop_native-0.2.0-cp314-abi3-win_amd64.whl

Download URL solprop_native-0.2.0-cp314-abi3-win_amd64.whl
Size 9.7 MB
Tags CPython 3.14 Windows x86-64 abi3
SHA-256 checksum
How to use checksums
86d1d02d1692af1fc81d0b30a245b06e047a6d22fef383062402cf8c102cb79d
BLAKE2b-256 checksum
How to use checksums
37ef37718b0f652a8f21057fed58f94b36029ff5cf19b623eeda9daa594fe7f8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Nov 7, 2026.

Transparency log

Release files / solprop_native-0.2.0-cp314-abi3-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl

Download URL solprop_native-0.2.0-cp314-abi3-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Size 19.2 MB
Tags CPython 3.14 Linux glibc 2.27+ x86-64 Linux glibc 2.28+ x86-64 abi3
SHA-256 checksum
How to use checksums
8a213b8ae1aaea36b8994878ef82938655846b53544080780a497293325d9dfd
BLAKE2b-256 checksum
How to use checksums
c55ffd6cc446bb86b0d5b3997e54affa7203cd7be8c8cb779465815b4fb7b86c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Nov 7, 2026.

Transparency log

Release files / solprop_native-0.2.0-cp314-abi3-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl

Download URL solprop_native-0.2.0-cp314-abi3-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl
Size 12.9 MB
Tags CPython 3.14 Linux glibc 2.27+ ARM64 Linux glibc 2.28+ ARM64 abi3
SHA-256 checksum
How to use checksums
419626517e5673949a3ca34cc4ec2547f02bc5bd0c7a2a3546f77cb520af450c
BLAKE2b-256 checksum
How to use checksums
2440a99e62dcdac85a197d89ef5279ef569dc377db34f5edb864ff8367421b3c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Nov 7, 2026.

Transparency log

Release files / solprop_native-0.2.0-cp314-abi3-macosx_14_0_arm64.whl

Download URL solprop_native-0.2.0-cp314-abi3-macosx_14_0_arm64.whl
Size 4.0 MB
Tags CPython 3.14 abi3 macOS 14.0+ ARM64
SHA-256 checksum
How to use checksums
8b06815f240ca638624f3a10e35ccd7e0cb953d84a56f31bc7257aeca6e2f47c
BLAKE2b-256 checksum
How to use checksums
3828a20236c54768c157ae0ae115582835e0555c076d1ce0ca1ecd8531cd0675
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Nov 7, 2026.

Transparency log

Security for solprop-native 0.2.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.

Full provenance

All 5 files in this release have been uploaded with provenance metadata.

Select from 5 files

Attestation for solprop_native-0.2.0-cp314-abi3-win_arm64.whl

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 Nov 7, 2026.

Transparency log

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.

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