-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
124 lines (113 loc) · 4.54 KB
/
Copy pathpyproject.toml
File metadata and controls
124 lines (113 loc) · 4.54 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
[build-system]
requires = ["setuptools>=64"]
build-backend = "setuptools.build_meta"
[project]
name = "cupiqp"
version = "0.1.0"
description = "GPU-accelerated proximal interior-point QP solver (cuPIQP)."
readme = "README.md"
requires-python = ">=3.10"
license = "BSD-2-Clause"
authors = [
{ name = "Fenglong Song", email = "fenglong.song@epfl.ch" },
]
keywords = [
"quadratic programming",
"optimization",
"interior-point method",
"gpu",
"cuda",
"cupy",
"warp",
"differentiable",
]
classifiers = [
"Development Status :: 3 - Alpha",
"Intended Audience :: Science/Research",
"Operating System :: POSIX :: Linux",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Topic :: Scientific/Engineering :: Mathematics",
]
# Runtime dependencies installed for every `pip install .`.
#
# numpy / scipy / warp-lang / nvmath-python / nvtx resolve cleanly from PyPI.
# `socu` (block-structured Warp kernels backing `MultistageSolver`) is NOT on
# PyPI yet, so it is pulled straight from GitHub via a PEP 508 direct reference.
# It is listed here as a core dependency so the multistage backend works out of
# the box after a plain `pip install .`.
#
# WARNING: the `socu @ git+...` direct reference makes this project
# NON-uploadable to PyPI (PyPI rejects direct-URL dependencies). Before any
# PyPI release, publish socu to PyPI and pin it as "socu>=x".
#
# CUDA-bound packages (cupy-cuda12x / cuda13x, torch+cuXY, jax-cudaXY) are still
# NOT listed here — install them via the matching extra (see optional extras).
dependencies = [
"numpy>=2.0",
"scipy>=1.13",
"warp-lang>=1.12",
"nvmath-python>=0.7.0",
"nvtx>=0.2",
"socu @ git+https://github.com/PREDICT-EPFL/socu.git",
]
[project.optional-dependencies]
# --- CUDA / CuPy ---------------------------------------------------------
# CuPy ships as separate wheels per CUDA major version (cupy-cuda12x for
# CUDA 12.x, cupy-cuda13x for CUDA 13.x). Pick the one matching the CUDA
# version reported by ``nvidia-smi``. nvmath-python's CUDA extras provide
# the matching NVIDIA runtime libraries, including cuDSS for the sparse backend:
#
# pip install "cupiqp[cuda12]" -> CUDA 12.x driver/runtime
# pip install "cupiqp[cuda13]" -> CUDA 13.x driver/runtime
#
# These are mutually exclusive — installing both will resolve, but only the
# wheel matching the driver actually loads at runtime.
cuda12 = ["cupy-cuda12x", "nvmath-python[cu12]>=0.7.0"]
cuda13 = ["cupy-cuda13x", "nvmath-python[cu13]>=0.7.0"]
# --- Differentiable layers ----------------------------------------------
# The `cupiqp.torch` and `cupiqp.jax` packages are always shipped in the
# wheel, but they can only be imported when the matching ML framework is
# installed. These extras pull that framework in so the corresponding package
# becomes usable:
#
# pip install "cupiqp[cuda13,torch]" -> enables `from cupiqp.torch import ...`
# pip install "cupiqp[cuda13,jax]" -> enables `from cupiqp.jax import ...`
#
# Version floors are minimum-tested versions, not pins — pick the wheel
# variant whose CUDA build matches your stack.
torch = ["torch>=2.4"]
jax = ["jax>=0.4", "jaxlib>=0.4"]
# NOTE: the multistage backend (`MultistageSolver`) is a first-class backend
# alongside dense and sparse. Its `socu` dependency ships by default via the
# core [dependencies] above, so there is deliberately NO `multistage` extra.
# Everything — both differentiable layers (multistage already ships by default):
# pip install "cupiqp[cuda13,all]"
all = ["torch>=2.4", "jax>=0.4", "jaxlib>=0.4"]
test = ["pytest>=7"]
dev = [
"pytest>=7",
"torch>=2.4",
"jax>=0.4",
"jaxlib>=0.4",
]
[project.urls]
Homepage = "https://github.com/PREDICT-EPFL/cupiqp"
Repository = "https://github.com/PREDICT-EPFL/cupiqp"
Issues = "https://github.com/PREDICT-EPFL/cupiqp/issues"
# --- packaging -------------------------------------------------------------
#
# The `cupiqp` package and its subpackages (`cupiqp.dense`, `cupiqp.sparse`,
# `cupiqp.multistage`, `cupiqp.torch`, `cupiqp.jax`) each ship an
# `__init__.py`, so they are regular packages. `namespaces = true` (the
# default) is kept so setuptools still discovers everything matching
# `cupiqp*`. The `__init__.py` files in the KKT-backend subpackages also let
# static tooling (e.g. the mkdocstrings/griffe API-doc generator) discover and
# document those modules.
[tool.setuptools.packages.find]
where = ["."]
include = ["cupiqp*"]
namespaces = true