Skip to content

Commit 49156b9

Browse files
authored
Reduce build warnings in kernel templates (#1839)
The following warnings are removed: - Unused var in: src/ATen/native/xpu/sycl/GroupReduceUtils.h - Comparison warning in src/ATen/native/xpu/sycl/pstl/PSTLFunctions.h
1 parent 28acdc4 commit 49156b9

File tree

2 files changed

+1
-2
lines changed

2 files changed

+1
-2
lines changed

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

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,6 @@ inline T& GroupReduceSumWithoutBroadcast(
4949
T& val,
5050
shared_t shared) {
5151
auto sg = item.get_sub_group();
52-
int g_tid = item.get_local_linear_id();
5352
int sg_tid = sg.get_local_linear_id();
5453
int sg_id = sg.get_group_linear_id();
5554
int n_sg = get_local_linear_range<DIM>(item) / SIMD;

src/ATen/native/xpu/sycl/pstl/PSTLFunctions.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -357,7 +357,7 @@ struct InclusiveScanIfKernelFunctor {
357357
d_first_[item_id] = static_cast<T>(first_[item_id]);
358358

359359
if (mask_ptr_[item_id] == 0) {
360-
for (int64_t _k = 1; item_id - _k >= 0; _k++) {
360+
for (int64_t _k = 1; (int64_t)item_id - _k >= 0; _k++) {
361361
auto tmp = first_[item_id - _k];
362362
d_first_[item_id] = static_cast<T>(p_(d_first_[item_id], tmp));
363363
if (mask_ptr_[item_id - _k] != 0)

0 commit comments

Comments
 (0)