-
Notifications
You must be signed in to change notification settings - Fork 752
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][DOC] Add ext_intel_virtual_functions specification #10540
base: sycl
Are you sure you want to change the base?
[SYCL][DOC] Add ext_intel_virtual_functions specification #10540
Conversation
…ual-functions-extension-spec
…roduce new macro for indirectly_callable property
…ual-functions-extension-spec
With `sycl_ext_oneapi_virtual_functions` extensions we would like to allow certain kernels to perform virtual function calls. That is if they were submitted with the right properties. That means that instead of simply checking for presence of virtual function calls in device code, we need to analyze call chain to see how exactly a kernel performing such call is defined. This is not a task for the front-end and therefore the diagnostics mechanism is moved to a pass, as suggested by the implementation design proposed in #10540
…ual-functions-extension-spec
Test plan can be found in #10540. This PR introduces a basic test case for a scenario where object of a polymorphic class is constructed in one kernel, but used in another kernel.
Test plan can be found in intel#10540. This PR introduces a basic test case for a scenario where object of a polymorphic class is constructed in one kernel, but used in another kernel.
Implementation design explaining those changes in a bigger picture can be found in #10540 Key things implemented here: - device code split to outline virtual functions into separate device images - emission of new properties for virtual functions - generation of `calls-indirectly` LLVM IR attribute for kernels that construct objects with virtual functions, but don't do calls - device image manipulations to cleanup or preserve virtual functions depending on a device image Even though those pieces are technically independent from each other, it is hard to split them apart into separate PRs, because they all have to be either present or absent for existing E2E tests for virtual functions to work.
Corresponding SYCL extension proposal (intel#10540) has been recently updated to change naming of properties it introduces. This patch aligns the implementation with the proposed extension spec.
Corresponding SYCL extension proposal (#10540) has been recently updated to change naming of properties it introduces. This patch aligns the implementation with the proposed extension spec.
functions they may call, the extension introduces new compile-time-constant | ||
properties. | ||
|
||
[source,dpcpp] |
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.
May these "[source,dpcpp]" be changed to "```c++"? Otherwise, the syntax is not highlighted.
}; | ||
|
||
struct calls_indirectly_key { | ||
template <typename First, typename... SetIds> |
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.
As discussed offline - typename First
likely can be omitted.
This allows calls_indirectly property to handle all passed template arguments, but not the only first one. Also applying some minor changes to the spec. Spec & Design: intel#10540
This allows calls_indirectly property to handle all passed template arguments, but not the only first one. Also applying some minor changes to the spec. Spec & Design: #10540
Corresponding SYCL extension proposal (intel#10540) has been recently updated to change naming of properties it introduces. This patch aligns the implementation with the proposed extension spec.
No description provided.