Fix dual residual computation in final solution output - #1718
Conversation
Signed-off-by: yuwenchen95 <yuwchen@nvidia.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Enterprise Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughThe barrier solution calculation now includes ChangesQuadratic dual residual
Estimated code review effort: 2 (Simple) | ~10 minutes Mergeability Score: ⚪ Minimal · up to This localized fix corrects the reported dual-residual calculation and adds a regression test; no actionable merge-blocking risk remains beyond normal checks and review. Suggested reviewers: 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
Signed-off-by: yuwenchen95 <yuwchen@nvidia.com>
CI Test Summary✅ All 31 test job(s) passed. |
|
/merge |
Description
get_lp_stats()reported a spurious, largel2_dual_residualfor QPs and SOCPs solved via the barrier path, even at a fully optimal solution. The final-solution dual residual computed initeration_data_t::to_solution()(cpp/src/barrier/barrier.cu) omitted theQ*xquadratic term, computing only‖Aᵀy + z − c‖instead of‖Aᵀy + z − c − Qx‖.Adds the missing
Q*xterm to the reported dual residual, mirroring the existing correct pattern used internally.Also adds a regression test (
qp_diagonal_only_dual_residual) that reuses the diagonal-Hessian QP problem from the linked issue and assertsl2_dual_residualis near zero at the known optimum.Issue
Closes #1598