-
Notifications
You must be signed in to change notification settings - Fork 795
[SYCL] add clang diagnostic for illegal types of kernel free function arguments #19244
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] add clang diagnostic for illegal types of kernel free function arguments #19244
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does the free function spec not allow such kernel arguments? At least regarding virtual functions AFAIK in SYCL 2020 such an object can be captured to the device code and is fine unless a virtual function is called.
See
https://registry.khronos.org/SYCL/specs/sycl-2020/html/sycl-2020.html#sec:language.restrictions.kernels
The odr-use of polymorphic classes and classes with virtual inheritance is allowed. However, no virtual member functions are allowed to be called in a device function.
@Fznamznon kernel free function docs tell that: i.e. S is allowed only if it has non-virtual inheritance from allowed type which means virtual inheritance is not allowed, does not it? |
|
@dklochkov-emb , yeah, that vaguely reads that virtual bases are not allowed in kernel arguments. I mailed spec folks to double check. Two concerns though:
|
ac5c678 to
dedadc1
Compare
|
@intel/llvm-gatekeepers Please, merge it |
This PR adds clang diagnostic message in case if:
Also, tests were added according to test plan