File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -4520,7 +4520,7 @@ void kernel_mul_mv_iq1_m_f32_impl(
4520
4520
device const block_iq1_m * xr = x + ibl;
4521
4521
device const uint8_t * qs = xr->qs + 4 * ib;
4522
4522
device const uint8_t * qh = xr->qh + 2 * ib;
4523
- device const uint16_t * sc = (device const uint16_t *)xr->scales + ib/ 2 ;
4523
+ device const uint16_t * sc = (device const uint16_t *)xr->scales ;
4524
4524
4525
4525
for (int row = 0 ; row < N_DST; row++) {
4526
4526
@@ -4540,8 +4540,8 @@ void kernel_mul_mv_iq1_m_f32_impl(
4540
4540
}
4541
4541
const float delta1 = sumy[0 ] * (qh[0 ] & 0x08 ? -1 - IQ1M_DELTA : -1 + IQ1M_DELTA) + sumy[1 ] * (qh[0 ] & 0x80 ? -1 - IQ1M_DELTA : -1 + IQ1M_DELTA);
4542
4542
const float delta2 = sumy[2 ] * (qh[1 ] & 0x08 ? -1 - IQ1M_DELTA : -1 + IQ1M_DELTA) + sumy[3 ] * (qh[1 ] & 0x80 ? -1 - IQ1M_DELTA : -1 + IQ1M_DELTA);
4543
- sumf[row] += (float )scale.f16 * ((sum[0 ] + delta1) * (2 *((sc[0 ] >> (6 *(ib%2 )+0 )) & 7 ) + 1 ) +
4544
- (sum[1 ] + delta2) * (2 *((sc[0 ] >> (6 *(ib%2 )+3 )) & 7 ) + 1 ));
4543
+ sumf[row] += (float )scale.f16 * ((sum[0 ] + delta1) * (2 *((sc[ib/ 2 ] >> (6 *(ib%2 )+0 )) & 7 ) + 1 ) +
4544
+ (sum[1 ] + delta2) * (2 *((sc[ib/ 2 ] >> (6 *(ib%2 )+3 )) & 7 ) + 1 ));
4545
4545
4546
4546
sc += nb*sizeof (block_iq1_m)/2 ;
4547
4547
qs += nb*sizeof (block_iq1_m);
You can’t perform that action at this time.
0 commit comments