Skip to content
This repository has been archived by the owner on Jan 26, 2024. It is now read-only.

Correctly set the index value for __shf_up. #2

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion include/hip/amd_detail/amd_device_functions.h
Original file line number Diff line number Diff line change
Expand Up @@ -425,7 +425,7 @@ inline
int __shfl_up(int var, unsigned int lane_delta, int width = warpSize) {
int self = __lane_id();
int index = self - lane_delta;
index = (index < (self & ~(width-1)))?self:index;
index = (index < (self & ~(width-1)))?index:self;
return __builtin_amdgcn_ds_bpermute(index<<2, var);
}
__device__
Expand Down