Commit 31af28f
authored
[pass] Create check to ensure in-place passes are actually inplace (#2192)
This pull request introduces validation to ensure the in-place property
of a pass is respected.
Validation of in-place property:
*
[`onnxscript/ir/passes/_pass_infra.py`](diffhunk://#diff-70c7e5b3422f4daaf1611d4f76578c96e4c5894cced3d51718efa0290219f7f5R139-R152):
Added checks to ensure that if a pass is declared in-place, the returned
model must be the same object as the input model, and if not in-place,
the returned model must be a different object. Raises `PassError` if
these conditions are not met.1 parent 2e89a2c commit 31af28f
1 file changed
Lines changed: 14 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
136 | 136 | | |
137 | 137 | | |
138 | 138 | | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
139 | 153 | | |
140 | 154 | | |
141 | 155 | | |
| |||
0 commit comments