Repository navigation
fix(cuda): bound concurrent stream-pool initialization - #10711
Conversation
Merging this PR will regress 1 benchmark2 warnings, 1 note
Warning Please fix the performance issues or acknowledge them on CodSpeed. Performance Changes
Tip Investigate this regression by commenting Comparing Footnotes
|
0d9e7f1 to
40797c4
Compare
40797c4 to
b672055
Compare
Serialize first use within each stream-pool slot while retaining lock-free access to initialized slots. Include lazy-creation, round-robin, and concurrent-capacity regression coverage. Original-commit: ae60fd7950 Signed-off-by: Alexander Droste <alexander.droste@protonmail.com>
b672055 to
ceea114
Compare
Problem
Concurrent first use can create more CUDA streams than the pool's configured capacity.
Solution
Use
OnceCell::get_or_try_initfor each pool slot, replacing the custom initialization lock andArcSwap.Assessment
Initialized access remains lock-free and failed initialization can be retried. Uses
once_cellbecause the falliblestd::sync::OnceLockAPI is unstable. Based on #10726.