Skip to content

Commit 381879e

Browse files
committed
cont : tmp
1 parent 477d439 commit 381879e

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

ggml/src/ggml-cpu/repack.cpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1534,15 +1534,22 @@ template <typename BLOC_TYPE, int64_t INTER_SIZE, int64_t NB_COLS, ggml_type PAR
15341534
continue;
15351535
}
15361536

1537+
#if 1
15371538
memcpy( htmp + i02*nbht2 + htpe[i02]*nbht1,
15381539
(char *) src1->data + i12*nb12 + (i20%ne11)*nb11,
15391540
ggml_row_size(GGML_TYPE_F32, ne10));
1541+
#else
1542+
from_float(
1543+
(float *)((char *) src1->data + i12*nb12 + (i20%ne11)*nb11),
1544+
(void *) (hsrc1 + htpe[i02]*nbh11 + i02*nbh12), ne10);
1545+
#endif
15401546

15411547
hids[i12*ne20 + i20] = i02*ne12 + htpe[i02];
15421548
htpe[i02]++;
15431549
}
15441550
}
15451551

1552+
#if 1
15461553
// htmp (float32) => hsrc1 (param type)
15471554
for (int64_t i02 = 0; i02 < ne02; ++i02) { // n_expert
15481555
if (i02 % nth != ith) {
@@ -1563,6 +1570,7 @@ template <typename BLOC_TYPE, int64_t INTER_SIZE, int64_t NB_COLS, ggml_type PAR
15631570
(void *) (hsrc1 + i11*nbh11 + i02*nbh12), ne10);
15641571
}
15651572
}
1573+
#endif
15661574

15671575
ggml_barrier(params->threadpool);
15681576

0 commit comments

Comments
 (0)