Skip to content

[SYCL] Add test for type aliases as kernel parameter within free function kernel #18850

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

Conversation

dyniols
Copy link
Contributor

@dyniols dyniols commented Jun 6, 2025

This PR adds new test for free function kernels extension based on test plan https://github.com/intel/llvm/blob/sycl/sycl/test-e2e/FreeFunctionKernels/test-plan.md#test-type-aliases-to-allowed-kernel-paramater-types-as-kernel-parameter

Extension spec: https://github.com/intel/llvm/blob/sycl/sycl/doc/extensions/proposed/sycl_ext_oneapi_free_function_kernels.asciidoc

It removes unused alias of type accessor<int, 1, access::mode::read_write> from sycl/test/extensions/free_function_errors.cpp

@dyniols dyniols temporarily deployed to WindowsCILock June 6, 2025 14:45 — with GitHub Actions Inactive
@dyniols dyniols temporarily deployed to WindowsCILock June 6, 2025 15:14 — with GitHub Actions Inactive
@dyniols dyniols temporarily deployed to WindowsCILock June 6, 2025 15:14 — with GitHub Actions Inactive
@dyniols dyniols marked this pull request as ready for review June 9, 2025 09:00
@dyniols dyniols requested a review from a team as a code owner June 9, 2025 09:00
@dyniols dyniols requested a review from aelovikov-intel June 9, 2025 09:00
@dyniols dyniols closed this Jun 9, 2025
@dyniols dyniols reopened this Jun 9, 2025
@dyniols dyniols temporarily deployed to WindowsCILock June 9, 2025 09:00 — with GitHub Actions Inactive
@dyniols dyniols temporarily deployed to WindowsCILock June 9, 2025 09:45 — with GitHub Actions Inactive
@dyniols dyniols temporarily deployed to WindowsCILock June 9, 2025 09:45 — with GitHub Actions Inactive
@dyniols dyniols temporarily deployed to WindowsCILock June 9, 2025 14:54 — with GitHub Actions Inactive
@dyniols dyniols temporarily deployed to WindowsCILock June 9, 2025 15:45 — with GitHub Actions Inactive
@dyniols dyniols temporarily deployed to WindowsCILock June 9, 2025 15:45 — with GitHub Actions Inactive
@dyniols dyniols requested a review from dklochkov-emb June 10, 2025 15:22
@dklochkov-emb
Copy link
Contributor

I think, it is needed to add tests with C-style typedef too.

@aelovikov-intel
Copy link
Contributor

I think, it is needed to add tests with C-style typedef too.

@tahonermann , do you agree? I'd expect FE's processing of them is identical and that would just bloat the test for no benefit.

@tahonermann
Copy link
Contributor

I think, it is needed to add tests with C-style typedef too.

@tahonermann , do you agree? I'd expect FE's processing of them is identical and that would just bloat the test for no benefit.

typedef and using type alias declarations are represented differently in the Clang AST (using TypedefDecl vs TypeAliasDecl respectively), so I think it makes sense to exercise both. The risk of observable differences is low but not zero. I would probably exercise typedef once and then use using everywhere else or perhaps alternate uses.

@dyniols
Copy link
Contributor Author

dyniols commented Jun 12, 2025

@tahonermann I added typedef aliases checks in this commit 2c27f01 I am not sure if this matches what you had in mind let me know if you think it should be changed.

@dyniols dyniols requested a review from tahonermann June 12, 2025 10:23
@tahonermann
Copy link
Contributor

@tahonermann I added typedef aliases checks in this commit 2c27f01 I am not sure if this matches what you had in mind let me know if you think it should be changed.

I think that looks fine.

@dyniols
Copy link
Contributor Author

dyniols commented Jun 13, 2025

@aelovikov-intel @lbushi25 @dklochkov-emb @tahonermann I'd appreciate an approval if everyone is aligned with the current state of the PR.

@aelovikov-intel aelovikov-intel merged commit b0dc1ce into intel:sycl Jun 13, 2025
28 of 29 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.

5 participants