Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions cpp/src/mip/problem/load_balanced_problem.cu
Original file line number Diff line number Diff line change
Expand Up @@ -282,9 +282,11 @@ void create_variable_graph(const raft::handle_t* handle_ptr,
template <typename i_t>
void compact_bins(std::vector<i_t>& bins, i_t num_items)
{
auto found_last_bin = std::lower_bound(bins.begin(), bins.end(), num_items) - bins.begin();
auto max_degree_cnst = 2 << (found_last_bin - 3);
if (max_degree_cnst > 256) { found_last_bin = 10; }
auto found_last_bin = std::lower_bound(bins.begin(), bins.end(), num_items) - bins.begin();
if (found_last_bin >= 3) {
auto max_degree_cnst = 2 << (found_last_bin - 3);
if (max_degree_cnst > 256) { found_last_bin = 10; }
}
// bins[0:found_last_bin-1] = 0;
for (int i = 2; i <= found_last_bin - 1; ++i) {
bins[i] = bins[1];
Expand Down
5 changes: 5 additions & 0 deletions cpp/src/mip/problem/problem.cu
Original file line number Diff line number Diff line change
Expand Up @@ -777,6 +777,11 @@ void problem_t<i_t, f_t>::compute_binary_var_table()
template <typename i_t, typename f_t>
void problem_t<i_t, f_t>::compute_related_variables(double time_limit)
{
if (n_variables == 0) {
related_variables.resize(0, handle_ptr->get_stream());
related_variables_offsets.resize(0, handle_ptr->get_stream());
return;
}
auto pb_view = view();

handle_ptr->sync_stream();
Expand Down