Skip to content
This repository was archived by the owner on Mar 28, 2023. It is now read-only.

[SYCL] Add test for correctly rounded sqrt #741

Open
wants to merge 3 commits into
base: intel
Choose a base branch
from

Conversation

npmiller
Copy link

This is testing the flag introduced in:

And should only be merged after that PR is merged.

@npmiller npmiller requested a review from a team as a code owner January 14, 2022 10:59
Comment on lines 47 to 55
float diff = 0.0f;
for (int i = 0; i < input.size(); ++i) {
diff += fabs(expected[i] - output[i]);
}

if (diff > 0.0f) {
std::cerr << "Incorrectly rounded sqrt, total diff: " << diff << std::endl;
return -1;
}

Choose a reason for hiding this comment

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

It think it would be better to do the check in the loop rather than on the total difference. In case it starts failing, the additional information about which i failed might help debug.

Copy link
Author

Choose a reason for hiding this comment

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

Good point, updated!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants