Commit 55eb7b4
feat: multicore pipelining with wave-based parallel execution (#46)
* feat: multicore pipelining with wave-based parallel execution
- Compute topological waves during vxVerifyGraph: nodes in the same wave
have no inter-dependencies and can execute in parallel.
- Add ThreadPool with lazy global initialization (auto-detects core count).
- Modify execute_pipelined_graph to dispatch nodes wave-by-wave:
* single-node waves: fast path on caller thread
* multi-node waves: parallel dispatch via thread pool
- Add topo_waves field to VxCGraphData, initialized empty in vxCreateGraph.
- Fix deadlock in wave computation: store waves via g reference instead of
re-locking GRAPHS_DATA while already holding it.
All pipelining tests pass, including UserKernel stress tests.
* feat: OPENVX_PIPELINING_THREADS env var for thread pool configuration
- compute_pool_size() reads OPENVX_PIPELINING_THREADS env var
- unset/"0"/"" → auto-detect core count (up to 64)
- "1" → single-threaded (useful for debugging / baseline)
- "N" → exactly N threads
- Single-threaded mode still works and produces correct results
- All UserKernel tests pass with OPENVX_PIPELINING_THREADS=1,2,auto
* ci: add perf gate retry (up to 3 attempts) for VM noise robustness
* feat: add pipelining multicore sample with build files and README
* feat: add pipelining vs non-pipelining benchmark + real-world multi-scale CV sample
* fix: correct sample includes and API calls for rustVX headers
* docs: add top-level samples README with performance table
* fix: remove debug eprintln and compiled binaries from samples
* fix: correct include paths in samples (vx.h → VX/vx.h)
* fix: add missing vx_khr_pipelining.h includes and suppress unused var warning
---------
Co-authored-by: Simon <simon@rustvx.dev>1 parent 4fe2efb commit 55eb7b4
17 files changed
Lines changed: 2153 additions & 70 deletions
File tree
- .github/workflows
- docs
- openvx-core/src
- samples
- pipelining_multicore
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1157 | 1157 | | |
1158 | 1158 | | |
1159 | 1159 | | |
1160 | | - | |
| 1160 | + | |
1161 | 1161 | | |
1162 | | - | |
| 1162 | + | |
1163 | 1163 | | |
1164 | 1164 | | |
1165 | 1165 | | |
1166 | | - | |
1167 | | - | |
1168 | | - | |
1169 | | - | |
1170 | | - | |
1171 | | - | |
1172 | | - | |
1173 | | - | |
1174 | 1166 | | |
1175 | | - | |
1176 | | - | |
1177 | | - | |
1178 | | - | |
1179 | | - | |
1180 | | - | |
1181 | | - | |
1182 | | - | |
1183 | | - | |
1184 | | - | |
1185 | | - | |
1186 | | - | |
1187 | | - | |
1188 | | - | |
1189 | | - | |
1190 | | - | |
1191 | | - | |
1192 | | - | |
1193 | | - | |
1194 | | - | |
1195 | | - | |
1196 | | - | |
1197 | | - | |
1198 | | - | |
1199 | | - | |
1200 | | - | |
1201 | | - | |
| 1167 | + | |
| 1168 | + | |
| 1169 | + | |
| 1170 | + | |
| 1171 | + | |
| 1172 | + | |
| 1173 | + | |
| 1174 | + | |
| 1175 | + | |
| 1176 | + | |
| 1177 | + | |
| 1178 | + | |
| 1179 | + | |
| 1180 | + | |
| 1181 | + | |
| 1182 | + | |
| 1183 | + | |
| 1184 | + | |
| 1185 | + | |
| 1186 | + | |
| 1187 | + | |
| 1188 | + | |
| 1189 | + | |
| 1190 | + | |
| 1191 | + | |
| 1192 | + | |
| 1193 | + | |
| 1194 | + | |
| 1195 | + | |
| 1196 | + | |
| 1197 | + | |
| 1198 | + | |
| 1199 | + | |
| 1200 | + | |
| 1201 | + | |
| 1202 | + | |
| 1203 | + | |
| 1204 | + | |
| 1205 | + | |
| 1206 | + | |
| 1207 | + | |
| 1208 | + | |
| 1209 | + | |
| 1210 | + | |
| 1211 | + | |
| 1212 | + | |
| 1213 | + | |
| 1214 | + | |
| 1215 | + | |
| 1216 | + | |
| 1217 | + | |
| 1218 | + | |
| 1219 | + | |
| 1220 | + | |
| 1221 | + | |
| 1222 | + | |
| 1223 | + | |
| 1224 | + | |
| 1225 | + | |
| 1226 | + | |
| 1227 | + | |
| 1228 | + | |
| 1229 | + | |
| 1230 | + | |
1202 | 1231 | | |
1203 | 1232 | | |
1204 | 1233 | | |
| |||
1215 | 1244 | | |
1216 | 1245 | | |
1217 | 1246 | | |
| 1247 | + | |
| 1248 | + | |
| 1249 | + | |
| 1250 | + | |
| 1251 | + | |
| 1252 | + | |
| 1253 | + | |
| 1254 | + | |
| 1255 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
0 commit comments