Commit 7a027f3
committed
[ntuple] Fix wrong assert in Real32Quant
The assert in QuantizeReals() should not assume that all values are in
range, as we want to throw an exception at the end of the function if
that is the case.
Another mistake conspired to hide this bug from all non-windows builds:
LeadingZeroes() and TrailingZeroes() were incorrectly using the 64-bit
version of the intrinsics, where they should have used the 32-bit one.
This means they effectively never fired as they ranged from 0 to 63
rather than the intended 0 to 31.1 parent 1dc46e8 commit 7a027f3
1 file changed
+5
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
996 | 996 | | |
997 | 997 | | |
998 | 998 | | |
999 | | - | |
| 999 | + | |
1000 | 1000 | | |
1001 | 1001 | | |
1002 | 1002 | | |
| |||
1011 | 1011 | | |
1012 | 1012 | | |
1013 | 1013 | | |
1014 | | - | |
| 1014 | + | |
1015 | 1015 | | |
1016 | 1016 | | |
1017 | 1017 | | |
| |||
1042 | 1042 | | |
1043 | 1043 | | |
1044 | 1044 | | |
1045 | | - | |
| 1045 | + | |
| 1046 | + | |
1046 | 1047 | | |
1047 | 1048 | | |
1048 | 1049 | | |
1049 | 1050 | | |
1050 | 1051 | | |
1051 | 1052 | | |
1052 | | - | |
| 1053 | + | |
1053 | 1054 | | |
1054 | 1055 | | |
1055 | 1056 | | |
| |||
0 commit comments