-
Notifications
You must be signed in to change notification settings - Fork 246
MIOpen error tolerance #3638
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
base: develop
Are you sure you want to change the base?
MIOpen error tolerance #3638
Conversation
test/verify.hpp
Outdated
@@ -211,6 +211,7 @@ std::size_t mismatch_diff(R1&& r1, R2&& r2, T diff) | |||
float_equal, diff, std::bind(abs_diff, std::placeholders::_1, std::placeholders::_2))); | |||
} | |||
|
|||
// Reference values are r1, measured values are r2 | |||
template <class R1, class R2> | |||
double rms_range(R1&& r1, R2&& r2) |
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 we should rename these arguments to make it clear that r1 is intended to be the reference.
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.
done!
test/verify.hpp
Outdated
double mag2 = static_cast<double>(*std::max_element(r2.begin(), r2.end(), compare_mag)); | ||
double mag = | ||
std::max({std::fabs(mag1), std::fabs(mag2), std::numeric_limits<double>::min()}); | ||
return std::sqrt(square_difference) / (std::sqrt(n) * mag); | ||
double normalizer = std::max({std::fabs(mag1), std::numeric_limits<double>::min()}); | ||
return std::sqrt(square_difference) / (std::sqrt(n) * normalizer); |
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.
Hehe this will be a spicy one.
Interesting find though!
Starting CI! |
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.
LGTM
dd06398
to
389e109
Compare
Restarting CI again. |
Failing on formatting. |
389e109
to
fea5f7d
Compare
@BrianHarrisonAMD opsie, missed to run this before. Should be ok now! |
Btw I see that some smoke tests are failing for gfx90a (MI200), but I have double-checked on our side and they pass on our MI200s, how should we proceed for those? |
Looks like it was stopped / aborted before fully finishing. |
Scope
While testing the variant 0 for bnorm backward spatial single, we observed that the error tolerance in MIOpenDriver is sub-optimal. For instance, the following results were observed
Notice that the execution is successful, according to the driver checks. However, the error reported is high so this should actually be failing.
Notes for the reviewer
maxrms
definition because it was too big compared to the rms values being computed (due to the rms normalization done). TheVerifyForward
method seems to also be using the same value formaxrms
as the new implementation inVerifyBackward
.