Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SYCL: Alternative solution to avoid runtime error of launching kernel… #807

Merged
merged 2 commits into from
Aug 27, 2024
Merged
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
9 changes: 7 additions & 2 deletions src/comm/DeviceProperties.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,13 @@ static int64_t syclMaxWorkGroupSize(
auto dev = q.get_device();

auto kid = ::sycl::get_kernel_id<KernelClass>();
auto kbundle =
::sycl::get_kernel_bundle<::sycl::bundle_state::executable>(ctx, {kid});
// The kernel won't be built for devices except for the first device.
// Launching kernel on devices except for the first device will raise
// runtime error. Here is an alternative as a temporary solution to
// provide an extra hint to SYCL runtime.
// https://github.com/intel/llvm/issues/15127
auto kbundle = ::sycl::get_kernel_bundle<::sycl::bundle_state::executable>(
ctx, {dev}, {kid});

::sycl::kernel k = kbundle.get_kernel(kid);
return k.get_info<::sycl::info::kernel_device_specific::work_group_size>(dev);
Expand Down