Skip to content

Commit

Permalink
add some documentation, define number of threads per GPU as a constant
Browse files Browse the repository at this point in the history
  • Loading branch information
ChuckHastings committed Oct 23, 2023
1 parent 235f2b6 commit f0a27a4
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
2 changes: 2 additions & 0 deletions cpp/include/cugraph/mtmg/resource_manager.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,8 @@ class resource_manager_t {
* @param instance_manager_id a ncclUniqueId that is shared by all processes participating
* in this instance. All processes must use the same ID in this call, it is up
* to the calling code to share this ID properly before the call.
* @param n_streams The number of streams to create in a stream pool for
* each GPU. Defaults to 16.
*
* @return unique pointer to instance manager
*/
Expand Down
7 changes: 5 additions & 2 deletions cpp/tests/mtmg/threaded_test.cu
Original file line number Diff line number Diff line change
Expand Up @@ -94,8 +94,9 @@ class Tests_Multithreaded
size_t device_buffer_size{64 * 1024 * 1024};
size_t thread_buffer_size{4 * 1024 * 1024};

const int num_threads_per_gpu{4};
int num_gpus = gpu_list.size();
int num_threads = num_gpus * 4;
int num_threads = num_gpus * num_threads_per_gpu;

cugraph::mtmg::resource_manager_t resource_manager;

Expand All @@ -106,8 +107,10 @@ class Tests_Multithreaded
ncclUniqueId instance_manager_id;
ncclGetUniqueId(&instance_manager_id);

// Currently the only uses for multiple streams for each CPU threads
// associated with a particular GPU, which is a constant set above
auto instance_manager = resource_manager.create_instance_manager(
resource_manager.registered_ranks(), instance_manager_id, 4);
resource_manager.registered_ranks(), instance_manager_id, num_threads_per_gpu);

cugraph::mtmg::edgelist_t<vertex_t, weight_t, edge_t, edge_type_t> edgelist;
cugraph::mtmg::graph_t<vertex_t, edge_t, true, multi_gpu> graph;
Expand Down

0 comments on commit f0a27a4

Please sign in to comment.