celerity / celerity-runtime

High-level C++ for Accelerator Clusters
https://celerity.github.io
MIT License
139 stars 18 forks source link

[IDAG] Add new threading facilities #258

Closed fknorr closed 1 month ago

fknorr commented 2 months ago

This PR upstreams and tests two threading facilities required for IDAG execution: The in-order thread_queue and the double_buffered_queue for fast communication between threads.

I do realize there's a staggering number of things called queue now.

github-actions[bot] commented 2 months ago

Check-perf-impact results: (7b849de16ff11660b98988ab0b032db7)

:question: No new benchmark data submitted. :question:
Please re-run the microbenchmarks and include the results if your commit could potentially affect performance.

coveralls commented 2 months ago

Pull Request Test Coverage Report for Build 9665184999

Details


Changes Missing Coverage Covered Lines Changed/Added Lines %
include/async_event.h 7 11 63.64%
include/thread_queue.h 52 57 91.23%
<!-- Total: 84 93 90.32% -->
Files with Coverage Reduction New Missed Lines %
include/utils.h 2 89.74%
<!-- Total: 2 -->
Totals Coverage Status
Change from base Build 9661291153: -0.07%
Covered Lines: 7132
Relevant Lines: 7357

💛 - Coveralls
coveralls commented 2 months ago

Pull Request Test Coverage Report for Build 9725185072

Details


Changes Missing Coverage Covered Lines Changed/Added Lines %
include/async_event.h 7 10 70.0%
include/thread_queue.h 52 57 91.23%
<!-- Total: 84 92 91.3% -->
Files with Coverage Reduction New Missed Lines %
include/utils.h 2 89.74%
<!-- Total: 2 -->
Totals Coverage Status
Change from base Build 9661291153: -0.05%
Covered Lines: 7132
Relevant Lines: 7356

💛 - Coveralls
fknorr commented 1 month ago

Why does OoO dispatch alleviate the need for a thread pool?

Because OoO assignment addresses individual threads as lanes, whereas before, the thread pool decided which job would get assigned to which pool thread. The backend will simply maintain an array of thread_queues and explicitly index into it with the lane id.