-
Notifications
You must be signed in to change notification settings - Fork 7
Clean up graph passes and use common IR passes #151
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
base: main
Are you sure you want to change the base?
Conversation
Signed-off-by: Justin Chu <[email protected]>
Signed-off-by: Justin Chu <[email protected]>
Signed-off-by: Justin Chu <[email protected]>
Signed-off-by: Justin Chu <[email protected]>
Signed-off-by: Justin Chu <[email protected]>
Signed-off-by: Justin Chu <[email protected]>
Signed-off-by: Justin Chu <[email protected]>
|
The only difference is this: The CSE pass in onnx-ir does not consider non deterministic ops. We may want to include them as an update. |
|
@justinchuby Thank you for the massive effort on this modernization — it’s absolutely the right direction for the codebase. Unfortunately, I wasn’t able to get this branch to pass 100% of the regression tests in my environment. The remaining failures were primarily related to aggressive DCE pruning in nested conditionals, as well as some complex shape-inference edge cases (notably FFT / Scatter). To unblock the migration, I’ve opened a derivative PR #152 ( |
Use IR apis and common passes. Eliminate the use of getattr in the touched files.
Fixed a bug where CSE would cause the same value to duplicate as graph outputs, which is invalid in onnx.
Removal of legacy helpers and predicates:
_is_elem,_count_consumers,_find_next_consumer_idx,_nodes, and_inputsfrom both the test imports and test implementations, favoring direct use of IR containers and methods.Direct use of IR API:
V_irwith the standardir.valthroughout all tests, ensuring consistency with the IR API.ir.Functionand passing functions directly toir.Model, removing complex logic for function attachment.Test logic and assertion modernization:
list(g)org.inputs,g.outputs) instead of helper functions, and used direct attribute access for names.Documentation update:
@enpasos