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

Method combineConcats

source/python.js:7650–7664  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

7648 }
7649 }
7650 combineConcats() {
7651 if (this._combinable_concats.length === 0) {
7652 return false;
7653 }
7654 const list_construct_inputs = this.getListConstructInputs();
7655 for (const node_and_new_list of list_construct_inputs) {
7656 const [node, inputs] = node_and_new_list;
7657 const new_list_construct = this.createListConstruct(inputs);
7658 const old_list_construct = node.input(0).node();
7659 new_list_construct.output().setType(old_list_construct.output().type());
7660 new_list_construct.insertBefore(node);
7661 old_list_construct.replaceAllUsesWith(new_list_construct);
7662 }
7663 return true;
7664 }
7665 run() {
7666 this.collectOptimizableConcats();
7667 const changed = this.combineConcats();

Callers 1

runMethod · 0.80

Calls 7

setTypeMethod · 0.80
replaceAllUsesWithMethod · 0.80
nodeMethod · 0.45
inputMethod · 0.45
outputMethod · 0.45
typeMethod · 0.45
insertBeforeMethod · 0.45

Tested by

no test coverage detected