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

Method inlineIf

source/python.js:7352–7359  ·  view source on GitHub ↗
(n)

Source from the content-addressed store, hash-verified

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);
7355 const block_index = input_bool ? 0 : 1;
7356 this.ConstantPropagation(n.blocks().at(block_index));
7357 this.inlineIfBody(n.blocks().at(block_index));
7358 this._made_change = true;
7359 }
7360 replaceAndRemoveIfOutput(n, i, replacement) {
7361 n.outputs()[i].replaceAllUsesWith(replacement);
7362 n.eraseOutput(i);

Callers 1

ConstantPropagationMethod · 0.80

Calls 5

ConstantPropagationMethod · 0.80
atMethod · 0.80
blocksMethod · 0.80
inlineIfBodyMethod · 0.80
inputMethod · 0.45

Tested by

no test coverage detected