-
Notifications
You must be signed in to change notification settings - Fork 91
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
batch with half #1716
batch with half #1716
Conversation
3537d26
to
046707c
Compare
046707c
to
82793ee
Compare
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.
Mostly looks good. Some questions on tolerance, but in general we need to really rethink how we set tolerance everywhere in Ginkgo.
@@ -136,7 +141,7 @@ TYPED_TEST(BatchBicgstab, CanSolveDenseSystem) | |||
using real_type = gko::remove_complex<value_type>; | |||
using Solver = typename TestFixture::solver_type; | |||
using Mtx = typename TestFixture::Mtx; | |||
const real_type tol = 1e-5; | |||
const real_type tol = 1e-4; |
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.
Maybe loosen the tolerance only for half ? I think it would be better to leave the tighter tolerance for the other types.
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 1e-5 is quite loose for double, so 1e-5 and 1e-4 does not make big difference there.
I can change them only in half precision.
Side note. this condition also means that it is more challenging to half than double/single precision on the machine eps perspective.
// There is no guarantee of this condition. We disable this check in | ||
// half. |
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.
What do you mean there is no guarantee for this condition ? I would assume that they are atleast close.
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.
the implicit residual norm can be quite different from the actual residual norm after many iterations.
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.
IMO the check can be removed completely. We can only guarantee that the (implicit) residual will be less than the given tolerance, which is checked above. So this is a quite unrelated check.
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 would still suggest to remove this check for all value types.
1e9688c
to
de5c2a7
Compare
// There is no guarantee of this condition. We disable this check in | ||
// half. |
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.
IMO the check can be removed completely. We can only guarantee that the (implicit) residual will be less than the given tolerance, which is checked above. So this is a quite unrelated check.
de5c2a7
to
c443777
Compare
c443777
to
8f47eee
Compare
4995497
to
8e4234d
Compare
8f47eee
to
3329070
Compare
43bddce
to
bfc36d0
Compare
47a25f9
to
4843cc7
Compare
4843cc7
to
fdac648
Compare
fdac648
to
f3137db
Compare
f3137db
to
6758e9f
Compare
aa3f29b
to
fa2b70d
Compare
6758e9f
to
d022134
Compare
Quality Gate failedFailed conditions |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## half_prec_mg_reorder #1716 +/- ##
=======================================================
Coverage ? 89.45%
=======================================================
Files ? 797
Lines ? 65819
Branches ? 0
=======================================================
Hits ? 58880
Misses ? 6939
Partials ? 0 ☔ View full report in Codecov by Sentry. |
4a4ac85
to
2b87f17
Compare
2b87f17
to
306d06a
Compare
Error: PR already merged! |
This PR enable batch funtionality with half precision