Skip to content
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

[Question]: WarpSortConfig::PartitioningThreshold=3000, how this magic number choosen ? #606

Open
ZJLi2013 opened this issue Sep 12, 2024 · 2 comments

Comments

@ZJLi2013
Copy link

ZJLi2013 commented Sep 12, 2024

hi, rocm expert,

wonder how 3000 this magic number is considered here ?

when bench matrix shape as [m, n], if m <3000, then segmented_radix_sort_impl() will never go to do_paritioning, looks inside which has more fine-grained kernel depending on different segment_counts.

on the other hand, CUDA::CUB can do segmented per row, are we expecting some perf gap here?

Thanks for guiding

@Snektron
Copy link
Contributor

Hi, these values are determined by our autotuning system. We invoke this on a set of GPUs, which then compiles & benchmarks the algorithms for a range of parameters. A developer-oriented explanation is given here.

If you believe that there is a performance issue there, you have a few options:

  • You can pass a custom config for that particular operation where you manually set the values.
  • You can also add a benchmark case in the benchmark for segmented radix sort for your dimensions, and run the tuning yourself.

@ppanchad-amd
Copy link

Hi @ZJLi2013. Has your issue been resolved? If so, please close the ticket. Thanks!

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

No branches or pull requests

3 participants