celerity / celerity-runtime

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

[IDAG] Optimal nd-memory copy primitives #257

Closed fknorr closed 1 month ago

fknorr commented 2 months ago

This PR proposes to merge the nd-memory copy layouting mechanism used by the IDAG executor. It is set to replace memcpy_strided_host and the host-side portion of memcpy_strided_device that is currently implemented in buffer_storage.

Unlike the current implementation, it always detects when a copy between higher-dimensional allocations is "accidentally contiguous" (i.e. can fulfilled by a single memcpy) or when a copy between 3D allocations is "accidentally 2D". The unit contains a full implementation of host-to-host copies (which perform the minimum number of memcpys possible) and the means to implement optimized dispatch to cudaMemcpy*D (for this, see cuda_backend.cc in the IDAG branch).

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 9663470746

Details


Totals Coverage Status
Change from base Build 9661291153: -0.04%
Covered Lines: 7107
Relevant Lines: 7321

💛 - Coveralls
fknorr commented 2 months ago

I've moved copy-layout generation logic to a separate header so I can re-use it in device copy tests. It doesn't use GENERATE to avoid creating thousands of host / device allocations in those tests.

coveralls commented 2 months ago

Pull Request Test Coverage Report for Build 9693230522

Details


Totals Coverage Status
Change from base Build 9661291153: -0.02%
Covered Lines: 7108
Relevant Lines: 7321

💛 - Coveralls
coveralls commented 1 month ago

Pull Request Test Coverage Report for Build 9943601447

Details


Files with Coverage Reduction New Missed Lines %
include/grid.h 1 96.74%
<!-- Total: 1 -->
Totals Coverage Status
Change from base Build 9943555988: -0.06%
Covered Lines: 7116
Relevant Lines: 7315

💛 - Coveralls