Skip to content

[SYCL] Change sub_group_mask copy-assignment operator to default #10886

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 2 commits into from
Aug 21, 2023

Conversation

steffenlarsen
Copy link
Contributor

As part of version two of sycl_ext_oneapi_sub_group_mask the copy-asssignment operator is defined as default but were deleted as part of #10564. This changes them to default ahead of version 2 of the extension to avoid regressions.

As part of version two of [sycl_ext_oneapi_sub_group_mask](https://github.com/intel/llvm/blob/sycl/sycl/doc/extensions/supported/sycl_ext_oneapi_sub_group_mask.asciidoc)
the copy-asssignment operator is defined as default but were deleted as
part of intel#10564. This changes them to
`default` ahead of version 2 of the extension to avoid regressions.

Signed-off-by: Larsen, Steffen <[email protected]>
@masterleinad
Copy link
Contributor

Ah, I had #10885 already opened.

As part of version two of sycl_ext_oneapi_sub_group_mask the copy-asssignment operator is defined as default but were deleted as part of #10564. This changes them to default ahead of version 2 of the extension to avoid regressions.

Either would work since version 1 didn't have any user-provided constructor or assignments operators but they were implicitly generated (and not deleted). The problem really is that the current implementation neither conforms to version 1 nor 2, probably because the existence of the private

sub_group_mask(BitsType rhs, size_t bn)

avoids all other constructors being implicitly defined.

Signed-off-by: Larsen, Steffen <[email protected]>
@steffenlarsen
Copy link
Contributor Author

Ah, I had #10885 already opened.

As part of version two of sycl_ext_oneapi_sub_group_mask the copy-asssignment operator is defined as default but were deleted as part of #10564. This changes them to default ahead of version 2 of the extension to avoid regressions.

Either would work since version 1 didn't have any user-provided constructor or assignments operators but they were implicitly generated (and not deleted). The problem really is that the current implementation neither conforms to version 1 nor 2, probably because the existence of the private

sub_group_mask(BitsType rhs, size_t bn)

avoids all other constructors being implicitly defined.

I was made aware of your patch right after I opened this! Personally, I would prefer default as long as it is possible for the class. I have opened an issue regarding the problems caused by the private ctor. For now I think it is best for this PR to just revert the regression.

@steffenlarsen steffenlarsen changed the title [SYCL] Change sub_group_mast copy-assignment operator to default [SYCL] Change sub_group_mask copy-assignment operator to default Aug 21, 2023
Copy link
Contributor

@maarquitos14 maarquitos14 left a comment

Choose a reason for hiding this comment

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

LGTM

@steffenlarsen
Copy link
Contributor Author

CI failure caused by device issue similar to #10460.

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.

4 participants