This repository was archived by the owner on Mar 28, 2023. It is now read-only.
forked from llvm/llvm-test-suite
-
Notifications
You must be signed in to change notification settings - Fork 130
Reduce the test scope for sort.cpp #670
Merged
Merged
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
8a9bead
Reduce the test scope for sort.cpp
bader 61a138b
Reduce work-group size and apply minor style fixes.
bader d2abf2a
Update SYCL/GroupAlgorithm/SYCL2020/sort.cpp
bader 658c11e
Apply code review comments: use namespace alias instead of importing.
bader File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
I'm ok with the change if there are no compilation errors related to
abs
as it's mentioned in the commentThere 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.
As you can see in pre-commit logs, there no compilation errors. BTW, the comment is about
std::abs
, notsycl::abs
.I trusted your comment and didn't try to use
std::abs
here.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.
I see. Sorry, missed that there is
sycl::abs
now.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.
I checked
std::abs
and I see the problem.Standard library doesn't provide abs overloads for unsigned integer types. It make sense, so the question is: why SYCL spec defines abs for unsigned integer types?
I suppose your code might not work as expected for unsigned types. I suggest you to think about it.
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 for pointing it out. What is your opinion whether
sycl::abs
for unsigned integer types is a bug or a feature of SYCL?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.
Technically, I don't any problems with defining such function, but the use case is unclear. This function does nothing, but return its only argument.
I suppose it wasn't intention to define such function. It's just the side effect of listing all supported OpenCL types as allowed parameters for integer functions.
@intel/dpcpp-specification-reviewers, FYI.
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.
I captured this question as a Kronos issue against the SYCL spec: https://gitlab.khronos.org/sycl/Specification/-/issues/584