Skip to content

Commit

Permalink
SWDEV-436099 Use new amdgcn_ballot builtin
Browse files Browse the repository at this point in the history
Change-Id: I024fabc6c5b3f39c66885eb7615953f4d0432e9a
  • Loading branch information
Aidan Belton-Schure authored and AidanBeltonS committed Nov 27, 2024
1 parent 70b2085 commit 9652d69
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions hipamd/include/hip/amd_detail/amd_warp_functions.h
Original file line number Diff line number Diff line change
Expand Up @@ -99,19 +99,16 @@ int __any(int predicate) {
return __ockl_wfany_i32(predicate);
}

// XXX from llvm/include/llvm/IR/InstrTypes.h
#define ICMP_NE 33

__device__
inline
unsigned long long int __ballot(int predicate) {
return __builtin_amdgcn_uicmp(predicate, 0, ICMP_NE);
return __builtin_amdgcn_ballot_w64(predicate);
}

__device__
inline
unsigned long long int __ballot64(int predicate) {
return __builtin_amdgcn_uicmp(predicate, 0, ICMP_NE);
return __ballot(predicate);
}

// See amd_warp_sync_functions.h for an explanation of this preprocessor flag.
Expand Down

0 comments on commit 9652d69

Please sign in to comment.