From 01316e97d308b1558d20dd10e9139f82f0cd800a Mon Sep 17 00:00:00 2001 From: Miles Lubin Date: Fri, 21 Aug 2026 11:28:15 -0400 Subject: [PATCH] Skip duals when quadratic constraints are present Signed-off-by: Miles Lubin --- src/MOI_wrapper.jl | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/MOI_wrapper.jl b/src/MOI_wrapper.jl index e25398c..c5c9c46 100644 --- a/src/MOI_wrapper.jl +++ b/src/MOI_wrapper.jl @@ -1309,7 +1309,9 @@ function MOI.optimize!(model::Optimizer) is_mip = Ref{Int32}() ret = cuOptIsMIP(model.cuopt_problem, is_mip) _check_ret(ret, "cuOptIsMIP") - if is_mip[] == 0 + # TODO: Retrieve duals for quadratic constraints once + # https://github.com/NVIDIA/cuopt/issues/1751 is fixed. + if is_mip[] == 0 && isempty(model.quadratic_constraint_info) ret = cuOptGetDualSolution(model.cuopt_solution, model.dual_solution) _check_ret(ret, "cuOptGetDualSolution") end