We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 70ff4e6 commit 2b4892eCopy full SHA for 2b4892e
ggml/src/ggml-impl.h
@@ -426,14 +426,12 @@ GGML_API void ggml_aligned_free(void * ptr, size_t size);
426
#define GGML_FP16_TO_FP32(x) GGML_COMPUTE_FP16_TO_FP32(x)
427
#define GGML_FP32_TO_FP16(x) GGML_COMPUTE_FP32_TO_FP16(x)
428
429
- // TODO: Determine if inline assembly is faster
430
static inline float ggml_compute_fp16_to_fp32(ggml_fp16_t h) {
431
uint16x8_t v_h = vec_splats(h);
432
uint16x8_t nnpa_dlf16 = vec_convert_from_fp16(v_h, 0);
433
return vec_extend_to_fp32_hi(nnpa_dlf16, 0)[0];
434
}
435
436
437
static inline ggml_fp16_t ggml_compute_fp32_to_fp16(float f) {
438
float32x4_t v_f = vec_splats(f);
439
float32x4_t v_zero = vec_splats(0.0f);
0 commit comments