-
Notifications
You must be signed in to change notification settings - Fork 768
[SYCL] Mark sycl::marray device copyable #4427
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
Conversation
sycl::marray is device copyable if element type is device copyable
The additional type are: - sycl::vec<T> - sycl::id - sycl::range
@intel/llvm-reviewers-runtime, could you please review the PR? |
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.
Overall LGTM, but I think we need a better test. On Windows the compiler can (possibly) produce types with different alignment on host and device. We either need a runtime test or a static test, that checks the alignment.
|
I share these expectations, I'm just not sure if compiler has the same point of view. Since device and host compilation are two separate processes, with two different ABIs. For SYCL-defined types we must ensure ABI is the same on host and device, at least we should update this test: https://github.com/intel/llvm/blob/sycl/sycl/test/abi/symbol_size_alignment.cpp |
The requested test change does not look like connected to the PR. If there are gaps in testing it should be covered as separate issue/PR. |
sycl::marray is device copyable if the element type is device copyable.
Also test was added to verify that the following types are device copyable: