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] Allow specification of double GRF mode for SYCL #6914

Merged
merged 5 commits into from
Oct 13, 2022
Merged

[SYCL] Allow specification of double GRF mode for SYCL #6914

merged 5 commits into from
Oct 13, 2022

Conversation

sarnex
Copy link
Contributor

@sarnex sarnex commented Sep 29, 2022

This change extends Konst's work from #6182 to work for any SYCL kernel, not just ESIMD kernels

Basic summary of changes:

  1. Move SYCL library set_kernel_properties function and related detail header out of esimd code into generic SYCL code
  2. Generalize SYCLLowerESIMDKernelPropsPass to make it work for SYCL kernels
  3. Change sycl-post-link module splitting to split non-ESIMD modules that have any number of double GRF kernels
  4. Change program loader to add the "-ze-opt-large-register-file" option if the double GRF property is set. We do this instead of -doubleGRF because -doubleGRF only works for the VC backend, while -ze-opt-large-register-file works for both VC and scalar backends

Signed-off-by: Sarnie, Nick nick.sarnie@intel.com

Signed-off-by: Sarnie, Nick <nick.sarnie@intel.com>
@sarnex sarnex marked this pull request as ready for review September 29, 2022 15:28
@sarnex sarnex requested review from a team as code owners September 29, 2022 15:28
@sarnex
Copy link
Contributor Author

sarnex commented Sep 29, 2022

@steffenlarsen @kbobrovs @gmlueck Hey guys, here's the PR for the SYCL case if you're interested

@steffenlarsen
Copy link
Contributor

Interesting! I am a little worried that with the current layout it may be confused with sycl_ext_oneapi_kernel_properties. Also, do we have an extension document for this?

@sarnex
Copy link
Contributor Author

sarnex commented Sep 29, 2022

Interesting! I am a little worried that with the current layout it may be confused with sycl_ext_oneapi_kernel_properties. Also, do we have an extension document for this?

Thanks! I think this is only intended to be temporary until we can replace the implementation to use the extensions in your link. I don't know of any document (@kbobrovs correct me if im wrong). Please let me know if you'd like me to rename or move anything to ease confusion

@asudarsa
Copy link
Contributor

@kbobrovs has mentioned in his PR about this change being a temporary solution: Quote: "This is temporary API until generic SYCL support for kernel properties is implemented:
https://github.com/intel/llvm/blob/sycl/sycl/doc/extensions/proposed/sycl_ext_oneapi_kernel_properties.asciidoc" Unquote.
Thanks

@asudarsa
Copy link
Contributor

Do we need to move the E2E test as well? intel/llvm-test-suite#1033

@sarnex
Copy link
Contributor Author

sarnex commented Sep 30, 2022

Do we need to move the E2E test as well? intel/llvm-test-suite#1033

So it looks like the E2E test was never merged, that PR is still open. I can submit a new one for this case if you think it has value

Signed-off-by: Sarnie, Nick <nick.sarnie@intel.com>
@sarnex sarnex requested review from asudarsa and removed request for againull September 30, 2022 14:04
@kbobrovs
Copy link
Contributor

I don't know of any document (@kbobrovs correct me if im wrong).

@sarnex, right, there is no document other than the API docs. @asudarsa is correct that this was considered temporary until better std solution is available.

Copy link
Contributor

@kbobrovs kbobrovs left a comment

Choose a reason for hiding this comment

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

Mostly LGTM, with one typo and couple optional nits.

Also, E2E test for the feature should be added as well eventually into llvm-test-suite repo.
(I just revealed that my E2E test for ESIMD doubleGRF is still in open PR, will add it too)

Signed-off-by: Sarnie, Nick <nick.sarnie@intel.com>
@sarnex
Copy link
Contributor Author

sarnex commented Oct 3, 2022

Mostly LGTM, with one typo and couple optional nits.

Also, E2E test for the feature should be added as well eventually into llvm-test-suite repo. (I just revealed that my E2E test for ESIMD doubleGRF is still in open PR, will add it too)

thanks, i will add an E2E test after this is merged based on your E2E test

@sarnex sarnex requested review from kbobrovs and asudarsa and removed request for asudarsa and kbobrovs October 3, 2022 13:21
@gmlueck
Copy link
Contributor

gmlueck commented Oct 3, 2022

@sarnex, right, there is no document other than the API docs. @asudarsa is correct that this was considered temporary until better std solution is available.

Just to make sure we are on the same page:

  • We do not document this API to users
  • We expect the only users of this API to be internal, and no end-user code will use it
  • We reserve the right to remove support (and thus break ABI) at any time, even in a minor release

Agreed?

Signed-off-by: Sarnie, Nick <nick.sarnie@intel.com>
@sarnex
Copy link
Contributor Author

sarnex commented Oct 4, 2022

@sarnex, right, there is no document other than the API docs. @asudarsa is correct that this was considered temporary until better std solution is available.

Just to make sure we are on the same page:

* We do not document this API to users

* We expect the only users of this API to be internal, and no end-user code will use it

* We reserve the right to remove support (and thus break ABI) at any time, even in a minor release

Agreed?

That is my understanding but I expect you were talking to @kbobrovs

@kbobrovs
Copy link
Contributor

kbobrovs commented Oct 4, 2022

@sarnex, right, there is no document other than the API docs. @asudarsa is correct that this was considered temporary until better std solution is available.

Just to make sure we are on the same page:

* We do not document this API to users

* We expect the only users of this API to be internal, and no end-user code will use it

* We reserve the right to remove support (and thus break ABI) at any time, even in a minor release

Agreed?

That is my understanding but I expect you were talking to @kbobrovs

I agree

Signed-off-by: Sarnie, Nick <nick.sarnie@intel.com>
@sarnex sarnex requested a review from asudarsa October 4, 2022 18:34
Copy link
Contributor

@asudarsa asudarsa left a comment

Choose a reason for hiding this comment

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

LGTM. Thanks Nick. Please keep a lookout from upcoming changes in this area.

@sarnex
Copy link
Contributor Author

sarnex commented Oct 6, 2022

@pvchupin @AlexeySachkov Hey, I heard you guys are part of llvm-reviewers-runtime but I can't see who is part of it myself. Do you guys mind reviewing this or finding someone from there to review this? Thanks!

@pvchupin
Copy link
Contributor

pvchupin commented Oct 6, 2022

@sarnex, you can actually ping @intel/llvm-reviewers-runtime :)

@sarnex
Copy link
Contributor Author

sarnex commented Oct 7, 2022

@sarnex, you can actually ping @intel/llvm-reviewers-runtime :)

Somehow it doesn't work for me, maybe a permissions thing? Weird

@intel/llvm-reviewers-runtime (see not highlighted)

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.

6 participants