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

オープン
#1,728 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
48/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
活発
技術スタック
cpp
領域
backend

調査の方向性

cpp/include/cuopt/mathematical_optimization/constants.h と cpp/src/math_optimization/solver_settings.cu から始め、次に近くにある MIP 関連のパラメーターを調べ、拒否された cuOptSetParameter 呼び出しを再現します。CUOPT_MIP_PRESOLVE が登録されることを意図されていたのか、それとも削除されたのかを判断します。公開定数と登録済みパラメーターが一致し、生成されたバインディングで拒否されたパラメーターが公開されなくなれば完了です。

索引モデルが issue の本文から書いたものです。

説明

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.

主要言語
Cuda
スター
1.1k
フォーク
249
平均マージ
1日 11時間
マージ済み PR(30日)
123

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

NVIDIA/cuopt のほかの issue

NVIDIA/cuopt の issue をすべて見る

似ている issue

Backend & API Design の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。