[libc-commits] [libc] [libc] Add utility functions for warp-level scan and reduction (PR #84866)

Matt Arsenault via libc-commits libc-commits at lists.llvm.org
Mon Mar 11 20:42:16 PDT 2024


================
@@ -31,6 +31,25 @@ LIBC_INLINE bool is_first_lane(uint64_t lane_mask) {
   return gpu::get_lane_id() == get_first_lane_id(lane_mask);
 }
 
+/// Gets the sum of all lanes inside the warp or wavefront.
----------------
arsenm wrote:

We have llvm.amdgcn.wave.reduce.umin/umax. The intent was to expand those intrinsics to cover more operations , since the expansion has different strategies depending on the available instructions 

https://github.com/llvm/llvm-project/pull/84866


More information about the libc-commits mailing list