-
Notifications
You must be signed in to change notification settings - Fork 227
refactor: keep the GPU warm-start path out of host-only translation units #1803
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
27 commits
Select commit
Hold shift + click to select a range
0f5ae25
refactor: split host-only members out of CUDA translation units
ramakrishnap-nv 386b883
refactor: make to_optimization_problem a free function
ramakrishnap-nv 57545af
refactor: keep the GPU warm-start path out of host-only translation u…
ramakrishnap-nv 5f80e9e
Merge branch 'main' into split/1-host-device-tus
ramakrishnap-nv 7e5737f
test: add gtest coverage for the host/device solver-settings and CPU …
ramakrishnap-nv e55ebec
test: cover the <int, float> solver_settings_t GPU-facing instantiations
ramakrishnap-nv c92008a
fix: unbreak conda-cpp-build after macro-comma break in solver_settin…
ramakrishnap-nv 4cd9ff1
fix: revert <int, float> solver_settings_t tests, float is never inst…
ramakrishnap-nv c77ffde
Merge remote-tracking branch 'origin/main' into pr-1801
ramakrishnap-nv fd9e28d
Merge remote-tracking branch 'origin/main' into split/1-host-device-tus
ramakrishnap-nv 020cf6f
refactor: move the unsupported-feature predicate out of the client's …
ramakrishnap-nv e10b5b3
Merge remote-tracking branch 'origin/main' into split/1-host-device-tus
ramakrishnap-nv 7de9056
refactor: pass the problem and settings into should_disable_unsupported
ramakrishnap-nv 781c544
Merge remote-tracking branch 'origin/split/1-host-device-tus' into HEAD
ramakrishnap-nv 0f0a506
Merge remote-tracking branch 'origin/split/2-devirtualize-to-optimiza…
ramakrishnap-nv 9745294
Merge remote-tracking branch 'origin/main' into HEAD
ramakrishnap-nv d1c11c4
Merge remote-tracking branch 'origin/split/2-devirtualize-to-optimiza…
ramakrishnap-nv 63172d0
docs: trim redundant comments and drop the orphaned doxygen block
ramakrishnap-nv c4b4f01
Merge branch 'main' into split/2-devirtualize-to-optimization-problem
ramakrishnap-nv 144b308
Merge remote-tracking branch 'origin/main' into HEAD
ramakrishnap-nv f817d73
Merge remote-tracking branch 'origin/split/2-devirtualize-to-optimiza…
ramakrishnap-nv 12e2613
Merge remote-tracking branch 'origin/main' into HEAD
ramakrishnap-nv b809784
fix: instantiate the float warm-start helpers in PDLP-only builds
ramakrishnap-nv 4bda7e8
fix: match the warm-start float guard to the accessors it calls
ramakrishnap-nv 33e3338
refactor: name the warm-start helpers after what they copy and where
ramakrishnap-nv 0199465
Merge remote-tracking branch 'origin/main' into split/3-settings-host…
ramakrishnap-nv 2212af6
Merge branch 'main' into split/3-settings-host-constructible
ramakrishnap-nv File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,68 @@ | ||
| /* clang-format off */ | ||
| /* | ||
| * SPDX-FileCopyrightText: Copyright (c) 2024-2026, NVIDIA CORPORATION & AFFILIATES. All rights reserved. | ||
| * SPDX-License-Identifier: Apache-2.0 | ||
| */ | ||
| /* clang-format on */ | ||
|
|
||
| // Warm-start accessors of pdlp_solver_settings_t, split out of solver_settings.cu. | ||
| // | ||
| // These are trivial `return member_;` getters -- they hand back a reference and emit no | ||
| // device code, even where the referent is a GPU type. The gRPC client needs them, so they | ||
| // build into the CUDA-free cuopt_client library while the rest of the class (which does | ||
| // real thrust/rmm work) stays in solver_settings.cu. | ||
| // | ||
| // Only these members are instantiated below, deliberately NOT `template class`: the class | ||
| // holds a pdlp_warm_start_data_t, so instantiating all of it here would pull in device | ||
| // ctor/dtor code that belongs in the CUDA TU. | ||
|
|
||
| #include <cuopt/export.hpp> | ||
| #include <cuopt/mathematical_optimization/pdlp/solver_settings.hpp> | ||
|
|
||
| // Required: the explicit instantiations below are guarded on MIP_INSTANTIATE_* / | ||
| // PDLP_INSTANTIATE_*. Without this header those macros are undefined, the guards | ||
| // evaluate false, and this TU silently compiles to zero symbols. | ||
| #include <mip_heuristics/mip_constants.hpp> | ||
|
|
||
| namespace cuopt::mathematical_optimization { | ||
|
|
||
| template <typename i_t, typename f_t> | ||
| const cpu_pdlp_warm_start_data_t<i_t, f_t>& | ||
| pdlp_solver_settings_t<i_t, f_t>::get_cpu_pdlp_warm_start_data() const noexcept | ||
| { | ||
| return cpu_pdlp_warm_start_data_; | ||
| } | ||
|
|
||
| template <typename i_t, typename f_t> | ||
| cpu_pdlp_warm_start_data_t<i_t, f_t>& | ||
| pdlp_solver_settings_t<i_t, f_t>::get_cpu_pdlp_warm_start_data() noexcept | ||
| { | ||
| return cpu_pdlp_warm_start_data_; | ||
| } | ||
|
|
||
| template <typename i_t, typename f_t> | ||
| const pdlp_warm_start_data_view_t<i_t, f_t>& | ||
| pdlp_solver_settings_t<i_t, f_t>::get_pdlp_warm_start_data_view() const noexcept | ||
| { | ||
| return pdlp_warm_start_data_view_; | ||
| } | ||
|
|
||
| #if MIP_INSTANTIATE_FLOAT || PDLP_INSTANTIATE_FLOAT | ||
| template CUOPT_EXPORT const cpu_pdlp_warm_start_data_t<int, float>& | ||
| pdlp_solver_settings_t<int, float>::get_cpu_pdlp_warm_start_data() const noexcept; | ||
| template CUOPT_EXPORT cpu_pdlp_warm_start_data_t<int, float>& | ||
| pdlp_solver_settings_t<int, float>::get_cpu_pdlp_warm_start_data() noexcept; | ||
| template CUOPT_EXPORT const pdlp_warm_start_data_view_t<int, float>& | ||
| pdlp_solver_settings_t<int, float>::get_pdlp_warm_start_data_view() const noexcept; | ||
| #endif | ||
|
|
||
| #if MIP_INSTANTIATE_DOUBLE | ||
| template CUOPT_EXPORT const cpu_pdlp_warm_start_data_t<int, double>& | ||
| pdlp_solver_settings_t<int, double>::get_cpu_pdlp_warm_start_data() const noexcept; | ||
| template CUOPT_EXPORT cpu_pdlp_warm_start_data_t<int, double>& | ||
| pdlp_solver_settings_t<int, double>::get_cpu_pdlp_warm_start_data() noexcept; | ||
| template CUOPT_EXPORT const pdlp_warm_start_data_view_t<int, double>& | ||
| pdlp_solver_settings_t<int, double>::get_pdlp_warm_start_data_view() const noexcept; | ||
| #endif | ||
|
|
||
| } // namespace cuopt::mathematical_optimization |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.