llvm
llvm copied to clipboard
[SYCL][HIP] support for HIP group ballot
To address #6718
Does this support ballot over a wavefront of size 64 ? Thanks.
@zjin-lcf You are right, it needs the size of 64, which is here: https://github.com/intel/llvm/blob/sycl/sycl/include/sycl/ext/oneapi/sub_group_mask.hpp#L28
I am not sure how to change the sub group mask size to 64 in a proper way for HIP backend. That is what is blocking this draft to be complete.
There's a SPIR-V call for the max sub-group size, so essentially the wavefront size:
- https://github.com/intel/llvm/blob/sycl/libclc/amdgcn-amdhsa/libspirv/workitem/get_max_sub_group_size.cl
You may also be able to use the __AMDGCN_WAVEFRONT_SIZE
macro.
Does this imply that sub_group_mask is unreliable in general on all hardware with more than 32 wide sub groups?
Hi all, any updates on this?
Hello, quick update on this so after looking into it a bit further, the implementation in this PR can easily be tweaked to support 64 bits sub-groups, however I found out that the sub-group mask class in the header was backed by a 32 bits integer, so it couldn't support masks for 64 bit wavefront.
I've opened a separate PR building on top of this one to modify the sub-group mask class in the headers to allow 64 threads support, see:
- https://github.com/intel/llvm/pull/7491
Closing it since it is done here: #7491