Skip to content
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] Remove IsDeprecatedDeviceCopyable #16615

Open
wants to merge 1 commit into
base: sycl
Choose a base branch
from

Conversation

aelovikov-intel
Copy link
Contributor

@aelovikov-intel aelovikov-intel commented Jan 14, 2025

This was discussed in
#15342 (comment) and the consensus seemed to be that we should drop it right away in a separate PR, do it here.

Technically, it is a breaking change that could also be considered a bugfix. An example of a class failing the updated check is

struct Kernel {
    Kernel(int);
    Kernel(const Kernel&) = default;
    Kernel& operator=(const Kernel&) { return *this; } // non-trivial
};

An additional minor reason (other than not being SYCL-conformant) to drop it right away is to save a tiny bit of compile time that is currently used to support something violating the spec.

This required some fixes in the reductions implementation to make sure the kernel we submit internally are actually device copyable.

This was discussed in
intel#15342 (comment) and the
consensus seemd to be that we should drop it right away in a separate
PR, do it here.

Technically, it is a breaking change that could also be considered a
bugfix. An example of a class failing the updated check is

```
struct Kernel {
    Kernel(int);
    Kernel(const Kernel&) = default;
    Kernel& operator=(const Kernel&) { return *this; } // non-trivial
};
```

An additional minor reason (other than not being SYCL-conformant) to
drop it right away is to save a tiny bit of compile time that is
currently used to support something violating the spec.
Comment on lines +75 to +78
template <typename... Ts>
struct is_device_copyable<sycl::detail::tuple<Ts...>>
: std::bool_constant<(... && is_device_copyable<Ts>::value)> {};

Copy link
Contributor Author

Choose a reason for hiding this comment

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

A better way might be just making sycl::detail::tuple trivially copyable automatically whenever all the contained types are, by fixing the implementation, but I'm not sure how big such a change would be or how to approach it.

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.

1 participant