(body)
| 7340 | return !loop_might_run; |
| 7341 | } |
| 7342 | inlineIfBody(body) { |
| 7343 | const n = body.owningNode(); |
| 7344 | for (const body_node of body.nodes()) { |
| 7345 | body_node.moveBefore(n); |
| 7346 | } |
| 7347 | for (let i = 0; i < n.outputs().length; i++) { |
| 7348 | n.outputs()[i].replaceAllUsesWith(body.outputs()[i]); |
| 7349 | } |
| 7350 | n.destroy(); |
| 7351 | } |
| 7352 | inlineIf(n) { |
| 7353 | const input_bool = torch._C.constant_as(n.input(), 'toBool'); |
| 7354 | torch._C.AT_ASSERT(input_bool !== null); |
no test coverage detected