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 RT: Using recommended shortcut API for kernel specific max work group size. #1059

Open
fengyuan14 opened this issue Nov 7, 2024 · 0 comments
Assignees
Milestone

Comments

@fengyuan14
Copy link
Contributor

🚀 The feature, motivation and pitch

Existing:

auto q = c10::xpu::getCurrentXPUStream(dev_id).queue();
auto ctx = q.get_context();
auto dev = q.get_device();
auto kid = ::sycl::get_kernel_id<KernelClass>();
// 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);

TODO: intel/llvm#15650

Alternatives

No response

Additional context

No response

@fengyuan14 fengyuan14 added this to the PT2.7 milestone Nov 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants