Commit e68aa10
authored
vulkan: sort graph to allow more parallel execution (#15850)
* vulkan: sort graph to allow more parallel execution
Add a backend proc to allow the backend to modify the graph. The
vulkan implementation looks at which nodes depend on each other
and greedily reorders them to group together nodes that don't
depend on each other. It only reorders the nodes, doesn't change
the contents of any of them.
With #15489, this reduces the number of synchronizations needed.
* call optimize_graph per-split1 parent 0a16bf5 commit e68aa10
File tree
13 files changed
+154
-0
lines changed- ggml/src
- ggml-blas
- ggml-cann
- ggml-cpu
- ggml-cuda
- ggml-metal
- ggml-opencl
- ggml-rpc
- ggml-sycl
- ggml-vulkan
- ggml-webgpu
- ggml-zdnn
13 files changed
+154
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
114 | 114 | | |
115 | 115 | | |
116 | 116 | | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
117 | 120 | | |
118 | 121 | | |
119 | 122 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
463 | 463 | | |
464 | 464 | | |
465 | 465 | | |
| 466 | + | |
| 467 | + | |
| 468 | + | |
| 469 | + | |
| 470 | + | |
| 471 | + | |
| 472 | + | |
466 | 473 | | |
467 | 474 | | |
468 | 475 | | |
| |||
1298 | 1305 | | |
1299 | 1306 | | |
1300 | 1307 | | |
| 1308 | + | |
| 1309 | + | |
| 1310 | + | |
| 1311 | + | |
1301 | 1312 | | |
1302 | 1313 | | |
1303 | 1314 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
270 | 270 | | |
271 | 271 | | |
272 | 272 | | |
| 273 | + | |
273 | 274 | | |
274 | 275 | | |
275 | 276 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2690 | 2690 | | |
2691 | 2691 | | |
2692 | 2692 | | |
| 2693 | + | |
2693 | 2694 | | |
2694 | 2695 | | |
2695 | 2696 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
190 | 190 | | |
191 | 191 | | |
192 | 192 | | |
| 193 | + | |
193 | 194 | | |
194 | 195 | | |
195 | 196 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3135 | 3135 | | |
3136 | 3136 | | |
3137 | 3137 | | |
| 3138 | + | |
3138 | 3139 | | |
3139 | 3140 | | |
3140 | 3141 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6275 | 6275 | | |
6276 | 6276 | | |
6277 | 6277 | | |
| 6278 | + | |
6278 | 6279 | | |
6279 | 6280 | | |
6280 | 6281 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2838 | 2838 | | |
2839 | 2839 | | |
2840 | 2840 | | |
| 2841 | + | |
2841 | 2842 | | |
2842 | 2843 | | |
2843 | 2844 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
795 | 795 | | |
796 | 796 | | |
797 | 797 | | |
| 798 | + | |
798 | 799 | | |
799 | 800 | | |
800 | 801 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4063 | 4063 | | |
4064 | 4064 | | |
4065 | 4065 | | |
| 4066 | + | |
4066 | 4067 | | |
4067 | 4068 | | |
4068 | 4069 | | |
| |||
0 commit comments