Commit f5da95b
feat: add dynamic actor scheduling framework with scheduler warp codegen
Gap analysis item 4.1: Static actor assignment has no load balancing.
Core (scheduling.rs):
- SchedulingStrategy: Static, WorkStealing, RoundRobin, Priority
- WorkItem (16B repr(C)) for scheduler work queue
- SchedulerWarpConfig for codegen integration
- 14 new tests (22 total)
Runtime (LaunchOptions):
- Add scheduler_config field with with_scheduler() builder
CUDA codegen (ring_kernel.rs):
- Scheduler warp pattern: warp 0 monitors load, rest compute
- generate_scheduler_warp_code() with strategy-specific codegen
- WorkStealing: neighbor scan, victim selection, steal signaling
- Work sharing: overload detection, offer publication
- RoundRobin/Priority: framework + placeholders for global queue
- Adds LoadEntry* parameter to kernel signature when enabled
- 18 new codegen tests (59 total ring_kernel tests)
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>1 parent 91e5143 commit f5da95b
5 files changed
Lines changed: 1084 additions & 1 deletion
File tree
- crates
- ringkernel-core/src
- ringkernel-cuda-codegen/src
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
187 | 187 | | |
188 | 188 | | |
189 | 189 | | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
190 | 194 | | |
191 | 195 | | |
192 | 196 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
89 | 89 | | |
90 | 90 | | |
91 | 91 | | |
| 92 | + | |
92 | 93 | | |
93 | 94 | | |
94 | 95 | | |
| |||
247 | 248 | | |
248 | 249 | | |
249 | 250 | | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
250 | 259 | | |
251 | 260 | | |
252 | 261 | | |
| |||
261 | 270 | | |
262 | 271 | | |
263 | 272 | | |
| 273 | + | |
264 | 274 | | |
265 | 275 | | |
266 | 276 | | |
| |||
339 | 349 | | |
340 | 350 | | |
341 | 351 | | |
| 352 | + | |
| 353 | + | |
| 354 | + | |
| 355 | + | |
| 356 | + | |
| 357 | + | |
| 358 | + | |
| 359 | + | |
| 360 | + | |
| 361 | + | |
| 362 | + | |
| 363 | + | |
| 364 | + | |
| 365 | + | |
| 366 | + | |
| 367 | + | |
| 368 | + | |
| 369 | + | |
| 370 | + | |
| 371 | + | |
342 | 372 | | |
343 | 373 | | |
344 | 374 | | |
| |||
0 commit comments