Skip to content

[SYCL] Add SYCL 2020 info::device::built_in_kernel_ids support #4996

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
Nov 22, 2021
Merged

[SYCL] Add SYCL 2020 info::device::built_in_kernel_ids support #4996

merged 1 commit into from
Nov 22, 2021

Conversation

dnmokhov
Copy link
Contributor

@dnmokhov dnmokhov commented Nov 19, 2021

  • Add ProgramManager::getBuiltInKernelID, which generates and caches built-in kernel IDs.
  • Use that API to generate or look up built-in kernel IDs, when queried.
  • Throw an exception in program manager when actually trying to use built-in kernels, since they are not yet fully supported.
  • Add SYCL 2020 deprecation warning for built_in_kernels (old query).

Test: intel/llvm-test-suite#576

- Add `ProgramManager::getBuiltInKernelID`, which generates and caches built-in kernel IDs.
- Use that API to generate or look up built-in kernel IDs, when queried.
- Throw an exception in program manager when actually trying to use built-in kernels, since they are not yet fully supported.
- Add SYCL 2020 deprecation warning for `built_in_kernels` (old query).
@dnmokhov dnmokhov marked this pull request as ready for review November 20, 2021 01:16
@dnmokhov dnmokhov requested a review from a team as a code owner November 20, 2021 01:16
info::device::built_in_kernel_ids> {
static std::vector<kernel_id> get(RT::PiDevice dev, const plugin &Plugin) {
std::string result =
get_device_info<std::string, info::device::built_in_kernels>::get(
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 will get the deprecation warning for info::device::built_in_kernels here.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Since this is not a user-visible include file but is in sycl/source, our compiler should never be compiling this code, right?

Copy link
Contributor

Choose a reason for hiding this comment

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

It is better to avoid warnings in RT library builds as well.

@dm-vodopyanov
Copy link
Contributor

Waiting for CI results from intel/llvm-test-suite#576 (comment) before merging.

@romanovvlad romanovvlad merged commit c4fa95f into intel:sycl Nov 22, 2021
vladimirlaz pushed a commit that referenced this pull request Dec 1, 2021
* [SYCL] Add a built-in kernel test

- Check `device::get_info<info::device::built_in_kernel_ids>`.
- Check that an attempt to get a kernel bundle with built-in kernels leads to an exception since they are not yet fully supported.

The above functionality was added in #4996.
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.

5 participants