Skip to content
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

Update to changed rmm::device_scalar API #1637

Merged
merged 5 commits into from
Jun 14, 2021
Merged
Show file tree
Hide file tree
Changes from 2 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
3 changes: 2 additions & 1 deletion cpp/src/community/triangles_counting.cu
Original file line number Diff line number Diff line change
Expand Up @@ -827,7 +827,8 @@ void TrianglesCount<IndexType>::count()
tcount_wrp();
else {
const int shMinBlkXSM = 6;
if (size_t{m_shared_mem_per_block * 8 / shMinBlkXSM} < (size_t)m_mat.N)
if (static_cast<size_t>(m_shared_mem_per_block * 8 / shMinBlkXSM) <
static_cast<size_t>(m_mat.N))
tcount_b2b();
else
tcount_bsh();
Expand Down
2 changes: 1 addition & 1 deletion cpp/src/components/weakly_connected_components.cu
Original file line number Diff line number Diff line change
Expand Up @@ -596,7 +596,7 @@ void weakly_connected_components_impl(raft::handle_t const &handle,
edge_first,
edge_first + new_num_edge_inserts);
auto num_unique_edges = static_cast<size_t>(thrust::distance(edge_first, unique_edge_last));
num_edge_inserts.set_value(num_unique_edges, handle.get_stream_view());
num_edge_inserts.set_value_async(num_unique_edges, handle.get_stream_view());
}

vertex_frontier.get_bucket(static_cast<size_t>(Bucket::cur)).clear();
Expand Down
7 changes: 5 additions & 2 deletions cpp/src/traversal/tsp.cu
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@

#include <utilities/high_res_timer.hpp>

#include "rmm/cuda_stream_view.hpp"
harrism marked this conversation as resolved.
Show resolved Hide resolved
#include "tsp.hpp"
#include "tsp_solver.hpp"

Expand Down Expand Up @@ -53,6 +54,8 @@ TSP::TSP(raft::handle_t const &handle,
warp_size_(handle_.get_device_properties().warpSize),
sm_count_(handle_.get_device_properties().multiProcessorCount),
restart_batch_(8192),
mylock_scalar_(stream_),
best_cost_scalar_(stream_),
neighbors_vec_((k_ + 1) * nodes_, stream_),
work_vec_(restart_batch_ * ((4 * nodes_ + 3 + warp_size_ - 1) / warp_size_ * warp_size_),
stream_),
Expand Down Expand Up @@ -81,9 +84,9 @@ void TSP::setup()

void TSP::reset_batch()
{
mylock_scalar_.set_value_zero(stream_);
mylock_scalar_.set_value_to_zero_async(stream_);
auto const max{std::numeric_limits<int>::max()};
best_cost_scalar_.set_value(max, stream_);
best_cost_scalar_.set_value_async(max, stream_);
}

void TSP::get_initial_solution(int const batch)
Expand Down