File tree Expand file tree Collapse file tree 2 files changed +4
-3
lines changed Expand file tree Collapse file tree 2 files changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -4549,6 +4549,8 @@ static void ggml_compute_forward_set_rows_f32(
4549
4549
const int ir0 = dr*ith;
4550
4550
const int ir1 = MIN (ir0 + dr, nr);
4551
4551
4552
+ ggml_from_float_t const from_float = ggml_get_type_traits_cpu (dst->type )->from_float ;
4553
+
4552
4554
for (int64_t i03 = 0 ; i03 < ne03; ++i03) {
4553
4555
for (int64_t i02 = 0 ; i02 < ne02; ++i02) {
4554
4556
for (int64_t i = ir0; i < ir1; ++i) {
@@ -4560,9 +4562,9 @@ static void ggml_compute_forward_set_rows_f32(
4560
4562
4561
4563
GGML_ASSERT (i01 >= 0 && i01 < ne1);
4562
4564
4563
- ggml_cpu_fp32_to_fp16 (
4565
+ from_float (
4564
4566
(const float *) ((char *) src0->data + i*nb01 + i02*nb02 + i03*nb03),
4565
- ( ggml_fp16_t *) ((char *) dst->data + i01*nb1 + i02*nb2 + i03*nb3), nc);
4567
+ ((char *) dst->data + i01*nb1 + i02*nb2 + i03*nb3), nc);
4566
4568
}
4567
4569
}
4568
4570
}
Original file line number Diff line number Diff line change @@ -3417,7 +3417,6 @@ struct ggml_tensor * ggml_set_rows(
3417
3417
GGML_ASSERT (b -> ne [2 ] % c -> ne [1 ] == 0 );
3418
3418
GGML_ASSERT (b -> ne [3 ] % c -> ne [2 ] == 0 );
3419
3419
GGML_ASSERT (c -> ne [3 ] == 1 );
3420
- GGML_ASSERT (a -> type == GGML_TYPE_F16 ); // TODO: relax
3421
3420
GGML_ASSERT (b -> type == GGML_TYPE_F32 );
3422
3421
GGML_ASSERT (c -> type == GGML_TYPE_I64 );
3423
3422
You can’t perform that action at this time.
0 commit comments