Conversation
sort_by_keys only had host side implementations, so every call round tripped the buffers through host memory, and the only device sort in the tree, sort_by_key_pow2_len, requires a power of two length. Add a device tiled merge sort: every work item first sorts a tile of Vt consecutive elements with a fully unrolled odd-even transpose network held in thread private arrays, then adjacent sorted runs are merged pairwise, doubling the run length each round. A merge round is one kernel where a work item owns a fixed size chunk of the output and finds its own input sub-ranges with a Merge Path co-rank search. The total work is O(n log n), and the length does not need to be a power of two. A trailing partial tile is padded up to Vt with shambase::get_max. Since the network only swaps on a strictly smaller key, the padding never overtakes a real key comparing equal to the sentinel. - shambase: odd_even_transpose_sort_by_key, the key/value twin of the existing keys only OddEvenTransposeSortT - shamalgs: co_rank, a device and host compatible Merge Path partition search, alongside lower_bound and upper_bound - shamalgs: tiled_merge_sort.hpp for the device implementation, and tiled_merge_sort_host.hpp for the host serial reference, kept free of any SYCL dependency so the algorithm can be checked without a device - sort_by_keys: new tiled_merge_sort and tiled_merge_host_serial implementation variants, the default stays std_sort Assisted-by: Claude Code
|
Important Draft PR not reviewedDraft PRs are not automatically reviewed by default.
To automatically review draft PRs, update your CodeRabbit configuration: reviews:
auto_review:
drafts: trueThanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Thanks @tdavidcl for opening this PR! You can do multiple things directly here: Once the workflow completes a message will appear displaying informations related to the run. Also the PR gets automatically reviewed by gemini, you can: |
Workflow reportworkflow report corresponding to commit 2bc3669 Light CI is enabled (the default for pull requests). This will only run the basic tests and not the full tests. Pre-commit check reportPre-commit check: ✅ Test pipeline can run. Clang-tidy diff reportDoxygen diff with
|
No description provided.