(n)
| 7305 | return this._made_change; |
| 7306 | } |
| 7307 | propagateNode(n) { |
| 7308 | let outputs = []; |
| 7309 | const outputs_opt = torch._C.runNodeIfInputsAreConstant(n, this._ignore_custom_classes); |
| 7310 | if (outputs_opt) { |
| 7311 | outputs = outputs_opt; |
| 7312 | const graph = n.owningGraph(); |
| 7313 | const guard = new torch._C.WithInsertPoint(n); |
| 7314 | for (let i = 0; i < outputs.length; i++) { |
| 7315 | const new_output = torch._C.tryInsertConstant(graph, outputs[i]); |
| 7316 | if (new_output) { |
| 7317 | this._made_change = true; |
| 7318 | if (outputs[i].isNone()) { |
| 7319 | new_output.setType(n.outputs()[i].type()); |
| 7320 | } |
| 7321 | n.outputs()[i].replaceAllUsesWith(new_output); |
| 7322 | } |
| 7323 | } |
| 7324 | guard.dispose(); |
| 7325 | } |
| 7326 | } |
| 7327 | removeLoopNode(n) { |
| 7328 | const loop_input_offset = 2; |
| 7329 | for (let i = 0; i < n.outputs().length; i++) { |
no test coverage detected