Skip to content

Commit f8408a6

Browse files
authored
[Release/2.9] Revert "Roll back to original usage of sycl::get_kernel_bundle (#1935)" (#2026) (#2035)
Cherry-pick #2026 to solve #2025. This reverts commit 83a1555 to quickly bypass the performance regression caused by usage of sycl::get_kernel_bundle.
1 parent 83c5a5a commit f8408a6

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

src/comm/DeviceProperties.h

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,13 @@ static int64_t syclMaxWorkGroupSize(
1616
auto dev = q.get_device();
1717

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

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

0 commit comments

Comments
 (0)