| 37 | } |
| 38 | |
| 39 | std::tuple<std::string, std::string> split_address( |
| 40 | const std::string& address_and_port) { |
| 41 | auto index = address_and_port.find_last_of(':'); |
| 42 | mgb_assert(index != std::string::npos, "missing ':' in server address"); |
| 43 | return {address_and_port.substr(0, index), address_and_port.substr(index + 1)}; |
| 44 | } |
| 45 | |
| 46 | std::shared_ptr<OpDef> make_from_op_node(cg::OperatorNodeBase* node) { |
| 47 | auto&& comm = node->cast_final_safe<opr::CollectiveComm>(); |