-
Notifications
You must be signed in to change notification settings - Fork 755
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] Implement backend content extension #16633
base: sycl
Are you sure you want to change the base?
Conversation
…shi25/llvm into device_image_backend_content
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Most of the changes here are unrelated to the symbols I added. I suppose sometime in the past someone has modified this file manually which caused some of the symbols to get out of order.
sycl/doc/extensions/experimental/sycl_ext_oneapi_device_image_backend_content.asciidoc
Outdated
Show resolved
Hide resolved
…shi25/llvm into device_image_backend_content
@@ -101,7 +99,7 @@ class device_image { | |||
backend ext_oneapi_get_backend() const noexcept; | |||
std::vector<std::byte> ext_oneapi_get_backend_content() const; | |||
|
|||
std::span<std::byte> ext_oneapi_get_backend_content_view() const; // Requires C++20 | |||
std::span<const std::byte> ext_oneapi_get_backend_content_view() const; // Requires C++20 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I know the new extension spec says std::span
and goes on to note that this requires C++20.
But it might be worth noting that we do have sycl::span
which is available even if not using C++20.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks Chris!
@gmlueck FYI
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sycl::span
and std::span
are different types. Therefore, we would need two separate functions: one that returns std::span
and another that returns sycl::span
. I considered doing this, but it did not seem worth the effort and additional maintenance cost. If an application wants the more efficient API, I think it's reasonable to ask them to compile in C++20.
Implement sycl_ext_oneapi_device_image_backend_content.