Skip to content

Technical debt changes in radix_sort.hpp #1918

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Dec 3, 2024

Conversation

oleksandr-pavlyk
Copy link
Contributor

  1. Add missing #include <array> needed since std::array is used several times in the code.

  2. Made peer_helper class specializations members const, as well as marking peer_contribution method const.

    This allows to make peer_prefix_hlp class instance const as well.

  3. Added a comment to why subgroup_ballot algorithm for peer helper is only applicable for sub-groups with sizes 32 and narrower.


  • Have you provided a meaningful PR description?
  • Have you added a test, reproducer or referred to an issue with a reproducer?
  • Have you tested your changes locally for CPU and GPU devices?
  • Have you made sure that new changes do not introduce compiler warnings?
  • Have you checked performance impact of proposed changes?
  • Have you added documentation for your changes, if necessary?
  • Have you added your changes to the changelog?
  • If this PR is a work in progress, are you opening the PR as a draft?

1. Add missing #include <array> since std::array is used several times
   in the code.
2. Made peer_helper class specializations members const, as well
   as marking peer_contribution method const.

   This allows to make peer_helper class instance const as well.

3. Added a comment to why subgroup_ballot algorithm for peer helper
   is only applicable for sub-groups with sizes 32 and narrower.
Copy link

github-actions bot commented Dec 3, 2024

Deleted rendered PR docs from intelpython.github.com/dpctl, latest should be updated shortly. 🤞

@coveralls
Copy link
Collaborator

Coverage Status

coverage: 87.671%. remained the same
when pulling 19a7e75 on radix-sort-technical-debt
into 631d4c3 on master.

Copy link

github-actions bot commented Dec 3, 2024

Array API standard conformance tests for dpctl=0.19.0dev0=py310hdf72452_287 ran successfully.
Passed: 895
Failed: 1
Skipped: 118

@ndgrigorian
Copy link
Collaborator

The atomic_fetch_or peer_prefix_algo seems to be entirely unused in the code.

Is it dead code, or should it be kept around?

@oleksandr-pavlyk
Copy link
Contributor Author

The atomic_fetch_or peer_prefix_algo seems to be entirely unused in the code.

Is it dead code, or should it be kept around?

At present, it is indeed unused. It is useful to keep around for debugging purposes. I did check, locally, that the code compiles and works correctly if atomic_fetch_or is used instead of subgroup_ballot algorithm.

The other useful feature of atomic_fetch_or algorithm is that work-group size in reorder phase kernels need not be constrained to the size of the sub-group, although radix_sort_reorder_submit always sets it to be.

Copy link
Collaborator

@ndgrigorian ndgrigorian left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In that case LGTM!

@oleksandr-pavlyk oleksandr-pavlyk merged commit 295c532 into master Dec 3, 2024
51 of 53 checks passed
@oleksandr-pavlyk oleksandr-pavlyk deleted the radix-sort-technical-debt branch December 3, 2024 20:48
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.

3 participants