-
Notifications
You must be signed in to change notification settings - Fork 697
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] Extension spec for "work_group_memory" #13725
base: sycl
Are you sure you want to change the base?
Conversation
Add a proposed extension specification for `work_group_memory`, a lighter weight API to allocate device local memory for an nd-range kernel.
Add a list of restrictions that, when followed, provide a guarantee that a kernel written in the free-function kernel syntax can be launched directly via Level Zero or OpenCL.
when the kernel adheres to the following restrictions: | ||
|
||
* The kernel is written in the free function kernel syntax; | ||
* The kernel function is declared as `extern "C"`; and |
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.
Is "extern C" disabling i.e. dead arg elimination optimization?
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.
Good point. No, you need to disable this via the -fno-sycl-dead-args-optimization
option. I added this to the list of restrictions in a885e42.
_Returns:_ A `multi_ptr` to the underlying device local memory object. | ||
|
||
|
||
== Examples |
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.
Can you please provide an example of work_group_memory with free function kernel?
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.
Done in 3aacf01.
Add example using `work_group_memory` in free function kernel.
Add a proposed extension specification for
work_group_memory
, alighter weight API to allocate device local memory for an nd-range
kernel.
Also related, add a list of restrictions that, when followed, provide a
guarantee that a kernel written in the free-function kernel syntax can
be launched directly via Level Zero or OpenCL.