Skip to content

[SYCL] Fix sycl::vec unary ops #10722

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 5 commits into from
Aug 9, 2023

Conversation

cperkinsintel
Copy link
Contributor

@cperkinsintel cperkinsintel commented Aug 8, 2023

The recent sycl::vec changes (#9492) broke they unary operations. This PR fixes them and adds some testing to avoid that in the future.

@cperkinsintel cperkinsintel temporarily deployed to aws August 8, 2023 02:43 — with GitHub Actions Inactive
@cperkinsintel
Copy link
Contributor Author

The unary operator ! is not supported for std::byte ( https://godbolt.org/z/7eWTKT9xP ). So it seems to me that it shouldn't be supported for sycl::vec<std::byte> either. I'm a little confused as to how it ever worked.
In any case, the Basic/vector_byte.cpp test is failing with this PR. The simplest solution would be to remove the unary test at line 293 of that file, but I'm not sure how acceptable that would be.

@cperkinsintel cperkinsintel temporarily deployed to aws August 8, 2023 03:24 — with GitHub Actions Inactive
@bader
Copy link
Contributor

bader commented Aug 8, 2023

std::byte supports explicit conversion to an integer type (and back) - https://en.cppreference.com/w/cpp/types/byte#Non-member_functions.

https://godbolt.org/z/3z65E4Th4

@cperkinsintel
Copy link
Contributor Author

ping to reviewers. This PR has been updated and tests are passing.

@dm-vodopyanov dm-vodopyanov changed the title [SYCL] sycl::vec unary ops [SYCL] Fix sycl::vec unary ops Aug 9, 2023
@dm-vodopyanov dm-vodopyanov merged commit f7b00b7 into intel:sycl Aug 9, 2023
cperkinsintel added a commit to cperkinsintel/llvm that referenced this pull request Oct 17, 2023
mdtoguchi pushed a commit to mdtoguchi/llvm that referenced this pull request Oct 18, 2023
The recent sycl::vec changes (intel#9492)
broke they unary operations. This PR fixes them and adds some testing to
avoid that in the future.
cperkinsintel added a commit to cperkinsintel/llvm that referenced this pull request Oct 27, 2023
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.

3 participants