[BUG] CUOPT_MIP_PRESOLVE is declared in constants.h but is not a registered parameter

Aperta
#1,728 1 commento 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
48/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
cpp
Ambito
backend

Direzione di ricerca

Inizia con cpp/include/cuopt/mathematical_optimization/constants.h e cpp/src/math_optimization/solver_settings.cu, quindi esamina i parametri correlati a MIP nelle vicinanze e riproduci la chiamata rifiutata a cuOptSetParameter. Determina se CUOPT_MIP_PRESOLVE doveva essere registrato o rimosso. Il lavoro è completato quando le costanti pubbliche e i parametri registrati corrispondono e i binding generati non espongono più un parametro rifiutato.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

awaiting response

Describe the bug

CUOPT_MIP_PRESOLVE is declared in the public constants header but is not a real parameter:

cpp/include/cuopt/mathematical_optimization/constants.h:66:#define CUOPT_MIP_PRESOLVE  "mip_presolve"

It is registered nowhere in cpp/src/math_optimization/solver_settings.cu and referenced nowhere else in the tree, so cuOptSetParameter(settings, CUOPT_MIP_PRESOLVE, ...) is rejected as an unknown parameter.

Comparing the two directions: all 109 distinct parameter names registered in solver_settings.cu are declared in constants.h, and CUOPT_MIP_PRESOLVE is the single declared name with no registration.

Steps/Code to reproduce bug

cuOptSolverSettings settings = NULL;
cuOptCreateSolverSettings(&settings);
cuOptSetParameter(settings, CUOPT_MIP_PRESOLVE, "1");   /* CUOPT_INVALID_ARGUMENT */

Expected behavior

Either register the parameter, or remove the constant. A public header should not advertise a parameter the solver rejects.

Additional context

This matters more than a stray macro because bindings are generated from this header rather than from a runtime list — the approach @mlubin confirmed in #1705. The Java bindings generate CuOptConstants.java from constants.h at build time, so CuOptConstants.CUOPT_MIP_PRESOLVE exists today and any caller using it gets a runtime error. The same would apply to any future Go, Rust, or C# binding generated the same way.

Note there is a separate, real mip_presolve-adjacent parameter set (CUOPT_MIP_PROBING, the CUOPT_MIP_HYPER_HEURISTIC_PRESOLVE_MAX_ROUNDS family), so the fix is not simply renaming — it needs someone who knows whether a mip_presolve toggle was intended.

Found while verifying #1705.

Lingua principale
Cuda
Stelle
1.1k
Fork
249
Merge medio
1g 11h
PR unite (30g)
123

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di NVIDIA/cuopt

Tutte le issue di NVIDIA/cuopt

Issue simili

Altre issue su Backend & API Design

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.