Closed SaltyChiang closed 7 months ago
These tolerances are likely arbitrary.
I'm happy to make them 10x epsilon, and also happy to hear others opinions.
@cpviolator @weinbe2 any thoughts in this regard?
All good by me!
Seems reasonable as well. I'd guess they came from some old code the QUDA code was based on for some reason even further in the past, but that's irrelevant now.
These values are set to ~10x epsilon for SU(3) projection in https://github.com/CLQCD/quda/commit/0fc4cb4123531c1b2d40d6cd42a61803ca47f44a.
There are some default tolerance values for different kernels, for example, https://github.com/lattice/quda/blob/fd50676db06fc36efb3a791a3059c57cca70bb55/include/kernels/gauge_ape.cuh#L11-L12
I used to think they were 10 times the epsilon of fp64 and fp32. But I checked
DBL_EPSLON
andFLT_EPSLON
in float.h:It seems that 2e-15 for double precision and 1e-6 for single precision are more reasonable.
Are these values set intentionally or by accident?