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] Fix abs_diff host implementation #12859

Merged
merged 1 commit into from
Feb 29, 2024

Conversation

aelovikov-intel
Copy link
Contributor

In #12856 I misunderstood what the spec meant by

When the inputs are scalars, returns |x - y|. Otherwise, returns
|x[i]- y[i]| for each element of x and y. The subtraction is done
without modulo overflow. The behavior is undefined if the result
cannot be represented by the return type.

Fix it here. We still differ from non-preview mode in return type - it used to be unsigned prior to SYCL2020 revision 8, I believe.

In intel#12856 I misunderstood what the
spec meant by

> When the inputs are scalars, returns |x - y|. Otherwise, returns
> |x[i]- y[i]| for each element of x and y. The subtraction is done
> without modulo overflow. The behavior is undefined if the result
> cannot be represented by the return type.

Fix it here. We still differ from non-preview mode in return type - it
used to be `unsigned` prior to SYCL2020 revision 8, I believe.
Copy link
Contributor

@steffenlarsen steffenlarsen left a comment

Choose a reason for hiding this comment

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

👍

@steffenlarsen steffenlarsen merged commit 2ebc479 into intel:sycl Feb 29, 2024
13 checks passed
@aelovikov-intel aelovikov-intel deleted the fix-abs-diff branch February 29, 2024 16:07
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.

2 participants