{"id":50775500,"url":"https://github.com/predict-epfl/cupiqp","last_synced_at":"2026-06-11T23:01:48.859Z","repository":{"id":362370190,"uuid":"1142360856","full_name":"PREDICT-EPFL/cupiqp","owner":"PREDICT-EPFL","description":"CuPIQP: GPU-accelerated Proximal-Interior-Point-Method QP solver for large-scale and batched QPs","archived":false,"fork":false,"pushed_at":"2026-06-11T13:25:53.000Z","size":33418,"stargazers_count":6,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-06-11T15:17:03.524Z","etag":null,"topics":["convex-optimization","gpu-computing","interior-point-method","model-predictive-control","numerical-optimization","optimization","quadratic-programming"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-2-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/PREDICT-EPFL.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-01-26T10:01:15.000Z","updated_at":"2026-06-10T20:13:43.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/PREDICT-EPFL/cupiqp","commit_stats":null,"previous_names":["predict-epfl/cupiqp"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/PREDICT-EPFL/cupiqp","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PREDICT-EPFL%2Fcupiqp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PREDICT-EPFL%2Fcupiqp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PREDICT-EPFL%2Fcupiqp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PREDICT-EPFL%2Fcupiqp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/PREDICT-EPFL","download_url":"https://codeload.github.com/PREDICT-EPFL/cupiqp/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PREDICT-EPFL%2Fcupiqp/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34221150,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-11T02:00:06.485Z","response_time":57,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["convex-optimization","gpu-computing","interior-point-method","model-predictive-control","numerical-optimization","optimization","quadratic-programming"],"created_at":"2026-06-11T23:01:46.999Z","updated_at":"2026-06-11T23:01:48.851Z","avatar_url":"https://github.com/PREDICT-EPFL.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# cuPIQP\n\n[![Institution](https://img.shields.io/badge/Institution-Automatic%20Control%20Laboratory,%20EPFL-%23E1251B?style=flat)](https://www.epfl.ch)\n[![Funding](https://img.shields.io/badge/Grant-NCCR%20Automation%20(51NF40__180545)-90e3dc.svg)](https://nccr-automation.ch/)\n![License](https://img.shields.io/badge/License-BSD--2--Clause-brightgreen.svg)\n\nCuPIQP is a GPU-accelerated convex Quadratic Programming (QP) solver implementing the [PIQP](https://github.com/PREDICT-EPFL/piqp) (Proximal Interior Point Quadratic Programming) algorithm entirely on NVIDIA GPUs. Its core strength is solving **large batches** of small-to-medium QPs in a single GPU launch, while exposing the solve as a **differentiable** layer for PyTorch and JAX. It **also scales to large-scale** sparse and dense QPs, in the same class as GPU solvers such as [cuClarabel](https://github.com/cvxgrp/CuClarabel), [cuOpt](https://github.com/NVIDIA/cuopt), and [QOCO-GPU](https://github.com/qoco-org/qoco).\n\n## Problem Formulation\n\ncuPIQP solves convex QPs of the form:\n\n$$\n\\begin{aligned}\n\\min_{x} \\quad \u0026 \\tfrac{1}{2} x^\\top P x + c^\\top x \\\\\n\\text{s.t.} \\quad \u0026 A x = b \\\\\n\u0026 h_l \\leq G x \\leq h_u \\\\\n\u0026 x_l \\leq x \\leq x_u\n\\end{aligned}\n$$\n\nwhere $P \\succeq 0$ is positive semidefinite, $x \\in \\mathbb{R}^n$ is the decision variable, $A \\in \\mathbb{R}^{p \\times n}$ defines equality constraints, and $G \\in \\mathbb{R}^{m \\times n}$ defines two-sided inequality constraints. Any bound may be $\\pm\\infty$ and is handled without numerical penalty.\n\n## Features\n\n- **Native batched solving** — solve $B$ independent QPs in parallel from a single solver instance by stacking inputs along a leading batch axis; the inner kernels operate on `(B, …)` tensors with no Python-side loop. Built for sampling-based control, RL rollouts, and parameter sweeps.\n- **Differentiable** — efficient computation of the VJPs via implicit differentiation by reusing the condensed factor from the forward solve. Integration into PyTorch and JAX are on the way!\n- **Scales to large QPs** — the same solver handles large sparse and dense QPs, competing with GPU solvers such as cuClarabel, cuOpt, and QOQO-GPU.\n- **Fully GPU-resident solver** — all iterations, KKT factorizations, and linear algebra run on the GPU with very few host–device synchronization during solve.\n- **CUDA Graph capture** — solver iterations are recorded as CUDA graphs and replayed with near-zero kernel-launch overhead.\n- **Versatile problem types** — supports general dense and sparse QPs, as well as multistage optimization problems like optimal control problems (OCPs).\n\n## Installation\n\n### Requirements\n\n- Python 3.10 or later.\n- Linux with an NVIDIA GPU and a working CUDA driver/runtime stack.\n- CUDA Python packages compatible with the installed CUDA stack. This repository\n  defines extras for CUDA 12.x and CUDA 13.x, including CuPy and nvmath runtime libraries.\n\ncuPIQP is not currently published on PyPI. From a local clone, install it\nwith one CUDA extra:\n\n```bash\ngit clone https://github.com/PREDICT-EPFL/cupiqp.git\ncd cupiqp\npython -m pip install \".[cuda12]\"  # choose for a CUDA 12.x CuPy environment\n# or:\npython -m pip install \".[cuda13]\"  # choose for a CUDA 13.x CuPy environment\n```\n\nIf an appropriate CuPy installation is already present in the environment,\nthe base local install is:\n\n```bash\npython -m pip install .\n```\n\n\n### Verifying the install\n\n```python\nimport cupy as cp\nfrom cupiqp import DenseSolver\n\nsolver = DenseSolver()\nsolver.settings.verbose = True\nsolver.setup(P=cp.eye(3), c=cp.zeros(3))\nsolver.solve()\n```\n\n### Runtime dependencies (for reference)\n\nPulled automatically by the relevant extras above:\n\n- [CuPy](https://cupy.dev/) — GPU array library (`cupy-cuda12x` or `cupy-cuda13x`).\n- [Warp](https://github.com/NVIDIA/warp) — JIT-compiled CUDA kernels.\n- [nvmath-python](https://developer.nvidia.com/nvmath-python) — cuBLAS / cuSOLVER / cuSPARSE / cuDSS bindings and CUDA runtime packages via the selected CUDA extra.\n- [NVTX](https://github.com/NVIDIA/NVTX) — profiling annotations.\n- [socu](https://github.com/PREDICT-EPFL/socu) — required by the `MultistageSolver` as the linear system solver.\n\n## Quick Start\n\nRefer to [this simple example](./examples/getting_started.ipynb) to get started.\n\n## Comparison with PIQP\n\nCuPIQP implements the same [Proximal Interior Point](https://doi.org/10.1007/s12532-024-00263-9) algorithm as [PIQP](https://github.com/PREDICT-EPFL/piqp), targeting large-scale QPs on NVIDIA GPUs:\n\n| | **PIQP** (CPU) | **CuPIQP** (GPU) |\n|---|---|---|\n| **Language** | C++ (with C / Python / Matlab / Julia / Rust bindings) | Python (CuPy + Warp) |\n| **Execution** | CPU (multi-threaded via OpenMP) | Fully GPU-resident (CUDA) |\n| **Batched solving** | Designed for single solves | Designed for batched solves with massive parallelism |\n| **Differentiable** | No | Yes, via implicit differentiation |\n\n\n## Citing\n\nIf you use cuPIQP in academic work, please cite the underlying PIQP algorithm\npaper and this implementation. A BibTeX entry will be provided once a\ncuPIQP-specific publication is available.\n\n## License\n\nBSD-2-Clause. See `LICENSE`.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpredict-epfl%2Fcupiqp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpredict-epfl%2Fcupiqp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpredict-epfl%2Fcupiqp/lists"}