Skip to content

[SYCL][DOC] Add sycl_ext_intel_grf_size extension #9779

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 6 commits into from
Jun 14, 2023
Merged

Conversation

sarnex
Copy link
Contributor

@sarnex sarnex commented Jun 7, 2023

This extension is used to specify the register mode on an Intel GPU.

Currently we only support specific register mode values on specific GPUs.

This extension is used to specify the register mode on an Intel GPU.

Currently we only support specific register mode values on specific GPUs.
@sarnex
Copy link
Contributor Author

sarnex commented Jun 7, 2023

I am planning to implement this once the proposed version is approved, and will move it to experimental at that time.

@sarnex sarnex marked this pull request as ready for review June 7, 2023 20:44
@sarnex sarnex requested a review from a team as a code owner June 7, 2023 20:44
@sarnex sarnex requested review from gmlueck and steffenlarsen June 7, 2023 20:57
Signed-off-by: Sarnie, Nick <nick.sarnie@intel.com>
@sarnex sarnex changed the title [SYCL][DOC] Add sycl_ext_intel_register_mode extension [SYCL][DOC] Add sycl_ext_intel_grf_size extension Jun 8, 2023
Signed-off-by: Sarnie, Nick <nick.sarnie@intel.com>
Copy link
Contributor

@gmlueck gmlueck left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

The supported values are as follows:
[%header,cols="1,5"]
|===
|GPU |Supported Values

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

GPU thread (which has register resource) is used to schedule each sub-group. And after sub-group size is determined, the kernel (work item in the subgroup) should use all the register as much as possible, so while do we need a setting to limit the using of registers? do you have example to show the usage of this new property. Thanks.

Copy link
Contributor Author

@sarnex sarnex Jun 13, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the problem is the GPU driver decides how many registers are available, there are two options, small (128) and large (256) and right now it always picks small. large may help if there is high register pressure. i don't have a specific example i can share here, but we have many cases internally showing improved performance with large mode. the spec has a code snippet with an example but it is not implemented yet.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In https://www.intel.com/content/www/us/en/docs/oneapi/optimization-guide-gpu/2023-1/small-register-mode-vs-large-register-mode.html, " set_kernel_properties(kernel_properties::use_large_grf); " is used to guide compiler to use large register file for specific kernel, so why do we need anther property to set small(128) or large(256)? Thanks.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm moving this conversation thread offline.

Copy link
Contributor Author

@sarnex sarnex Jun 14, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@gmlueck Are you okay with merging this PR, or should we wait for the outcome of the offline conversation? All feedback about this PR should be addressed. Thanks

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we can merge this PR.

The resolution of the offline discussion may affect other things, but not this PR.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sounds good @intel/llvm-gatekeepers can we merge this one? Thanks!

@againull againull merged commit 83d0997 into intel:sycl Jun 14, 2023
fineg74 pushed a commit to fineg74/llvm that referenced this pull request Jun 15, 2023
This extension is used to specify the register mode on an Intel GPU.

Currently we only support specific register mode values on specific
GPUs.

---------

Signed-off-by: Sarnie, Nick <nick.sarnie@intel.com>
@sarnex sarnex deleted the doc branch June 23, 2023 14:25
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.

8 participants