Skip to content

Commit 600d743

Browse files
authored
Merge pull request NVIDIA#837 from NVIDIA/release/26.02
Forward-merge release/26.02 into main
2 parents 4c419cc + 45bd8ce commit 600d743

File tree

6 files changed

+19
-11
lines changed

6 files changed

+19
-11
lines changed

cpp/src/dual_simplex/cuts.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2775,6 +2775,7 @@ void verify_cuts_against_saved_solution(const csr_matrix_t<i_t, f_t>& cuts,
27752775
#ifdef DUAL_SIMPLEX_INSTANTIATE_DOUBLE
27762776
template class cut_pool_t<int, double>;
27772777
template class cut_generation_t<int, double>;
2778+
template class knapsack_generation_t<int, double>;
27782779
template class tableau_equality_t<int, double>;
27792780
template class mixed_integer_rounding_cut_t<int, double>;
27802781

cpp/src/linear_programming/pdlp_constants.hpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@
1414
namespace cuopt::linear_programming::detail {
1515
inline constexpr int block_size = 128;
1616

17-
static std::pair<size_t, size_t> inline kernel_config_from_batch_size(const size_t batch_size)
17+
[[maybe_unused]] static std::pair<size_t, size_t> inline kernel_config_from_batch_size(
18+
const size_t batch_size)
1819
{
1920
assert(batch_size > 0 && "Batch size must be greater than 0");
2021
const size_t block_size = std::min(static_cast<size_t>(256), batch_size);

cpp/src/mip/feasibility_jump/feasibility_jump.cu

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -258,13 +258,15 @@ void fj_t<i_t, f_t>::copy_weights(const weight_t<i_t, f_t>& weights,
258258
fj_left_weights = make_span(cstr_left_weights),
259259
fj_right_weights = make_span(cstr_right_weights),
260260
new_weights = make_span(weights.cstr_weights)] __device__(i_t idx) {
261-
fj_weights[idx] = idx >= old_size ? 1. : new_weights[idx];
261+
f_t new_weight = idx >= old_size ? 1. : new_weights[idx];
262+
cuopt_assert(isfinite(new_weight), "invalid weight");
263+
cuopt_assert(new_weight >= 0.0, "invalid weight");
264+
new_weight = std::max(new_weight, 0.0);
265+
266+
fj_weights[idx] = idx >= old_size ? 1. : new_weight;
262267
// TODO: ask Alice how we can manage the previous left,right weights
263-
fj_left_weights[idx] = idx >= old_size ? 1. : new_weights[idx];
264-
fj_right_weights[idx] = idx >= old_size ? 1. : new_weights[idx];
265-
cuopt_assert(isfinite(fj_weights[idx]), "invalid weight");
266-
cuopt_assert(isfinite(fj_left_weights[idx]), "invalid left weight");
267-
cuopt_assert(isfinite(fj_right_weights[idx]), "invalid right weight");
268+
fj_left_weights[idx] = idx >= old_size ? 1. : new_weight;
269+
fj_right_weights[idx] = idx >= old_size ? 1. : new_weight;
268270
});
269271
thrust::transform(handle_ptr->get_thrust_policy(),
270272
weights.objective_weight.data(),

cpp/src/mip/feasibility_jump/feasibility_jump_impl_common.cuh

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/* clang-format off */
22
/*
3-
* SPDX-FileCopyrightText: Copyright (c) 2025, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
3+
* SPDX-FileCopyrightText: Copyright (c) 2025-2026, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
44
* SPDX-License-Identifier: Apache-2.0
55
*/
66
/* clang-format on */
@@ -138,14 +138,16 @@ HDI std::pair<f_t, f_t> feas_score_constraint(
138138
cuopt_assert(isfinite(new_lhs), "");
139139
cuopt_assert(isfinite(old_slack) && isfinite(new_slack), "");
140140

141+
cstr_weight = std::max(cstr_weight, 0.0);
142+
141143
f_t cstr_tolerance = fj.get_corrected_tolerance(cstr_idx);
142144

143145
bool old_viol = fj.excess_score(cstr_idx, current_lhs, c_lb, c_ub) < -cstr_tolerance;
144146
bool new_viol =
145147
fj.excess_score(cstr_idx, current_lhs + cstr_coeff * delta, c_lb, c_ub) < -cstr_tolerance;
146148

147-
bool old_sat = old_lhs < rhs + cstr_tolerance;
148-
bool new_sat = new_lhs < rhs + cstr_tolerance;
149+
bool old_sat = old_lhs <= rhs + cstr_tolerance;
150+
bool new_sat = new_lhs <= rhs + cstr_tolerance;
149151

150152
// equality
151153
if (fj.pb.integer_equal(c_lb, c_ub)) {

cpp/src/mip/feasibility_jump/feasibility_jump_kernels.cu

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/* clang-format off */
22
/*
3-
* SPDX-FileCopyrightText: Copyright (c) 2024-2025, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
3+
* SPDX-FileCopyrightText: Copyright (c) 2024-2026, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
44
* SPDX-License-Identifier: Apache-2.0
55
*/
66
/* clang-format on */
@@ -119,6 +119,7 @@ DI void update_weights(typename fj_t<i_t, f_t>::climber_data_t::view_t& fj)
119119
if (threadIdx.x == 0) {
120120
// DEVICE_LOG_DEBUG("weight of con %d updated to %g, excess %f\n", cstr_idx, new_weight,
121121
// curr_excess_score);
122+
new_weight = std::max(new_weight, 0.0);
122123
fj.cstr_weights[cstr_idx] = max(fj.cstr_weights[cstr_idx], new_weight);
123124
if (curr_lower_excess < 0.) {
124125
fj.cstr_left_weights[cstr_idx] = new_weight;

cpp/src/mip/local_search/local_search.cu

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,7 @@ void local_search_t<i_t, f_t>::start_cpufj_scratch_threads(population_t<i_t, f_t
8585
cpu_fj.fj_cpu->improvement_callback = [&population, problem_ptr = context.problem_ptr](
8686
f_t obj, const std::vector<f_t>& h_vec) {
8787
population.add_external_solution(h_vec, obj, solution_origin_t::CPUFJ);
88+
(void)problem_ptr;
8889
if (obj < local_search_best_obj) {
8990
CUOPT_LOG_TRACE("******* New local search best obj %g, best overall %g",
9091
problem_ptr->get_user_obj_from_solver_obj(obj),

0 commit comments

Comments
 (0)