SWDEV-548892 - Stop using __ockl_lane_id (#2186)

__lane_id already exists and is identical.
这个提交包含在:
Matt Arsenault
2025-12-19 20:34:55 +01:00
提交者 GitHub
父节点 7c989ac022
当前提交 0c0d8dc974
共修改 3 个文件,包含 9 行新增和 7 行删除
@@ -91,11 +91,13 @@ __global__ void reduceAllAtomics(T* __restrict__ output, const T* __restrict__ i
__syncthreads();
if (mask & (1ul << __ockl_lane_u32())) op(&result[numWarp], input[idx]);
uint lane = __lane_id();
if (mask & (1ul << lane)) op(&result[numWarp], input[idx]);
__syncthreads();
if (__ockl_lane_u32() == 0) output[idx / warpSize] = result[numWarp];
if (lane == 0) output[idx / warpSize] = result[numWarp];
}
template <class T, template <typename> class Op>
@@ -104,7 +106,7 @@ __global__ void reduceOpSync(T* __restrict__ output, const T* __restrict__ input
int idx = threadIdx.x + blockIdx.x * kBlockDim;
T result;
if (mask & (1ul << __ockl_lane_u32())) {
if (mask & (1ul << __lane_id())) {
if constexpr (std::is_same<Op<T>, std::plus<T>>::value)
result = __reduce_add_sync(mask, input[idx]);
else if constexpr (std::is_same<Op<T>, MinOp<T>>::value)