We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
This design describes a stateful Editor api for editing ONNX graph structures. It provides an intuitive select and modify experience.
Editor
from onnxscript import ir editor = ir.editing.Editor(graph)
Users can select a part of the graph:
editor.select("node_a") node_b: ir.None editor.select(node_b)
editor.select_inputs(value1, value2) editor.select_outputs(value3, value4)
editor.select(node_b) editor.remove_selection(safe=True)
editor.select_inputs(value1, value2) editor.select_outputs(value3, value4) editor.remove_selection(safe=True)
Removing a subgraph and stich the connections.
For example
node_a -> node_b -> node_c ==Remove(b)==> node_a -> node_c node_a -> {node_b1, node_b2} -> node_c ==Remove(b1,b2)==> node_a -> node_c
We need to analyze cases when the removal subgraph has multiple outputs and design a good default
The reverse of Remove
editor.select_inputs(value1, value2) editor.select_outputs(value3, value4) editor.insert(inputs, outputs, nodes)
editor.select_inputs(value1, value2) editor.select_outputs(value3, value4) editor.replace(new_inputs, new_outputs, nodes, safe=True)
The text was updated successfully, but these errors were encountered:
justinchuby
No branches or pull requests
This design describes a stateful
Editor
api for editing ONNX graph structures. It provides an intuitive select and modify experience.Select
Users can select a part of the graph:
Remove
Removing a subgraph and stich the connections.
For example
We need to analyze cases when the removal subgraph has multiple outputs and design a good default
Insert
The reverse of Remove
Replace
The text was updated successfully, but these errors were encountered: