-
Notifications
You must be signed in to change notification settings - Fork 801
[SYCL] Add static cast for half builtins relational #6133
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
Changes from all commits
Commits
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.
should these return a bool or T?
Where in the spec, this is stated?
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.
__vFOrdEqualis not stated in the spec. I am not sure as to if this should return a bool or T.The goal of this change to resolve an issue with building DPCPP on windows and not to change any functionality.
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.
All these are part of 4.17.9. Relational functions. Some of them should return bool. However, you are right that the PR does not change any functionality. If there is a a problem, it was already there in the original code.
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 think functions modified here are all ok, because they're vector and vector versions don't return
boolat all (evenall/any).As for the scalar version (not touched in this PR), this is slightly more complicated as SYCL1.2.1 and SYCL2020 differ here. Those, however, are all internal details and not the user-visible routines so technically we can have them defined whatever way we want to be able to implement user-visible wrappers in a way dependent on the presence of
SYCL2020_CONFORMANT_APISmacro.Uh oh!
There was an error while loading. Please reload this page.
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.
BTW, my guess why it returns -1 is because it is often good for vectorizer to have element filled with ones or with zeroes for using in vector mask operations like VANDPS/VORPS,
but I also was puzzled seeing return of -1.0 for float comparison.
It would be logically more correct to returning int32_t{-1} for float32 rather than -1.0
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.
User-visible methods must do exactly that according to the spec. I guess/think/hope that only those internal functions behave differently for some reason.