Skip to content
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
6 changes: 4 additions & 2 deletions src/ATen/native/xpu/sycl/LayerNormKernels.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1063,8 +1063,10 @@ void _layer_norm_backward_kernel(
norm_config_global_size / syclMaxSubGroupSize() * 2 <= thread_slots;
// cuda uses condition M > 64 * 1024 && N / 32 < sm_count / 2 to parallelize
// in the M dimension
if (use_two_stage_col_reduction && M > 64 * 1024 &&
N / 32 < syclGpuEuCount() / syclGpuEUCountPerSubslice() / 2) {
int xe_core_count = syclGpuEuCount() / syclGpuEUCountPerSubslice();
int tile_n = N / 32;
if (use_two_stage_col_reduction && M > xe_core_count * 1024 &&
tile_n < xe_core_count * 2) {
const size_t local_size_x = 8;
const size_t SIMD = 32;
// workgroup size is 256
Expand Down
Loading