Skip to content

Single-pass scan algorithm - #157

Draft
AntonReinhard wants to merge 9 commits into
alpaka-group:devfrom
AntonReinhard:scan_single_pass
Draft

Single-pass scan algorithm#157
AntonReinhard wants to merge 9 commits into
alpaka-group:devfrom
AntonReinhard:scan_single_pass

Conversation

@AntonReinhard

@AntonReinhard AntonReinhard commented Jun 23, 2025

Copy link
Copy Markdown
Collaborator

Work in Progress

The algorithm is correct (at least for CPU and CUDA), but currently uses non-Alpaka memory fences (because they're not yet implemented) and is also slow, because the exclusive block prefix calculation is slow.

If the exclusive prefix calculation is left out, the performance on CUDA is roughly the same as the cuda library implementation, which is promising, since it should be possible to almost entirely hide the latency of this calculation.

Based on https://research.nvidia.com/sites/default/files/pubs/2016-03_Single-pass-Parallel-Prefix/nvr-2016-002.pdf

Comment thread example/scan/src/scan_single_pass.hpp Outdated
Comment thread include/alpaka/api/unifiedCudaHip/Device.hpp Outdated
Comment thread include/alpaka/onHost/Device.hpp Outdated
@AntonReinhard

Copy link
Copy Markdown
Collaborator Author

Rebased on #214 to see if it works

@AntonReinhard
AntonReinhard force-pushed the scan_single_pass branch 2 times, most recently from dd51878 to bed39af Compare December 18, 2025 10:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants