Skip to content

Replace deprecated [[intel::reqd_sub_group_size(SgSize)]] with [[sycl::reqd_sub_group_size(SIMD)]] and remove unnecessary attributes #1828

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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

chunhuanMeng
Copy link
Contributor

Summary

This PR updates the codebase to replace the deprecated [[intel::reqd_sub_group_size(SgSize)]] attribute with the new [[sycl::reqd_sub_group_size(SIMD)]] attribute. Additionally, the attribute has been removed from certain locations where it was deemed unnecessary.These changes also aim to reduce the number of warnings, thereby decreasing the log size.

Changes

  1. Attribute Replacement:

    • Replaced all instances of [[intel::reqd_sub_group_size(SgSize)]] with [[sycl::reqd_sub_group_size(SIMD)]] to align with the latest SYCL specification and avoid using deprecated attributes.
  2. Attribute Removal:

    • Removed the [[sycl::reqd_sub_group_size(SIMD)]] attribute from functions and kernels where it was not necessary. This was done to simplify the code and avoid redundant specifications.

@Copilot Copilot AI review requested due to automatic review settings July 10, 2025 03:12
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR updates SYCL kernel attributes by replacing the deprecated [[intel::reqd_sub_group_size]] with [[sycl::reqd_sub_group_size]] and removes unnecessary subgroup-size annotations to reduce warnings and simplify code.

  • Replaced all [[intel::reqd_sub_group_size(...)]] instances with [[sycl::reqd_sub_group_size(...)]].
  • Removed redundant subgroup-size attributes in ForeachReduceKernels.cpp.

Reviewed Changes

Copilot reviewed 13 out of 13 changed files in this pull request and generated no comments.

Show a summary per file
File Description
src/ATen/native/xpu/sycl/TensorModeKernel.cpp Swapped intel::reqd_sub_group_size for sycl::reqd_sub_group_size
src/ATen/native/xpu/sycl/SortingKernels.h Updated subgroup attribute namespace to sycl
src/ATen/native/xpu/sycl/SoftMaxKernels.cpp Replaced deprecated attribute with sycl version
src/ATen/native/xpu/sycl/Norm.h Replaced deprecated subgroup attribute
src/ATen/native/xpu/sycl/MultiLabelMarginLossKernels.cpp Updated attribute namespace
src/ATen/native/xpu/sycl/LossNLL2dKernels.cpp Swapped to sycl::reqd_sub_group_size
src/ATen/native/xpu/sycl/LinearInt4.cpp Updated subgroup-size attribute
src/ATen/native/xpu/sycl/LayerNormKernels.cpp Replaced intel attribute with sycl version
src/ATen/native/xpu/sycl/IndexKernelUtils.h Swapped attribute namespace
src/ATen/native/xpu/sycl/GroupNormKernels.cpp Updated deprecated annotation
src/ATen/native/xpu/sycl/ForeachReduceKernels.cpp Removed unnecessary reqd_sub_group_size annotations
src/ATen/native/xpu/sycl/Dequant_int4.cpp Replaced intel attribute with sycl version
src/ATen/native/xpu/sycl/BatchNormKernels.cpp Swapped subgroup-size attribute namespace

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

Successfully merging this pull request may close these issues.

3 participants