MCPcopy
hub / github.com/lutzroeder/netron / addLoopLoadStores

Method addLoopLoadStores

source/python.js:18252–18267  ·  view source on GitHub ↗
(n)

Source from the content-addressed store, hash-verified

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()) {

Callers 1

Calls 9

blocksMethod · 0.80
definedVariablesMethod · 0.80
findInAnyFrameMethod · 0.80
findInThisFrameMethod · 0.80
addNodeInputMethod · 0.80
addBlockInputMethod · 0.80
addBlockOutputMethod · 0.80
addNodeOutputMethod · 0.80

Tested by

no test coverage detected