scope application of -undebug so that it only applies to cuopt targets#962
scope application of -undebug so that it only applies to cuopt targets#962tmckayus wants to merge 0 commit intoNVIDIA:mainfrom
Conversation
📝 WalkthroughWalkthroughThis PR refactors the application of the Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes 🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
📝 Coding Plan
Comment Tip CodeRabbit can scan for known vulnerabilities in your dependencies using OSV Scanner.OSV Scanner will automatically detect and report security vulnerabilities in your project's dependencies. No additional configuration is required. |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
cpp/CMakeLists.txt (1)
187-190: Update the explanatory comment to match the actual mechanism.Line 187-190 says
-UNDEBUGis applied viatarget_compile_definitions, but the implementation usestarget_compile_options. Keeping this comment accurate will prevent future confusion.Suggested comment-only fix
-# Note: -UNDEBUG is applied via target_compile_definitions (not add_definitions) -# to avoid leaking into dependencies like RMM that are built in-tree. -# See target_compile_definitions(cuopt ...) and target_compile_definitions(cuopt_cli ...) -# below, after those targets are defined. +# Note: -UNDEBUG is applied via target_compile_options (not add_definitions) +# to avoid leaking into dependencies like RMM that are built in-tree. +# See target_compile_options(cuopt ...) and target_compile_options(cuopt_cli ...) +# below, after those targets are defined.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@cpp/CMakeLists.txt` around lines 187 - 190, Update the explanatory comment to reflect that the -UNDEBUG flag is applied via target_compile_options rather than target_compile_definitions; locate the comment near the references to target_compile_definitions(cuopt ...) and target_compile_definitions(cuopt_cli ...) and change the wording to state that -UNDEBUG is applied via target_compile_options (not add_definitions) to avoid leaking into dependencies like RMM, mentioning the relevant targets (cuopt and cuopt_cli) for clarity.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Nitpick comments:
In `@cpp/CMakeLists.txt`:
- Around line 187-190: Update the explanatory comment to reflect that the
-UNDEBUG flag is applied via target_compile_options rather than
target_compile_definitions; locate the comment near the references to
target_compile_definitions(cuopt ...) and target_compile_definitions(cuopt_cli
...) and change the wording to state that -UNDEBUG is applied via
target_compile_options (not add_definitions) to avoid leaking into dependencies
like RMM, mentioning the relevant targets (cuopt and cuopt_cli) for clarity.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: d147777c-04c6-4d57-b8cb-e44c55caa54a
📒 Files selected for processing (5)
cpp/CMakeLists.txtcpp/libmps_parser/tests/CMakeLists.txtcpp/tests/CMakeLists.txtcpp/tests/examples/routing/CMakeLists.txtcpp/tests/linear_programming/CMakeLists.txt
|
accidentally closed ... |
|
continuing |
With global -UNDEBUG settings, cuopt wheel builds could be turning on debug assertions in non-cuopt libraries built from source (we saw this recently with librmm). We should only set -UNDEBUG on cuopt targets.