Skip to content

Commit b77239c

Browse files
committed
adjust mem_frugal_threshold computation
1 parent 5e053bd commit b77239c

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

cpp/src/structure/create_graph_from_edgelist_impl.cuh

+4-3
Original file line numberDiff line numberDiff line change
@@ -535,10 +535,11 @@ create_graph_from_partitioned_edgelist(
535535

536536
auto total_global_mem = handle.get_device_properties().totalGlobalMem;
537537
auto constexpr mem_frugal_ratio =
538-
0.05; // if the expected temporary buffer size exceeds the mem_frugal_ratio of the
539-
// total_global_mem, switch to the memory frugal approach
538+
0.5; // if the aggregate edge data size exceeds the mem_frugal_ratio of the total_global_mem
539+
// (in an approximate sense), switch to the memory frugal approach
540540
auto mem_frugal_threshold =
541-
static_cast<size_t>(static_cast<double>(total_global_mem / element_size) * mem_frugal_ratio);
541+
static_cast<size_t>(static_cast<double>(total_global_mem / element_size) * mem_frugal_ratio) /
542+
static_cast<size_t>(minor_comm_size);
542543

543544
std::vector<rmm::device_uvector<edge_t>> edge_partition_offsets;
544545
std::vector<rmm::device_uvector<vertex_t>> edge_partition_indices;

0 commit comments

Comments
 (0)