Skip to content

Commit

Permalink
Cleanup mpi branch after merge/rebase
Browse files Browse the repository at this point in the history
  • Loading branch information
biddisco committed Nov 6, 2024
1 parent fb80d4b commit 00b4b37
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 18 deletions.
8 changes: 4 additions & 4 deletions include/dlaf/init.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,13 +38,13 @@ struct configuration {
bool print_config = false;
std::size_t num_np_gpu_streams_per_thread = 3;
std::size_t num_hp_gpu_streams_per_thread = 3;
std::size_t umpire_host_memory_pool_initial_block_bytes = 1 << 30;
std::size_t umpire_host_memory_pool_next_block_bytes = 1 << 30;
std::size_t umpire_host_memory_pool_initial_block_bytes = 1 << 16;
std::size_t umpire_host_memory_pool_next_block_bytes = 1 << 16;
std::size_t umpire_host_memory_pool_alignment_bytes = 16;
double umpire_host_memory_pool_coalescing_free_ratio = 1.0;
double umpire_host_memory_pool_coalescing_reallocation_ratio = 1.0;
std::size_t umpire_device_memory_pool_initial_block_bytes = 1 << 30;
std::size_t umpire_device_memory_pool_next_block_bytes = 1 << 30;
std::size_t umpire_device_memory_pool_initial_block_bytes = 1 << 16;
std::size_t umpire_device_memory_pool_next_block_bytes = 1 << 16;
std::size_t umpire_device_memory_pool_alignment_bytes = 16;
double umpire_device_memory_pool_coalescing_free_ratio = 1.0;
double umpire_device_memory_pool_coalescing_reallocation_ratio = 1.0;
Expand Down
18 changes: 4 additions & 14 deletions include/dlaf/sender/transform_mpi.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
#include <type_traits>
#include <utility>

#include <pika/debugging/print.hpp>
#include <pika/execution.hpp>
#include <pika/mpi.hpp>

Expand All @@ -25,9 +24,6 @@

namespace dlaf::comm::internal {

template <int Level>
static pika::debug::detail::print_threshold<Level, 0> dla_debug("DLA_MPI");

/// This helper "consumes" a CommunicatorPipelineExclusiveWrapper ensuring that after this call
/// the one passed as argument gets destroyed. All other types left as they are
/// by the second overload.
Expand All @@ -52,8 +48,6 @@ struct MPICallHelper {

template <typename... Ts>
auto operator()(Ts&&... ts) -> decltype(std::move(f)(dlaf::common::internal::unwrap(ts)...)) {
using namespace pika::debug::detail;
PIKA_DETAIL_DP(dla_debug<5>, debug(str<>("MPICallHelper"), pika::debug::print_type<Ts...>(", ")));
using result_type = decltype(std::move(f)(dlaf::common::internal::unwrap(ts)...));
if constexpr (std::is_void_v<result_type>) {
std::move(f)(dlaf::common::internal::unwrap(ts)...);
Expand All @@ -74,16 +68,12 @@ MPICallHelper(F&&) -> MPICallHelper<std::decay_t<F>>;
template <typename F, typename Sender,
typename = std::enable_if_t<pika::execution::experimental::is_sender_v<Sender>>>
[[nodiscard]] decltype(auto) transformMPI(F&& f, Sender&& sender) {
using dlaf::internal::continues_on;
namespace ex = pika::execution::experimental;
namespace mpi = pika::mpi::experimental;
namespace mpid = pika::mpi::experimental::detail;

PIKA_DETAIL_DP(dla_debug<5>, debug(str<>("MPI fn\n")));
auto snd1 =
std::forward<Sender>(sender) |
mpi::transform_mpi(dlaf::common::internal::ConsumeRvalues{MPICallHelper{std::forward<F>(f)}});
return ex::make_unique_any_sender(std::move(snd1));
namespace dci = dlaf::common::internal;
return std::forward<Sender>(sender) //
| mpi::transform_mpi(dci::ConsumeRvalues{MPICallHelper{std::forward<F>(f)}}); //
// @todo - check this | ex::drop_operation_state();
}

template <typename F>
Expand Down
1 change: 1 addition & 0 deletions src/init.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ std::ostream& operator<<(std::ostream& os, const configuration& cfg) {
os << " umpire_device_memory_pool_coalescing_reallocation_ratio = " << cfg.umpire_device_memory_pool_coalescing_reallocation_ratio << std::endl;
os << " num_gpu_blas_handles = " << cfg.num_gpu_blas_handles << std::endl;
os << " num_gpu_lapack_handles = " << cfg.num_gpu_lapack_handles << std::endl;
os << " mpi_pool = " << pika::mpi::experimental::get_pool_name() << std::endl;
// clang-format on
return os;
}
Expand Down

0 comments on commit 00b4b37

Please sign in to comment.