| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
There was a problem hiding this comment.
In addition to the comments here, I think a test case would also be nice to ensure correctness in the SYCLomatic-test repo.
Sorry, something went wrong.
| if (begin_bit >= end_bit) { | ||
|
|
||
| exchange<T, VALUES_PER_THREAD>(_local_memory) | ||
| .scatter_to_striped(item, keys); |
There was a problem hiding this comment.
Do we need to synchronize here before we exit the loop and call twiddle_out over the keys?
Sorry, something went wrong.
There was a problem hiding this comment.
I do not think a local barrier is required here since we call a barrier outside the exchange loop before twiddling out.
Sorry, something went wrong.
|
|
||
| #pragma unroll | ||
| for (int i = 0; i < VALUES_PER_THREAD; ++i) { | ||
| unsigned_keys[i] = detail::traits<T>::twiddle_in(unsigned_keys[i]); |
There was a problem hiding this comment.
My understanding is that twiddle_in and twiddle_out throw a runtime exception when it is not a supported type. Maybe it is not worth addressing here, but would it be better to catch this at compile time instead based on the type of T?
Sorry, something went wrong.
|
Thanks @mmichel11 for the suggestions, I think the modifications can be addressed later as well since this PR is for basic functionality . I am in progress of adding test suite for this sorting algos. Since there is a feature freeze on 8th, if it looks ok I can put it in for merging . Any modifications on this can be addressed on another PR as well . Let me know your thoughts. Thanks. Also tagging @zhimingwang36 for review. |
Sorry, something went wrong.
| int begin_bit = 0, int end_bit = 8 * sizeof(T)) { | ||
|
|
||
| uint32_t(&unsigned_keys)[VALUES_PER_THREAD] = | ||
| reinterpret_cast<uint32_t(&)[VALUES_PER_THREAD]>(keys); |
There was a problem hiding this comment.
Why should we convert to uint32_t instead of using T directly?
Sorry, something went wrong.
There was a problem hiding this comment.
How was this resolved?
(In general, I'd recommend letting the reviewer resolve threads when they are satisfied, rather than resolving them yourself.)
Sorry, something went wrong.
|
@abhilash1910 Thank you working on this, can you please also provide a test patch in SYCLomatic-test repo? |
Sorry, something went wrong.
There was a problem hiding this comment.
At a high level, is the only difference between this and the radix_sort function that we are doing the final exchange from scatter_to_striped rather than scatter_to_blocked?
If so, it seems like we shouldn't copy / rewrite the entire function to accomplish this. We should be able to just adjust that final exchange and rely on the same code otherwise. This can be done a number of ways, with a simple helper and a branch, or via some functor / lambda.
Sorry, something went wrong.
Yeah thought so, reduced it to a helper + branch. Addressed other issues as well. |
Sorry, something went wrong.
|
@abhilash1910 I am seeing clang-format failing in CI. Could you resolve this? |
Sorry, something went wrong.
|
@mmichel11 @danhoeflinger fixed the issues. Lets wait for CI to run . Thanks. |
Sorry, something went wrong.
There was a problem hiding this comment.
LGTM
Sorry, something went wrong.
There was a problem hiding this comment.
LGTM
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
PR to add SortBlockedToStriped sorting ,
depends on #1483 (scatter_to_striped added in exchange)
cc @mmichel11 @danhoeflinger @yihanwg