Draft
Conversation
initial attempts at adding a smooth canon for maximum
Ipopt interface prototype
adding more smooth canonicalizers
* adds oracles and bounds class to ipopt interface * adds some settings and solver lists changes for IPOPT * adds nlp solver option and can call ipopt * adds more experiments for integrating ipopt as a solver interface * passing the problem through the inversion * add some more extra changes * adding nlmatrixstuffing --------- Co-authored-by: William Zijie Zhang <william@gridmatic.com>
Co-authored-by: William Zijie Zhang <william@gridmatic.com>
* adding many tests, new smoothcanon for min, and improvements to ipopt_nlpif * fixing last two tests * add another example, qcp * adding example for acopf * add control of a car example done --------- Co-authored-by: William Zijie Zhang <william@gridmatic.com>
* update solution statuses thanks to odow * removes unusued solver information --------- Co-authored-by: William Zijie Zhang <william@gridmatic.com>
* getting rocket landing example to work * add changes to the jacobian computation --------- Co-authored-by: William Zijie Zhang <william@gridmatic.com>
* adding many more example of non-convex functions * making lots of progress on understanding good canonicalizations --------- Co-authored-by: William Zijie Zhang <william@gridmatic.com>
Co-authored-by: William Zijie Zhang <william@gridmatic.com>
Introduces DiffEngineParamConeProg, which replaces the tensor-based ParamConeProg with a C expression tree that evaluates A, b, q, d (and P for QPs) via the diff engine's automatic differentiation. Uses the evaluate-at-zero trick: since all expressions are affine in x after DCP2Cone, the Jacobian gives A and the gradient gives q directly. Also adds SymbolicQuadForm and DivExpression converters to the diff engine, updates ConicSolver/QpSolver to accept the new program type, and includes comprehensive comparison tests against the SCIPY backend. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Resolve canon_backend=None to DEFAULT_CANON_BACKEND in construct_solving_chain so that changing the default actually propagates through all code paths. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
DIFF_ENGINE doesn't yet support all atoms, so keep CPP as default. The matrix_stuffing benchmarks now use ASV parameterized benchmarks to compare both backends side-by-side. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
n_params was only used for a size validation check and can be computed from n_param_nodes + each node's size. This simplifies the API by removing one argument from problem_register_params and one field to maintain. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The dimensions are now read directly from param_node->d1/d2 inside the C implementation, so the Python binding and caller no longer need to pass them. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Precompute total parameter size when parameters are registered instead of recomputing it on every update_params call. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Document why these use generic make_index rather than custom C nodes: hot-path cost is dominated by Jacobian memcpy, not index lookup, and the Hessian sparsity limitation is identical either way. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* Extract diff engine bindings into standalone SparseDiffPy package Move C bindings (_bindings/) to the new SparseDiffPy package at SparseDifferentiation/SparseDiffPy and import via `from sparsediffpy import _sparsediffengine as _diffengine`. Remove the diff_engine_core submodule and its build configuration. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * make sparsediffpy a dependency * ci: trigger CI to verify sparsediffpy PyPI install Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
# Conflicts: # README.md # cvxpy/atoms/__init__.py # cvxpy/problems/problem.py # cvxpy/reductions/solvers/defines.py # cvxpy/reductions/solvers/solving_chain.py # cvxpy/settings.py
# Conflicts: # CLAUDE.md # cvxpy/reductions/solvers/nlp_solvers/diff_engine/_bindings/bindings.c # cvxpy/reductions/solvers/solving_chain.py # diff_engine_core
The import used `import _diffengine` directly, which isn't available. Updated to `from sparsediffpy import _sparsediffengine as _diffengine` to match the rest of the codebase. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Inherit from ParamProb so DiffEngineParamConeProg is no longer a duck-typed stand-in: move split_solution to the base class, simplify isinstance checks to use ParamProb, deduplicate format_constraints by delegating to _build_restruct_operator, and fix PowConeND ndim==1 bug in the shared operator builder. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* clarified 0 iteration termination * add tests * removed print statements * trigger CI --------- Co-authored-by: William Zijie Zhang <william@gridmatic.com>
…aths Update _convert_matmul to use the unified make_left_matmul binding which accepts (param_or_none, child, csr_data, csr_indices, csr_indptr, m, n). For updatable parameters, build a dense CSR so all entries can change between solves via refresh_param_values. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Use value_sparse.toarray() for parameters with sparse_idx to avoid the deprecation warning from .value on sparse CVXPY expressions. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Replace _has_parameters helper with direct isinstance(arg, cp.Parameter) checks. Use value_sparse for sparse parameters to avoid deprecation warnings. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
… PR) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Please include a short summary of the change.
Issue link (if applicable):
Type of change
Contribution checklist