Development Plan¶
-
Add support for differentiation along the dual variables in
SolMapLayer.- Allow each constraint to be named.
- Return dual variables in a dictionary, for example,
{"eq_cons": dual_eq, "ineq_cons": dual_ineq}.
-
Further refine portable parallel execution.
- The cross-platform compatibility path is implemented: Linux retains the
tested
forkbehavior, while Windows and macOS use shared-memory threads for solution-map backward workers without requiring an entry-point guard. - Forced-thread tests cover full- and reduced-KKT gradients and standalone
script execution without an
if __name__ == "__main__":guard. - A future cleanup can remove the unused Linux backward process pool from
ValueFuncLayerand expose an optional multiprocessing-context setting.
- The cross-platform compatibility path is implemented: Linux retains the
tested
-
Use the CvxpyLayers forward and backward parallel settings for DiffAPQP.
- DiffAPQP limits nested BLAS/OpenMP execution to one native thread per backward worker. DiffCP applies this limit to its parallel forward pass but does not currently apply the same explicit limit to its backward thread pool.
- DiffAPQP also retains a fork-based backward process pool on Linux, while using threads on macOS and Windows; DiffCP uses threads on all three platforms.
- DiffAPQP creates persistent worker pools and reuses them across calls, while DiffCP creates and closes a thread pool for each forward or backward call.
- DiffAPQP uses one
max_n_coressetting for both passes, whereas DiffCP supports separaten_jobs_forwardandn_jobs_backwardsettings.