23#include <pybind11/pytypes.h>
24#include <unordered_map>
30 py::module shamcomm_module = m.def_submodule(
"comm",
"comm library");
32 shamcomm_module.def(
"get_timer", [](std::string name) {
36 shamcomm_module.def(
"get_timers", []() {
42 [](std::unordered_map<std::string, f64> start, std::unordered_map<std::string, f64> end) {
43 std::unordered_map<std::string, f64> deltas{};
46 deltas[k] = shamalgs::collective::allreduce_max(end[k] - start[k]);
MPI string gather / allgather helpers (declarations; implementations in shamalgs/src/collective/gathe...
namespace for communication related stuff
Pybind11 include and definitions.
#define Register_pymod(placeholdername)
Register a python module init function using static initialisation.
const std::vector< std::string > & get_possible_keys()
return all possible keys for the internal timers
f64 get_timer(std::string timername)
get a timer value
const std::unordered_map< std::string, f64 > & get_timers()
return all internal timers