Skip to content

Commit

Permalink
Use Welford LayerNrom
Browse files Browse the repository at this point in the history
  • Loading branch information
min-jean-cho committed Feb 19, 2025
1 parent 6dcf059 commit 4358e06
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/ATen/native/xpu/sycl/LayerNormKernels.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -382,7 +382,7 @@ WelfordDataLN compute_stats(
}
// intra-warp reduction
auto sg = item_id.get_sub_group();
int sgSize = static_cast<int>(sg.get_local_range()[1]);
int sgSize = static_cast<int>(sg.get_local_range()[0]);
for (int offset = (sgSize >> 1); offset > 0; offset >>= 1) {
WelfordDataLN wdB{
sycl::shift_group_left(sg, wd.mean, offset),
Expand Down

0 comments on commit 4358e06

Please sign in to comment.