Match Halide execution to floating point IPs
Closed this issue · 7 comments
The bfloat
implementation in Halide seems to be consistent with the IP with rnd=1
. It would much easier if we can use that mode instead.
I think we should check which path is doing what type of rounding, and not just make the hardware match our Halide implementation. I thought the hardware was doing round to nearest even, which is what I think we want. If Halide is just doing round to nearest, we probably should change Halide, and not the hardware. But I could be completely wrong on what is implemented on either side
IEEE defines 5 different valid rounding rules:https://en.wikipedia.org/wiki/IEEE_754#Rounding_rules
I believe any of them are IEEE compliant implementation.
We will see if we can change Halide's behavior tomorrow.
I am surprised that Halide does not use round to nearest even.
@jeffsetter, can you investigate exactly what rounding mode is being used by halide?
So, just to be clear: Halide's implementation is RNE and RTL's implementation is RNE, but we are getting different results?
Halide is using rnd=1 and we're using rnd=0 in RTL. We will change the Halide implementation to match with the RTL.