(block, iter)
| 18545 | n.destroy(); |
| 18546 | } |
| 18547 | deleteAfterExitNodes(block, iter) { |
| 18548 | const nodes = block.nodes(); |
| 18549 | if (iter === nodes.end()) { |
| 18550 | return; |
| 18551 | } |
| 18552 | const insert = new torch._C.WithInsertPoint(block.nodes().front()); |
| 18553 | for (const it of Array.from(nodes).reverse()) { |
| 18554 | if (it === iter) { |
| 18555 | break; |
| 18556 | } |
| 18557 | if (it !== block.return_node()) { |
| 18558 | this.destroyNodeAfterExit(it); |
| 18559 | } |
| 18560 | } |
| 18561 | this.destroyNodeAfterExit(iter); |
| 18562 | insert.dispose(); |
| 18563 | } |
| 18564 | updateTargetBlock(block) { |
| 18565 | if (torch._C.ExitTransformer.owningNodeKind(block) === 'prim::Loop' && this._current_exit_kind === 'prim::LoopContinuation') { |
| 18566 | this._target_block = block; |
no test coverage detected