Commit dc6e233
committed
[Relax] Implement relax.transform.TopologicalSort
This commit implements a utility `relax.transform.TopologicalSort`,
which can re-order the bindings that occur in a
`relax.DataflowBlock`. This is not intended for use in a
general-purpose optimization pipeline, but instead as a utility that
may be used as needed in specific cases. For example, normalization
of unit tests that should not depend on the order of variable binding.1 parent 254e90a commit dc6e233
File tree
4 files changed
+871
-0
lines changed- python/tvm/relax/transform
- src/relax/transform
- tests/python/relax
4 files changed
+871
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
72 | 72 | | |
73 | 73 | | |
74 | 74 | | |
| 75 | + | |
75 | 76 | | |
76 | 77 | | |
77 | 78 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
233 | 233 | | |
234 | 234 | | |
235 | 235 | | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
236 | 259 | | |
237 | 260 | | |
238 | 261 | | |
| |||
0 commit comments