Skip to content
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

Open
wants to merge 4 commits into
base: sycl
Choose a base branch
from

Conversation

gmlueck
Copy link
Contributor

@gmlueck gmlueck commented May 9, 2024

Add a proposed extension specification for work_group_memory, a
lighter 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.

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.
@gmlueck gmlueck requested a review from a team as a code owner May 9, 2024 14:04
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

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?

Copy link
Contributor Author

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

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?

Copy link
Contributor Author

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.
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.

None yet

2 participants