Skip to content

Commit 0d60c45

Browse files
authored
Update GroupReduceUtils.h
1 parent 3377027 commit 0d60c45

File tree

1 file changed

+0
-7
lines changed

1 file changed

+0
-7
lines changed

src/ATen/native/xpu/sycl/GroupReduceUtils.h

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -120,11 +120,8 @@ inline T& SubgroupReduceWithoutBroadcast(
120120
auto sg_tid = sg.get_local_linear_id();
121121
#pragma unroll
122122
for (int offset = (SIMD >> 1); offset > 0; offset >>= 1) {
123-
// for (int offset = 1; offset < SIMD; offset <<= 1) {
124123
T temp = sycl::shift_group_left(sg, val, offset);
125-
// if (sg_tid < SIMD - offset) {
126124
val = op.combine(val, temp);
127-
// }
128125
}
129126
return val;
130127
}
@@ -151,17 +148,13 @@ inline T& GroupReduceWithoutBroadcast(
151148
shared[sg_id] = val;
152149
}
153150
item.barrier(sycl_local_fence);
154-
// val = (g_tid < n_sg) ? shared[sg_id] : identity_element;
155151
val = identity_element;
156152

157153
if (sg_id == 0) {
158154
for (int i = sg_tid; i < n_sg; i += SIMD) {
159155
val = op.combine(val, shared[i]);
160156
}
161157
val = SubgroupReduceWithoutBroadcast<T, ReduceOp, SIMD, DIM>(item, val, op);
162-
// for (int i = 1; i < n_sg; i++) {
163-
// val = op.combine(val, shared[i]);
164-
// }
165158
}
166159
return val;
167160
}

0 commit comments

Comments
 (0)