-
Notifications
You must be signed in to change notification settings - Fork 68
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
Type for copy and fill should be device-copyable #425
Type for copy and fill should be device-copyable #425
Conversation
Clarify that the type used in the `handler::copy` and `handler::fill` functions must be "device copyable". This avoids confusion when `T` is a class type because people might expect the class's copy constructor to be called, when our intent is that the implementation should just do a byte copy. There is no need to clarify the element type of the accessors in these functions becuse we already state that the element type of a buffer must be device copyable. Therefore, this PR only changes the wording for the non-accessor parameters.
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.
We don't have any prefetch
or mem_advise
that are templated with T
so LGTM!
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.
LGTM
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.
LGTM |
…#8826) `cgh.fill(...)` was failing when `T` is a `sycl::vec` type, since `sycl::vec` types have no specialization for `std::is_trivially_copyable`. Since `device_copyable` is a sycl superset of trivially copyable we should use this instead in sycl headers. Related spec change: KhronosGroup/SYCL-Docs#425
KhronosGroup/SYCL-Docs#425 clarifies that the source type for the `copy` must be device copyable. Remove the copy from `const void *` test case since it fails this assertion. Signed-off-by: Michael Aziz <michael.aziz@intel.com>
KhronosGroup/SYCL-Docs#425 clarifies that the source type for the `copy` must be device copyable. Remove the copy from `const void *` test case since it fails this assertion. Signed-off-by: Michael Aziz <michael.aziz@intel.com>
KhronosGroup/SYCL-Docs#425 clarifies that the source type for the `copy` must be device copyable. Remove the copy from `const void *` test case since it fails this assertion. Signed-off-by: Michael Aziz <michael.aziz@intel.com>
Clarify that the type used in the handler::copy and handler::fill functions must be "device copyable". This avoids confusion when T is a class type because people might expect the class's copy constructor to be called, when our intent is that the implementation should just do a byte copy. There is no need to clarify the element type of the accessors in these functions becuse we already state that the element type of a buffer must be device copyable. Therefore, this PR only changes the wording for the non-accessor parameters.
Clarify that the type used in the
handler::copy
andhandler::fill
functions must be "device copyable". This avoids confusion whenT
is a class type because people might expect the class's copy constructor to be called, when our intent is that the implementation should just do a byte copy.There is no need to clarify the element type of the accessors in these functions becuse we already state that the element type of a buffer must be device copyable. Therefore, this PR only changes the wording for the non-accessor parameters.