Skip to content

Commit a55f5e8

Browse files
authored
Expose DeduplicateHashedInitializersPass (#163)
Expose DeduplicateHashedInitializersPass to the ir.passes.common namespace. Signed-off-by: Justin Chu <justinchuby@users.noreply.github.com>
1 parent 4a6791a commit a55f5e8

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

src/onnx_ir/passes/common/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
"CheckerPass",
77
"ClearMetadataAndDocStringPass",
88
"CommonSubexpressionEliminationPass",
9+
"DeduplicateHashedInitializersPass",
910
"DeduplicateInitializersPass",
1011
"IdentityEliminationPass",
1112
"InlinePass",
@@ -36,6 +37,7 @@
3637
IdentityEliminationPass,
3738
)
3839
from onnx_ir.passes.common.initializer_deduplication import (
40+
DeduplicateHashedInitializersPass,
3941
DeduplicateInitializersPass,
4042
)
4143
from onnx_ir.passes.common.inliner import InlinePass

src/onnx_ir/passes/common/identity_elimination.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ class IdentityEliminationPass(ir.passes.InPlacePass):
1919
"""Pass for eliminating redundant Identity nodes.
2020
2121
This pass removes Identity nodes according to the following rules:
22+
2223
1. For any node of the form `y = Identity(x)`, where `y` is not an output
2324
of any graph, replace all uses of `y` with a use of `x`, and remove the node.
2425
2. If `y` is an output of a graph, and `x` is not an input of any graph,

0 commit comments

Comments
 (0)