@@ -417,43 +417,6 @@ GGML_API void ggml_aligned_free(void * ptr, size_t size);
417417 #define GGML_FP16_TO_FP32 (x ) GGML_COMPUTE_FP16_TO_FP32(x)
418418 #define GGML_FP32_TO_FP16 (x ) GGML_COMPUTE_FP32_TO_FP16(x)
419419
420- #elif defined(__NNPA__)
421- /*
422- * Note: This functionality is ready for use, but the compiler macros
423- * defined for the s390x platform are defined in ggml-cpu while
424- * this file is 1 step behind, in ggml-src. I currently have no
425- * idea how to fix this, so I am leaving it as is.
426- *
427- * CMake chain: ggml -> ggml-src -> ggml-cpu
428- * ^^^^^^^^ ^^^^^^^^
429- * | | ggml-cpu defines the macros
430- * | | needed for s390x detection.
431- * | this file is here, where the s390x
432- * | detection macros are not defined.
433- *
434- * TODO: Fix s390x platform detection in this file.
435- */
436-
437- #define GGML_COMPUTE_FP16_TO_FP32 (x ) ggml_compute_fp16_to_fp32(x)
438- #define GGML_COMPUTE_FP32_TO_FP16 (x ) ggml_compute_fp32_to_fp16(x)
439-
440- #define GGML_FP16_TO_FP32 (x ) GGML_COMPUTE_FP16_TO_FP32(x)
441- #define GGML_FP32_TO_FP16 (x ) GGML_COMPUTE_FP32_TO_FP16(x)
442-
443- static inline float ggml_compute_fp16_to_fp32 (ggml_fp16_t h) {
444- uint16x8_t v_h = vec_splats (h);
445- uint16x8_t v_hd = vec_convert_from_fp16 (v_h, 0 );
446- return vec_extend_to_fp32_hi (v_hd, 0 )[0 ];
447- }
448-
449- static inline ggml_fp16_t ggml_compute_fp32_to_fp16 (float f) {
450- float32x4_t v_f = vec_splats (f);
451- float32x4_t v_zero = vec_splats (0 .0f );
452- uint16x8_t v_hd = vec_round_from_fp32 (v_f, v_zero, 0 );
453- uint16x8_t v_h = vec_convert_to_fp16 (v_hd, 0 );
454- return vec_extract (v_h, 0 );
455- }
456-
457420#else
458421
459422 // FP16 <-> FP32
0 commit comments