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

[BUG] Unit test ResultCheck only checks the first element #135

Closed
weimingzha0 opened this issue Jan 14, 2021 · 1 comment · Fixed by #138
Closed

[BUG] Unit test ResultCheck only checks the first element #135

weimingzha0 opened this issue Jan 14, 2021 · 1 comment · Fixed by #138
Assignees

Comments

@weimingzha0
Copy link
Collaborator

Describe the bug
Looks like Unit test ResultCheck only checks the first element

T* out_data = reinterpret_cast<T*>(out[i]);
size_t elem_size = sizeof(out_data) / sizeof(T); ===> elem_size is 1 ?
for (size_t j = 0; j < elem_size; ++j) {
bool nan_mismatch = (isnan(out_data[j]) ^ isnan(out_ref_data[j]));
if (nan_mismatch || fabs(out_data[j] - out_ref_data[j]) > thre) {
#if DEBUG_PRINT
oss << " result: FAIL [" << i <<", "<< j << "]: " << out_data[j]
<< " expects: " << out_ref_data[j] << "\n";
outfile << oss.str();
outfile.close();

@weimingzha0 weimingzha0 linked a pull request Jan 18, 2021 that will close this issue
@weimingzha0
Copy link
Collaborator Author

fixed

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 a pull request may close this issue.

2 participants