Skip to content

[SYCL] the first kernel function declaration should be added with attribute #18405

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

Merged

Conversation

dklochkov-emb
Copy link
Contributor

Docs Defining a free function kernel contains:
The property must appear on the first declaration of the function in the translation unit. Redeclarations of the function may optionally be decorated with the same property if the property argument is the same. The effect is the same regardless of whether redeclarations are so decorated.

This PR changes isFreeFunction to define if the first occurrence of kernel free function has attribute or not. New clang diagnostics was added to highlight that first occurrence does not have attribute but the next has.

@dklochkov-emb dklochkov-emb requested review from a team as code owners May 12, 2025 08:17
@dklochkov-emb dklochkov-emb marked this pull request as draft May 12, 2025 08:17
@dklochkov-emb dklochkov-emb self-assigned this May 12, 2025
@dklochkov-emb dklochkov-emb marked this pull request as ready for review May 12, 2025 11:34
Copy link
Contributor

@steffenlarsen steffenlarsen left a comment

Choose a reason for hiding this comment

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

LGTM!

@dklochkov-emb
Copy link
Contributor Author

@intel/llvm-gatekeepers Please, merge it.

@dm-vodopyanov
Copy link
Contributor

@intel/llvm-gatekeepers Please, merge it.

Pre-commit currently still in progress, let's wait for its completion.

@dm-vodopyanov dm-vodopyanov merged commit 4b4e732 into intel:sycl May 22, 2025
24 checks passed
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.

4 participants