Skip to content

[SYCL][RTC] Query kernels by source code name #17032

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 8 commits into from
Feb 27, 2025

Conversation

jopperm
Copy link
Contributor

@jopperm jopperm commented Feb 17, 2025

This PR adds full support for the registered_kernel_names property to query kernels by their souce code name (and instantiate template kernels), leveraging the new [[__sycl_detail__::__registered_kernels__(...)]] attribute added in #16485 and #16821.

Also, kernel_bundle::ext_oneapi_get_raw_kernel_name is implemented following the draft spec #11985.

Signed-off-by: Julian Oppermann <julian.oppermann@codeplay.com>
Signed-off-by: Julian Oppermann <julian.oppermann@codeplay.com>
Signed-off-by: Julian Oppermann <julian.oppermann@codeplay.com>
Signed-off-by: Julian Oppermann <julian.oppermann@codeplay.com>
@jopperm jopperm marked this pull request as ready for review February 24, 2025 23:10
@jopperm jopperm requested review from a team as code owners February 24, 2025 23:10
// name to mangled is not yet supported. So we cannot yet do this:
// sycl::kernel k2 = kbExe2.ext_oneapi_get_kernel("ff_templated<int>");
// The templated function name was registered.
sycl::kernel k2 = kbExe2.ext_oneapi_get_kernel("ff_templated<int>");
Copy link
Contributor

Choose a reason for hiding this comment

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

so awesome! This makes me happy.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Shout-out to @premanandrao and @jzc who did the heavy lifting for this feature 🙏

@cperkinsintel
Copy link
Contributor

There is one thing missing. The docs for this feature are in this Draft PR that @gmlueck made: #11985

Grab the relevant parts of that and bring them into this PR. I believe that's the workflow we are supposed to use when working against these longer-term extension specifications.

Copy link
Contributor

@cperkinsintel cperkinsintel left a comment

Choose a reason for hiding this comment

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

I had some comments, and the one about the docs is a must-have. But otherwise great.

Signed-off-by: Julian Oppermann <julian.oppermann@codeplay.com>
@gmlueck
Copy link
Contributor

gmlueck commented Feb 27, 2025

There is one thing missing. The docs for this feature are in this Draft PR that @gmlueck made: #11985

@sommerlukas and I coordinated about this. He will merge #11985 once this PR (#17032) is merged. We believe that #17032 is the last missing implementation piece, and then all of the features specified on #11985 will be working.

@jopperm
Copy link
Contributor Author

jopperm commented Feb 27, 2025

@intel/llvm-gatekeepers This is ready to land, thanks!

@uditagarwal97 uditagarwal97 merged commit 5ef2c7c into intel:sycl Feb 27, 2025
20 checks passed
sommerlukas pushed a commit that referenced this pull request Mar 4, 2025
This PR is based on #17032. It adds
runtime tests that match the examples from the spec changes in
#11985, showing that the test run
successfully using the JIT approach for RTC.
This PR also contains a few minor fixes in the example code in the RTC
docs.
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