Repository navigation
Conversation
PTNobel
force-pushed
the
ptn/moreau-mlx
branch
from
September 19, 2026 06:54
e7099ae to
0fddb80
Compare
SteveDiamond
approved these changes
Oct 24, 2026
SteveDiamond
left a comment
Collaborator
There was a problem hiding this comment.
The CPU-only MLX adapter and its per-forward solver state/VJP handling look reasonable, with useful primal/dual, batching, PSD, and repeated-call coverage. Approving the implementation as a stacked draft. Its historical CI failures predate the latest #248 updates; rebase onto that foundation and rerun with the packaged native fixes before merging. I did not run MLX tests locally.
This branch has not been deployed
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.
ChatGPT generated:
Add an explicit
solver=cp.MOREAUbackend for MLX using Moreau's CPU solver. The adapter supports batching and custom VJPs for primal and dual outputs, including direct cones, PSD coordinate scaling, and vectorized cone-dual recovery. MLX keeps DIFFCP as its default.This is the second PR in the Moreau stack, based on #248 (
ptn/moreau-default), and contains only the MLX adapter, its documentation, and its regression tests. It uses CPU solves even when MLX arrays live on a Metal device; native Metal execution is outside this change.All 58 MLX tests pass against companion Moreau stack tip
4b1b73627fff8ceaec002198b3ada080ebc28537. The adapter files pass pre-commit, including Pyright. The MLX-specific diff is unchanged by the rebase onto #248's compilation fixes. This remains a draft alongside the foundation until the required Moreau changes, including moreau-project/moreau#13 and moreau-project/moreau#22, are available to package-based CI.