This release is a pre-release and may not be stable for production use.
cugrid
CUDA-accelerated AC power flow and ACOPF for large-scale transmission networks:
batched Newton-Raphson PF, contingency screening (N-1 / N-1-1), hosting capacity, and
curtailment optimization. See plans/cugrid-implementation-plan.md
for the full phased plan.
Status: Phase 0 (scaffolding) — no solver logic yet.
Layout
include/cugrid/ public C++ headers (common/: DeviceVector, error checks, timers)
src/ io, network, pf/{cpu,cuda}, opf/{cpu,cuda}, linalg — filled in from Phase 1 onward
python/cugrid/ pybind11 module + Python package
tests/unit/ GoogleTest (C++), CPU-only, runs in CI on every PR
tests/validation/ accuracy checks vs pandapower / PowerModels (from Phase 2 onward)
tests/cases/ vendored small .m cases + generated reference solutions
scripts/ case download, pandapower/Ipopt reference generation
docs/math/ derivations (Jacobian, KKT, per-asset models)
docs/benchmarks/ performance reports
Build
Requires CMake ≥ 3.24 and a C++20 compiler. CUDA (12.x) is auto-detected; the project
builds CPU-only when no nvcc is on PATH (e.g. laptops, cloud CI) and CUDA-enabled
targets simply aren't compiled.
Python tooling uses uv; the pinned interpreter version
lives in .python-version (3.12).
Python extension
uv sync --extra dev
uv run python -c "import cugrid; print(cugrid.hello()); print(cugrid.cuda_available())"
uv sync creates .venv/, installs the pinned Python if needed, and builds the pybind11
extension in editable mode via scikit-build-core. Re-run uv sync after touching C++
sources under python/cugrid/ or include/; plain uv run does not rebuild automatically.
C++ unit tests (CPU-only, GoogleTest fetched via CMake)
cmake -S . -B build -DCUGRID_BUILD_PYTHON=OFF
cmake --build build
ctest --test-dir build --output-on-failure
Force CUDA on/off
cmake -S . -B build -DCUGRID_ENABLE_CUDA=ON # requires nvcc + CUDA Toolkit on PATH
cmake -S . -B build -DCUGRID_ENABLE_CUDA=OFF # CPU-only even if a CUDA compiler is present
Lint / pre-commit
Ruff (Python) and clang-format (C++) run via pre-commit:
uv sync --extra dev
uv run pre-commit install # runs the hooks on `git commit`
uv run pre-commit run --all-files
Reference solutions
uv sync --extra reference
uv run python scripts/make_reference.py --cases case9 case118 --out tests/cases
Generates pandapower PF results (V, θ per bus; branch flows) that the CPU/GPU solvers
are validated against (Phase 2+).
Metadata
Release files for cugrid 0.0.1.dev1
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 |
|---|---|---|---|---|
| cugrid-0.0.1.dev1.tar.gz | 57.5 kB | Without provenance | Details for cugrid-0.0.1.dev1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| cugrid-0.0.1.dev1-cp312-cp312-macosx_26_0_arm64.whl | CPython 3.12 | CPython 3.12 | macOS 26.0+ ARM64 | Details for cugrid-0.0.1.dev1-cp312-cp312-macosx_26_0_arm64.whl |
Total release size: 126.7 kB
Release files / cugrid-0.0.1.dev1.tar.gz
| Download URL | cugrid-0.0.1.dev1.tar.gz |
|---|---|
| Size | 57.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
60c79ad5dee724052e80d3bfafe6e0b3e8fbae10fb6f9490f41744130d6fb744
|
|
BLAKE2b-256 checksum How to use checksums |
fe91eb031d9519b91745099cde8344d528f97fa426b935de2cdbaf3bd8b014ce
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.7.8
|
Release files / cugrid-0.0.1.dev1-cp312-cp312-macosx_26_0_arm64.whl
| Download URL | cugrid-0.0.1.dev1-cp312-cp312-macosx_26_0_arm64.whl |
|---|---|
| Size | 69.2 kB |
| Tags | CPython 3.12 macOS 26.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
2b7210da19247311ee130c9adc2e701b72a31f6d0f9537341be24551b5d0b6ec
|
|
BLAKE2b-256 checksum How to use checksums |
3c14a4fce7823d3ad8d7b06a84edc3ccd83966794cbd1a1a3b10b5fc2e809274
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.7.8
|
Security for cugrid 0.0.1.dev1
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.