ROCm / HIP-CPU

An implementation of HIP that works on CPUs, across OSes.
MIT License
112 stars 19 forks source link

Missing some warp cross lane functions #25

Closed ueqri closed 1 year ago

ueqri commented 3 years ago

According to HIP programming guides, Warp Cross Lane Functions are well supported in HIP. But I couldn't build the HIP code with some of these wrap functions e.g. int __all(int predicate) and int __any(int predicate) using HIP-CPU library.

Since those APIs are widely used in warp-level programing, I was wondering if there are some plans for these functions, __all and __any (__ballot is already implemented in HIP-CPU).

AlexVlx commented 2 years ago

Thank you for filing this @ueqri . I will add them, but please note that there's a caveat with Cross Lane Functions (it's one of the divergence points between CPU and GPU), in that on CPU these'll carry barrier semantics (as if calling __syncthreads). I think that @MathiasMagnus ran into it, so he might have something to add.

AlexVlx commented 1 year ago

Fixed (modulo lack of lockstep behaviour).