Skip to content

Commit

Permalink
temporary parameter tweaks for testing
Browse files Browse the repository at this point in the history
  • Loading branch information
seunghwak committed Sep 25, 2024
1 parent 3bb6602 commit 8be2a3f
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 5 deletions.
12 changes: 9 additions & 3 deletions cpp/tests/utilities/base_fixture.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -77,10 +77,16 @@ inline auto make_pool(bool use_max = false)
// effect the maximum amount of parallel tests, and therefore `tests/CMakeLists.txt`
// `_CUGRAPH_TEST_PERCENT` default value will need to be audited.
auto const [free, total] = rmm::available_device_memory();
auto const min_alloc =
use_max ? rmm::align_down(std::min(free, total / 2), rmm::CUDA_ALLOCATION_ALIGNMENT)
// EOS: 1 node 0.94 succeeded 0.95 failed, 2+ nodes 0.97 succeeded 0.98 failed
auto const init_alloc =
use_max ? rmm::align_down(std::min(free, static_cast<size_t>(total * 0.93)), rmm::CUDA_ALLOCATION_ALIGNMENT)
: rmm::align_down(std::min(free, total / 10), rmm::CUDA_ALLOCATION_ALIGNMENT);
return rmm::mr::make_owning_wrapper<rmm::mr::pool_memory_resource>(make_cuda(), min_alloc);
std::optional<size_t> max_alloc{};
if (use_max) {
max_alloc = init_alloc;
}
std::cout << "init_alloc ratio=" << static_cast<double>(init_alloc) / static_cast<double>(total) << std::endl;
return rmm::mr::make_owning_wrapper<rmm::mr::pool_memory_resource>(make_cuda(), init_alloc, max_alloc);
}

inline auto make_binning()
Expand Down
2 changes: 1 addition & 1 deletion cpp/tests/utilities/mg_utilities.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ std::unique_ptr<raft::handle_t> initialize_mg_handle(size_t pool_size)
--gpu_row_comm_size;
}

cugraph::partition_manager::init_subcomm(*handle, gpu_row_comm_size);
cugraph::partition_manager::init_subcomm(*handle, std::max(comm_size / 8, 1));

return std::move(handle);
}
Expand Down
2 changes: 1 addition & 1 deletion cpp/tests/utilities/test_graphs.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@ class Rmat_Usecase : public detail::TranslateGraph_Usecase {
// cuMemAddressReserve
// (https://developer.nvidia.com/blog/introducing-low-level-gpu-virtual-memory-management), we
// can reduce the temporary memory requirement to (1 / num_partitions) * (original data size)
size_t constexpr num_partitions_per_gpu = 4;
size_t constexpr num_partitions_per_gpu = 8;
size_t num_partitions =
num_partitions_per_gpu * static_cast<size_t>(multi_gpu ? handle.get_comms().get_size() : 1);

Expand Down

0 comments on commit 8be2a3f

Please sign in to comment.