| 257 | } |
| 258 | |
| 259 | void AllGather::do_execute(ExecEnv& env) { |
| 260 | CompNode::UnorderedSet used_cn; |
| 261 | for (auto i : output()) { |
| 262 | if (!used_cn.insert(i->comp_node()).second) |
| 263 | continue; |
| 264 | auto runner = [this, cn = i->comp_node()]() { |
| 265 | owner_graph()->event().signal_inplace<cg::event::BeforeKernel>(this, cn); |
| 266 | m_copy_strategy->execute_on_comp_node(cn); |
| 267 | owner_graph()->event().signal_inplace<cg::event::AfterKernel>(this, cn); |
| 268 | }; |
| 269 | env.dispatch_on_comp_node(i->comp_node(), runner); |
| 270 | } |
| 271 | } |
| 272 | |
| 273 | VarNodeArray AllGather::grad(const VarNodeArray& out_grad) { |
| 274 | CompNode::UnorderedMap<VarNode*> cn_reduced; |
nothing calls this directly
no test coverage detected