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(
45494549 const int ir0 = dr*ith;
45504550 const int ir1 = MIN (ir0 + dr, nr);
45514551
4552+ ggml_from_float_t const from_float = ggml_get_type_traits_cpu (dst->type )->from_float ;
4553+
45524554 for (int64_t i03 = 0 ; i03 < ne03; ++i03) {
45534555 for (int64_t i02 = 0 ; i02 < ne02; ++i02) {
45544556 for (int64_t i = ir0; i < ir1; ++i) {
@@ -4560,9 +4562,9 @@ static void ggml_compute_forward_set_rows_f32(
45604562
45614563 GGML_ASSERT (i01 >= 0 && i01 < ne1);
45624564
4563- ggml_cpu_fp32_to_fp16 (
4565+ from_float (
45644566 (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);
45664568 }
45674569 }
45684570 }
Original file line number Diff line number Diff line change @@ -3417,7 +3417,6 @@ struct ggml_tensor * ggml_set_rows(
34173417 GGML_ASSERT (b -> ne [2 ] % c -> ne [1 ] == 0 );
34183418 GGML_ASSERT (b -> ne [3 ] % c -> ne [2 ] == 0 );
34193419 GGML_ASSERT (c -> ne [3 ] == 1 );
3420- GGML_ASSERT (a -> type == GGML_TYPE_F16 ); // TODO: relax
34213420 GGML_ASSERT (b -> type == GGML_TYPE_F32 );
34223421 GGML_ASSERT (c -> type == GGML_TYPE_I64 );
34233422
You can’t perform that action at this time.
0 commit comments