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

Performance: Host overhead: Severe host overhead in sycl::get_kernel_bundle. #1016

Open
fengyuan14 opened this issue Oct 23, 2024 · 0 comments
Assignees

Comments

@fengyuan14
Copy link
Contributor

fengyuan14 commented Oct 23, 2024

🐛 Describe the bug

We are using kernel specific max work group size to avoid platform compatibility issue. The routine is,

  auto kid = ::sycl::get_kernel_id<KernelClass>();
  auto kbundle = ::sycl::get_kernel_bundle<::sycl::bundle_state::executable>(
      ctx, {dev}, {kid});
  sycl::kernel k = kbundle.get_kernel(kid);
  int max_work_group_size =  k.get_info<::sycl::info::kernel_device_specific::work_group_size>(dev); 

sycl::get_kernel_bundles gets severe host overhead. The data is as below,
image

Impacts: All kernels in torch-xpu-ops launched with kernel specific max work group are impacted.

  1. 40us overhead is not acceptable for some single batch inference cases, since latency of kernels might be less than 10us.
  2. CUDA runtime usually spends ~6us for a kernel launch.

intel/llvm#15824

Versions

  • torch-xpu-ops: latest main
  • Intel DPC++ compiler/rt: 2024.1.3 (2024.1.3.20240604)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants