Skip to content

[SYCL][Doc] Improve documentation readability. #10994

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

Merged
merged 1 commit into from
Aug 29, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -6,22 +6,29 @@ This document describes an **experimental** API that applications can use to try
out a new feature. Future versions of this API may change in ways that are
incompatible with this experimental version.


## Introduction

This extension adds a new device information descriptor that provides the ability to query a device for the maximum number of registers available per work-group.
This extension adds a new device information descriptor that provides the
ability to query a device for the maximum number of registers available per
work-group.

OpenCL never offered such query due to the nature of being a very platform specific one - which is why it is also absent from SYCL. Now that SYCL supports back-ends where the register usage is a limiting resource factor of the possible maximum work-group size for a kernel, having the ability to query that limit is important for writing safe and portable code.
OpenCL never offered such query due to the nature of being a very platform
specific one - which is why it is also absent from SYCL. Now that SYCL supports
back-ends where the register usage is a limiting resource factor of the possible
maximum work-group size for a kernel, having the ability to query that limit is
important for writing safe and portable code.

## Feature test macro

As encouraged by the SYCL specification, a feature-test macro, `SYCL_EXT_CODEPLAY_MAX_REGISTERS_PER_WORK_GROUP_QUERY`, is provided to determine whether this extension is implemented.
As encouraged by the SYCL specification, a feature-test macro,
`SYCL_EXT_CODEPLAY_MAX_REGISTERS_PER_WORK_GROUP_QUERY`, is provided to determine
whether this extension is implemented.

## New device descriptor

| Device descriptor | Return type | Description |
| ------------------------------------------------------ | ----------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| ext::codeplay::experimental::info::device::max_registers_per_work_group |  unsigned int | Returns the maximum number of registers available for use per work-group based on the capability of the device. |
| Device descriptor | Return type | Description |
| ----------------- | ----------- | ----------- |
| ext::codeplay::experimental::info::device::max_registers_per_work_group | unsigned int | Returns the maximum number of registers available for use per work-group based on the capability of the device. |

### Note

Expand Down