MCPcopy Create free account
hub / github.com/ml-explore/mlx / init

Function init

mlx/distributed/mpi/mpi.cpp:490–499  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

488}
489
490std::shared_ptr<GroupImpl> init(bool strict /* = false */) {
491 if (!mpi().init_safe()) {
492 if (strict) {
493 throw std::runtime_error("Cannot initialize MPI");
494 }
495 return nullptr;
496 }
497
498 return std::make_shared<MPIGroup>(mpi().world(), true);
499}
500
501} // namespace mlx::core::distributed::mpi

Callers 2

init_safeMethod · 0.70
to_groupFunction · 0.50

Calls 2

init_safeMethod · 0.80
worldMethod · 0.80

Tested by

no test coverage detected