celerity / celerity-runtime

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

[IDAG] Backends & Execution #261

Closed fknorr closed 2 months ago

fknorr commented 3 months ago

This PR adds the last major components necessary for the switch to IDAG scheduling.

Executors spawn their own thread which receives instructions and outbound pilots from the scheduler thread as well as runtime state such as user-provided allocation pointers through a double_buffered_queue.

The executor interface has two implementations, live_executor (for normal execution) and dry_run_executor for dry runs. The live_executor maintains the state persistent between instructions, such as memory allocations, but delegates all state management complexity to out_of_order_engine and receive_arbiter.

backend is an abstract interface for executing any operation that might touch backend-allocated memory. The interface itself is independent of SYCL, and the tie-in happens with the sycl_backend derived class. Backend specialization for CUDA nd-copies is achieved by instantiating either a sycl_generic_backend or a sycl_cuda_backend.

Most of the backend and executor code is covered by explicit unit tests, with the exception of issuing receive instructions (would be annoying to test, and is mostly covered by receive_arbiter_tests and bounds-checking messages (will be automatically covered by runtime_tests after the big switch).

github-actions[bot] commented 3 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 3 months ago

Pull Request Test Coverage Report for Build 10073621050

Details


Changes Missing Coverage Covered Lines Changed/Added Lines %
include/print_utils.h 16 18 88.89%
src/backend/sycl_backend.cc 111 116 95.69%
src/utils.cc 12 17 70.59%
src/live_executor.cc 282 314 89.81%
<!-- Total: 509 553 92.04% -->
Files with Coverage Reduction New Missed Lines %
include/thread_queue.h 1 85.53%
src/task.cc 1 92.06%
<!-- Total: 2 -->
Totals Coverage Status
Change from base Build 10007312093: -0.2%
Covered Lines: 7753
Relevant Lines: 8064

💛 - Coveralls