Commit 4c608be
authored
[Relay] Remove DynamicToStatic pass from graph runtime build (#10691)
Closes #10692
To solve this problem, we can either remove this pass from `relay.build(...)` pipeline or run `DynamicToStatic` in both VM and non-VM paths. I propose to remove it because (1) usually `DynamicToStatic` is supposed to be applied after model import and (2) the only case running `DynamicToStatic` during `relay.build(...)` helps is when the input is entirely static but a frontend fails to produce a static mod AND a user forgets to run `DynamicToStatic` after model import.
I hope the latter case happens rarely but if not, that's something we should fix in the frontend side. We should avoid relying on `DynamicToStatic` that runs during `relay.build(...)` since not all use cases of TVM use `relay.build(...)` (BYOC, for example).1 parent 9f58089 commit 4c608be
File tree
5 files changed
+16
-19
lines changed- python/tvm/relay/frontend
- src/relay/backend
- tests/python/frontend/tensorflow
5 files changed
+16
-19
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1281 | 1281 | | |
1282 | 1282 | | |
1283 | 1283 | | |
1284 | | - | |
| 1284 | + | |
1285 | 1285 | | |
1286 | 1286 | | |
1287 | 1287 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
641 | 641 | | |
642 | 642 | | |
643 | 643 | | |
644 | | - | |
| 644 | + | |
645 | 645 | | |
646 | 646 | | |
647 | 647 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
36 | | - | |
| 36 | + | |
37 | 37 | | |
38 | 38 | | |
39 | 39 | | |
| |||
846 | 846 | | |
847 | 847 | | |
848 | 848 | | |
849 | | - | |
| 849 | + | |
850 | 850 | | |
851 | 851 | | |
852 | 852 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
226 | 226 | | |
227 | 227 | | |
228 | 228 | | |
229 | | - | |
230 | | - | |
231 | | - | |
232 | | - | |
233 | | - | |
234 | | - | |
235 | | - | |
236 | | - | |
237 | | - | |
238 | | - | |
239 | 229 | | |
240 | 230 | | |
241 | 231 | | |
| |||
252 | 242 | | |
253 | 243 | | |
254 | 244 | | |
255 | | - | |
256 | 245 | | |
257 | 246 | | |
258 | 247 | | |
259 | 248 | | |
260 | 249 | | |
| 250 | + | |
261 | 251 | | |
262 | 252 | | |
263 | 253 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
147 | 147 | | |
148 | 148 | | |
149 | 149 | | |
| 150 | + | |
150 | 151 | | |
151 | 152 | | |
152 | 153 | | |
| |||
2421 | 2422 | | |
2422 | 2423 | | |
2423 | 2424 | | |
| 2425 | + | |
2424 | 2426 | | |
2425 | 2427 | | |
2426 | 2428 | | |
2427 | | - | |
| 2429 | + | |
2428 | 2430 | | |
2429 | 2431 | | |
2430 | 2432 | | |
| |||
2433 | 2435 | | |
2434 | 2436 | | |
2435 | 2437 | | |
| 2438 | + | |
2436 | 2439 | | |
2437 | 2440 | | |
2438 | 2441 | | |
| |||
2494 | 2497 | | |
2495 | 2498 | | |
2496 | 2499 | | |
2497 | | - | |
| 2500 | + | |
| 2501 | + | |
2498 | 2502 | | |
2499 | 2503 | | |
2500 | 2504 | | |
| |||
5572 | 5576 | | |
5573 | 5577 | | |
5574 | 5578 | | |
5575 | | - | |
| 5579 | + | |
5576 | 5580 | | |
5577 | 5581 | | |
5578 | 5582 | | |
| |||
5607 | 5611 | | |
5608 | 5612 | | |
5609 | 5613 | | |
5610 | | - | |
| 5614 | + | |
| 5615 | + | |
| 5616 | + | |
| 5617 | + | |
5611 | 5618 | | |
5612 | 5619 | | |
5613 | 5620 | | |
| |||
0 commit comments