Skip to content

Commit

Permalink
Merge pull request #1605 from IntelPython/backport-gh-1567
Browse files Browse the repository at this point in the history
Backport gh-1567 to 0.16.x maintenance branch
  • Loading branch information
oleksandr-pavlyk authored Mar 27, 2024
2 parents d08793d + 45c1841 commit 2ce17a2
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1365,10 +1365,13 @@ sycl::event _gemm_batch_nm_impl(sycl::queue &exec_q,
const std::uint32_t max_sg_size = krn.template get_info<
sycl::info::kernel_device_specific::max_sub_group_size>(dev);

const size_t k_wg_sz = krn.template get_info<
sycl::info::kernel_device_specific::work_group_size>(dev);

// Limit work-group size
constexpr size_t wg_sz_limit(2048);
const size_t max_wg_sz = std::min<size_t>(
dev.get_info<sycl::info::device::max_work_group_size>(), wg_sz_limit);
const size_t max_wg_sz = std::min(wg_sz_limit, k_wg_sz);

const std::uint32_t max_subgroups_per_wg =
static_cast<std::uint32_t>(max_wg_sz / max_sg_size);

Expand Down

0 comments on commit 2ce17a2

Please sign in to comment.