Skip to content

Conversation

@Transurgeon
Copy link
Member

No description provided.

Transurgeon and others added 2 commits January 13, 2026 20:09
Documents build commands, DNLP architecture, NLP solver system,
and development workflows for this CVXPY fork.

Co-Authored-By: Claude Opus 4.5 <[email protected]>
@Transurgeon Transurgeon marked this pull request as draft January 14, 2026 01:18
@github-actions
Copy link

github-actions bot commented Jan 14, 2026

Benchmarks that have stayed the same:

   before           after         ratio
 [07bd2721]       [f06a65f6]
      827±0ms          863±0ms     1.04  simple_QP_benchmarks.LeastSquares.time_compile_problem
      278±0ms          287±0ms     1.03  slow_pruning_1668_benchmark.SlowPruningBenchmark.time_compile_problem
      242±0ms          247±0ms     1.02  simple_QP_benchmarks.SimpleQPBenchmark.time_compile_problem
     14.3±0ms         14.5±0ms     1.02  simple_LP_benchmarks.SimpleFullyParametrizedLPBenchmark.time_compile_problem
      4.33±0s          4.37±0s     1.01  huber_regression.HuberRegression.time_compile_problem
      5.06±0s          5.10±0s     1.01  optimal_advertising.OptimalAdvertising.time_compile_problem
      284±0ms          286±0ms     1.01  matrix_stuffing.ParamSmallMatrixStuffing.time_compile_problem
      11.3±0s          11.4±0s     1.01  simple_LP_benchmarks.SimpleLPBenchmark.time_compile_problem
      1.38±0s          1.39±0s     1.01  matrix_stuffing.ParamConeMatrixStuffing.time_compile_problem
      22.8±0s          22.8±0s     1.00  sdp_segfault_1132_benchmark.SDPSegfault1132Benchmark.time_compile_problem
      689±0ms          689±0ms     1.00  matrix_stuffing.ConeMatrixStuffingBench.time_compile_problem
      148±0ms          148±0ms     1.00  high_dim_convex_plasticity.ConvexPlasticity.time_compile_problem
      1.90±0s          1.89±0s     1.00  simple_QP_benchmarks.UnconstrainedQP.time_compile_problem
      5.02±0s          5.00±0s     1.00  svm_l1_regularization.SVMWithL1Regularization.time_compile_problem
     14.6±0ms         14.5±0ms     0.99  simple_QP_benchmarks.ParametrizedQPBenchmark.time_compile_problem
      529±0ms          525±0ms     0.99  semidefinite_programming.SemidefiniteProgramming.time_compile_problem
      1.05±0s          1.05±0s     0.99  finance.FactorCovarianceModel.time_compile_problem
      13.7±0s          13.5±0s     0.99  finance.CVaRBenchmark.time_compile_problem
     40.4±0ms         40.0±0ms     0.99  matrix_stuffing.SmallMatrixStuffing.time_compile_problem
      1.65±0s          1.63±0s     0.99  tv_inpainting.TvInpainting.time_compile_problem
      238±0ms          235±0ms     0.99  gini_portfolio.Murray.time_compile_problem
      323±0ms          318±0ms     0.99  gini_portfolio.Yitzhaki.time_compile_problem
      1.13±0s          1.11±0s     0.99  gini_portfolio.Cajas.time_compile_problem
      962±0ms          924±0ms     0.96  simple_LP_benchmarks.SimpleScalarParametrizedLPBenchmark.time_compile_problem
      3.34±0s          3.04±0s     0.91  quantum_hilbert_matrix.QuantumHilbertMatrix.time_compile_problem

Transurgeon and others added 2 commits January 13, 2026 20:51
Integrates the DNLP diff engine as an alternative canonicalization backend
for affine coefficient extraction. For affine expressions f(x) = Ax + b,
the diff engine computes A via Jacobian and b via f(0), bypassing LinOp trees.

Changes:
- Add DIFFENGINE_CANON_BACKEND constant to settings.py
- Export constant in cvxpy/__init__.py
- Implement _affine_diffengine() in CoeffExtractor with correct variable ordering
- Add fallback to SCIPY in canonInterface.get_problem_matrix for LinOp-level calls

Features:
- Optional dependency: falls back to SCIPY if dnlp_diff_engine not installed
- Graceful fallback for unsupported atoms or variable mismatches
- ~3x average speedup on benchmarks (57 tests, 100% correctness)

Usage:
  problem.solve(solver=cp.SCS, canon_backend=cp.DIFFENGINE_CANON_BACKEND)
  # Or via environment variable:
  CVXPY_DEFAULT_CANON_BACKEND=DIFFENGINE

Co-Authored-By: Claude Opus 4.5 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants