MCPcopy Index your code
hub / github.com/lutzroeder/netron / inlineIfBody

Method inlineIfBody

source/python.js:7342–7351  ·  view source on GitHub ↗
(body)

Source from the content-addressed store, hash-verified

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);

Callers 1

inlineIfMethod · 0.80

Calls 6

owningNodeMethod · 0.80
moveBeforeMethod · 0.80
replaceAllUsesWithMethod · 0.80
destroyMethod · 0.80
nodesMethod · 0.45
outputsMethod · 0.45

Tested by

no test coverage detected