-
Notifications
You must be signed in to change notification settings - Fork 62
New issue
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
[Pass] Graph extractor pass #2119
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR introduces a new pass for extracting subgraphs from an ONNX model based on exact input and output tensor names. Key changes include:
- Adding a new pass implementation in onnxscript/ir/passes/common/graph_extration.py.
- Enhancing pre- and post-condition checks in the pass infrastructure in onnxscript/ir/passes/_pass_infra.py.
- Exporting the new create_value_mapping function via the convenience modules.
Reviewed Changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
File | Description |
---|---|
onnxscript/ir/passes/common/graph_extration.py | Implements the new ExtractGraphPass for subgraph extraction. |
onnxscript/ir/passes/_pass_infra.py | Updates PassBase and PassManager for improved invariant checking. |
onnxscript/ir/_convenience.py | Exports create_value_mapping and replace_nodes_and_values. |
onnxscript/ir/convenience.py | Imports and re-exports create_value_mapping. |
Comments suppressed due to low confidence (1)
onnxscript/ir/passes/common/graph_extration.py:1
- The filename 'graph_extration.py' appears to be misspelled; consider renaming it to 'graph_extraction.py' for clarity.
# Copyright (c) Microsoft Corporation.
❌ 3 Tests Failed:
View the top 3 failed test(s) by shortest run time
To view more test analytics, go to the Test Analytics Dashboard |
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
ExtractGraphPass
) inonnxscript/ir/passes/common/graph_extration.py
. This pass allows for the extraction of a sub-model defined by specific input and output tensor names.