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

Method hasSideEffects

source/python.js:6921–6931  ·  view source on GitHub ↗
(node)

Source from the content-addressed store, hash-verified

6919 return this.getOrCreateAliasDb().writesToWildcard(node);
6920 }
6921 hasSideEffects(node) {
6922 const it = this._memo.get(node);
6923 if (it) {
6924 return it;
6925 }
6926 const has_side_effects = node.hasSideEffects() ||
6927 node.blocks().some((b) => Array.from(b.nodes()).some((n) => this.hasSideEffects(n))) ||
6928 this.hasUntrackedMutation(node);
6929 this._memo.set(node, has_side_effects);
6930 return has_side_effects;
6931 }
6932 removeDeadBlockOutputs(node) {
6933 if (node.kind() !== 'prim::If' && node.kind() !== 'prim::GradOf') {
6934 return;

Callers 2

markMethod · 0.80
supportedNodeMethod · 0.80

Calls 7

blocksMethod · 0.80
hasUntrackedMutationMethod · 0.80
maybeOperatorMethod · 0.80
aliasAnalysisKindMethod · 0.80
getMethod · 0.45
nodesMethod · 0.45
setMethod · 0.45

Tested by

no test coverage detected