(n)
| 18250 | } |
| 18251 | } |
| 18252 | addLoopLoadStores(n) { |
| 18253 | const [body_block] = n.blocks(); |
| 18254 | const loop_vars = this.addControlFlowLoadStores(body_block); |
| 18255 | for (const name of loop_vars.definedVariables()) { |
| 18256 | const parent_type = this.environment_stack.findInAnyFrame(name); |
| 18257 | if (!parent_type) { |
| 18258 | continue; |
| 18259 | } |
| 18260 | const block_type = loop_vars.findInThisFrame(name); |
| 18261 | const unified_type = torch._C.unifyTypes(parent_type, block_type); |
| 18262 | this.addNodeInput(n, parent_type, name); |
| 18263 | this.addBlockInput(body_block, unified_type, name); |
| 18264 | this.addBlockOutput(body_block, block_type, name); |
| 18265 | this.addNodeOutput(n, unified_type, name); |
| 18266 | } |
| 18267 | } |
| 18268 | addControlFlowLoadStores(block) { |
| 18269 | this.pushFrame(block); |
| 18270 | for (const n of block.nodes()) { |
no test coverage detected