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

Method loopWillNotRun

source/python.js:7335–7341  ·  view source on GitHub ↗
(node)

Source from the content-addressed store, hash-verified

7333 n.destroy();
7334 }
7335 loopWillNotRun(node) {
7336 const [trip_count, start_cond] = node.inputs();
7337 const iter_len = torch._C.constant_as(trip_count, 'toInt', 1);
7338 const cond_val = torch._C.constant_as(start_cond, 'toBool', true);
7339 const loop_might_run = cond_val && iter_len > 0;
7340 return !loop_might_run;
7341 }
7342 inlineIfBody(body) {
7343 const n = body.owningNode();
7344 for (const body_node of body.nodes()) {

Callers 1

ConstantPropagationMethod · 0.80

Calls 1

inputsMethod · 0.45

Tested by

no test coverage detected