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

[SYCLomatic] Add the bf16,fp16, float and double type floating point comparing tolerance. #1940

Merged
merged 15 commits into from
May 10, 2024

Conversation

ShengchenJ
Copy link
Contributor

No description provided.

@ShengchenJ ShengchenJ changed the title [SYCLomatic] Add the bf16 and fp16 comparing. [SYCLomatic] Add the bf16,fp16, float and double type floating point comparing tolerance. May 8, 2024
Copy link
Contributor

@AndyCHHuang AndyCHHuang left a comment

Choose a reason for hiding this comment

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

LGTM

default_tolerances = {
"bf16": 9.77e-04,
"fp16": 9.77e-04,
"float": 1.19e-07,
Copy link
Contributor

Choose a reason for hiding this comment

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

for the end user, a little complex to set the float number here, how about change to set num of ULP instead.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I prefer to keep this epsilon value here. As our floating-point comparison is developed by python script. And python code comparing the double type as the default type. Using the ULP to compare the different floating type need more work on it.

ShengchenJ and others added 5 commits May 9, 2024 23:02
Signed-off-by: Chen, Sheng S <[email protected]>
Signed-off-by: Chen, Sheng S <[email protected]>
Signed-off-by: Chen, Sheng S <[email protected]>
@zhimingwang36 zhimingwang36 merged commit 2d028fc into oneapi-src:SYCLomatic May 10, 2024
2 of 6 checks passed
@ShengchenJ ShengchenJ deleted the float_cmp branch July 2, 2024 01:59
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