summaryrefslogtreecommitdiff
path: root/libc/test/integration/src/__support/GPU/scan_reduce.cpp
AgeCommit message (Collapse)Author
2025-02-19[Clang] Fix cross-lane scan when given divergent lanes (#127703)Joseph Huber
Summary: The scan operation implemented here only works if there are contiguous ones in the executation mask that can be used to propagate the result. There are two solutions to this, one is to enter 'whole-wave-mode' and forcibly turn them back on, or to do this serially. This implementation does the latter because it's more portable, but checks to see if the parallel fast-path is applicable. Needs to be backported for correct behavior and because it fixes a failing libc test.
2024-03-12[libc] Add utility functions for warp-level scan and reduction (#84866)Joseph Huber
Summary: The GPU uses a SIMT execution model. That means that each value actually belongs to a group of 32 or 64 other lanes executing next to it. These platforms offer some intrinsic fuctions to actually take elements from neighboring lanes. With these we can do parallel scans or reductions. These functions do not have an immediate user, but will be used in the allocator interface that is in-progress and are generally good to have. This patch is a precommit for these new utilitly functions.