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

Method removeDeadBlockOutputs

source/python.js:6932–6945  ·  view source on GitHub ↗
(node)

Source from the content-addressed store, hash-verified

6930 return has_side_effects;
6931 }
6932 removeDeadBlockOutputs(node) {
6933 if (node.kind() !== 'prim::If' && node.kind() !== 'prim::GradOf') {
6934 return;
6935 }
6936 for (let i_1 = node.outputs().length; i_1 > 0; i_1--) {
6937 const i = i_1 - 1;
6938 if (!node.outputs()[i].hasUses()) {
6939 node.eraseOutput(i);
6940 for (const b of node.blocks()) {
6941 b.eraseOutput(i);
6942 }
6943 }
6944 }
6945 }
6946 removeDeadLoopOutputs() {
6947 }
6948 getOrCreateAliasDb() {

Callers 1

sweepMethod · 0.80

Calls 5

hasUsesMethod · 0.80
eraseOutputMethod · 0.80
blocksMethod · 0.80
kindMethod · 0.45
outputsMethod · 0.45

Tested by

no test coverage detected