File tree 1 file changed +4
-4
lines changed 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -925,8 +925,8 @@ static void quantize_row_q8_0_reference(const float * restrict x, block_q8_0 * r
925
925
const float v0 = x [i * QK8_0 + 2 * j + 0 ]* id ;
926
926
const float v1 = x [i * QK8_0 + 2 * j + 1 ]* id ;
927
927
928
- y [i ].qs [ j ] = v0 + 0.5f ;
929
- y [i ].qs [QK8_0 /2 + j ] = v1 + 0.5f ;
928
+ y [i ].qs [ j ] = roundf ( v0 ) ;
929
+ y [i ].qs [QK8_0 /2 + j ] = roundf ( v1 ) ;
930
930
}
931
931
}
932
932
}
@@ -1083,8 +1083,8 @@ static void quantize_row_q8_1_reference(const float * restrict x, block_q8_1 * r
1083
1083
const float v0 = x [i * QK8_1 + 2 * j + 0 ]* id ;
1084
1084
const float v1 = x [i * QK8_1 + 2 * j + 1 ]* id ;
1085
1085
1086
- y [i ].qs [ j ] = v0 + 0.5f ;
1087
- y [i ].qs [QK8_1 /2 + j ] = v1 + 0.5f ;
1086
+ y [i ].qs [ j ] = roundf ( v0 ) ;
1087
+ y [i ].qs [QK8_1 /2 + j ] = roundf ( v1 ) ;
1088
1088
1089
1089
sum += y [i ].qs [ j ];
1090
1090
sum += y [i ].qs [QK8_1 /2 + j ];
You can’t perform that action at this time.
0 commit comments