Skip to content
Draft
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
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ class gpu_lp_solution_t : public lp_solution_interface_t<i_t, f_t> {
solution_.get_primal_solution().data(),
solution_.get_primal_solution().size(),
stream);
stream.synchronize();
stream.sync();
return result;
}

Expand All @@ -77,7 +77,7 @@ class gpu_lp_solution_t : public lp_solution_interface_t<i_t, f_t> {
solution_.get_dual_solution().data(),
solution_.get_dual_solution().size(),
stream);
stream.synchronize();
stream.sync();
return result;
}

Expand All @@ -88,7 +88,7 @@ class gpu_lp_solution_t : public lp_solution_interface_t<i_t, f_t> {
auto stream = reduced_cost.stream();
std::vector<f_t> result(reduced_cost.size());
raft::copy(result.data(), reduced_cost.data(), reduced_cost.size(), stream);
stream.synchronize();
stream.sync();
return result;
}

Expand Down Expand Up @@ -154,7 +154,7 @@ class gpu_lp_solution_t : public lp_solution_interface_t<i_t, f_t> {
ws.current_primal_solution_.data(),
ws.current_primal_solution_.size(),
stream);
stream.synchronize();
stream.sync();
return result;
}

Expand All @@ -167,7 +167,7 @@ class gpu_lp_solution_t : public lp_solution_interface_t<i_t, f_t> {
std::vector<f_t> result(ws.current_dual_solution_.size());
raft::copy(
result.data(), ws.current_dual_solution_.data(), ws.current_dual_solution_.size(), stream);
stream.synchronize();
stream.sync();
return result;
}

Expand All @@ -180,7 +180,7 @@ class gpu_lp_solution_t : public lp_solution_interface_t<i_t, f_t> {
std::vector<f_t> result(ws.initial_primal_average_.size());
raft::copy(
result.data(), ws.initial_primal_average_.data(), ws.initial_primal_average_.size(), stream);
stream.synchronize();
stream.sync();
return result;
}

Expand All @@ -193,7 +193,7 @@ class gpu_lp_solution_t : public lp_solution_interface_t<i_t, f_t> {
std::vector<f_t> result(ws.initial_dual_average_.size());
raft::copy(
result.data(), ws.initial_dual_average_.data(), ws.initial_dual_average_.size(), stream);
stream.synchronize();
stream.sync();
return result;
}

Expand All @@ -205,7 +205,7 @@ class gpu_lp_solution_t : public lp_solution_interface_t<i_t, f_t> {
auto stream = ws.current_ATY_.stream();
std::vector<f_t> result(ws.current_ATY_.size());
raft::copy(result.data(), ws.current_ATY_.data(), ws.current_ATY_.size(), stream);
stream.synchronize();
stream.sync();
return result;
}

Expand All @@ -218,7 +218,7 @@ class gpu_lp_solution_t : public lp_solution_interface_t<i_t, f_t> {
std::vector<f_t> result(ws.sum_primal_solutions_.size());
raft::copy(
result.data(), ws.sum_primal_solutions_.data(), ws.sum_primal_solutions_.size(), stream);
stream.synchronize();
stream.sync();
return result;
}

Expand All @@ -230,7 +230,7 @@ class gpu_lp_solution_t : public lp_solution_interface_t<i_t, f_t> {
auto stream = ws.sum_dual_solutions_.stream();
std::vector<f_t> result(ws.sum_dual_solutions_.size());
raft::copy(result.data(), ws.sum_dual_solutions_.data(), ws.sum_dual_solutions_.size(), stream);
stream.synchronize();
stream.sync();
return result;
}

Expand All @@ -245,7 +245,7 @@ class gpu_lp_solution_t : public lp_solution_interface_t<i_t, f_t> {
ws.last_restart_duality_gap_primal_solution_.data(),
ws.last_restart_duality_gap_primal_solution_.size(),
stream);
stream.synchronize();
stream.sync();
return result;
}

Expand All @@ -260,7 +260,7 @@ class gpu_lp_solution_t : public lp_solution_interface_t<i_t, f_t> {
ws.last_restart_duality_gap_dual_solution_.data(),
ws.last_restart_duality_gap_dual_solution_.size(),
stream);
stream.synchronize();
stream.sync();
return result;
}

Expand Down Expand Up @@ -406,7 +406,7 @@ class gpu_mip_solution_t : public mip_solution_interface_t<i_t, f_t> {
std::vector<f_t> result(solution_.get_solution().size());
raft::copy(
result.data(), solution_.get_solution().data(), solution_.get_solution().size(), stream);
stream.synchronize();
stream.sync();
return result;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ struct segmented_sum_handler_t {
i_t problem_size)
{
cub::DeviceSegmentedReduce::Sum(
nullptr, byte_needed_, input, output, batch_size, problem_size, stream_view_);
nullptr, byte_needed_, input, output, batch_size, problem_size, stream_view_.get());

segmented_sum_storage_.resize(byte_needed_, stream_view_);

Expand All @@ -32,7 +32,7 @@ struct segmented_sum_handler_t {
output,
batch_size,
problem_size,
stream_view_);
stream_view_.get());
}

template <typename InputIteratorT, typename ReductionOpT>
Expand All @@ -51,9 +51,9 @@ struct segmented_sum_handler_t {
problem_size,
reduction_op,
initial_value,
stream_view_.value());
stream_view_.get());

segmented_sum_storage_.resize(byte_needed_, stream_view_.value());
segmented_sum_storage_.resize(byte_needed_, stream_view_.get());

cub::DeviceSegmentedReduce::Reduce(segmented_sum_storage_.data(),
byte_needed_,
Expand All @@ -63,7 +63,7 @@ struct segmented_sum_handler_t {
problem_size,
reduction_op,
initial_value,
stream_view_.value());
stream_view_.get());
}

size_t byte_needed_;
Expand Down
Loading