by PennRobotics · 5y ago · 0 comments
Is the error the same in non-Apple targets? Does replacing FMADD with FNMADD (negative mult) or FNSUB change the magnitude of error in this case? Also, would the relative error be the same if the numbers were random integers or random floats of a given range (-1 to 1; -0.01 to 0.01; -100 to 100; 0 to 1) rather than integers in sequence?
-----
In most robotics and AI applications, calculations are unlikely to suffer greatly from inaccuracy but benefit from speed. What are the applications where someone would require floating point math AND both extreme speed and extreme accuracy?
FMA instructions are more accurate and faster compared to a sequence of separate multiply and add/sub instructions, not less. The article literally talks about it in the beginning. The issue is reproducibility, which with floats can be quite bad even without FMA.
Also both robotics and neural networks (I dislike the tendency to call it "AI") can be quite susceptible to errors. Gradient-based optimization algorithms can suffer noticeably from calculation errors. This is why you usually want to train ANNs using 64-bit floats.
Scientific computation.
I'm not even sure, it is a trade-off between (computational) speed and accuracy.
In my experience, error-analysis was a mandatory course for physics, but not in robotics. The error analysis was manual and time-consuming.
In robotics, no one cared why it occasionally produced NaNs, etc.. people just added a small number here and there.
That's faster to program.
To put it more positively, I think, the view here is more having an application, which is robust in the face of errors / edge cases. What counts is the output (action).
While in science the correct model is part of the output. Edge cases are an important part of it.
Do you find this genuinely important? If not, have you had any success encouraging e.g. validating against golden data in a non-bitwise comparison?
Sometimes this is understood by the banks and the solution is to implement a tolerance in the comparisons. In other cases other solutions may have to be used, such as forcing certain reports to be computed on certain software/hardware.
You remind me of the alleged UK Post Office scandal: