Skip to content

Commit 72965ea

Browse files
committed
ggml-cpu: add ggml-impl.h future notes
Signed-off-by: Aaron Teo <[email protected]>
1 parent 46227c6 commit 72965ea

File tree

1 file changed

+13
-17
lines changed

1 file changed

+13
-17
lines changed

ggml/src/ggml-impl.h

Lines changed: 13 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -28,17 +28,6 @@
2828
#include <immintrin.h>
2929
#endif
3030

31-
#if defined(GGML_VXE)
32-
#include <vecintrin.h>
33-
#include <ggml-cpu/ggml-cpu-impl.h>
34-
#endif
35-
36-
#if defined(GGML_NNPA)
37-
#ifndef __NNPA__
38-
#define __NNPA__
39-
#endif // __NNPA__
40-
#endif // GGML_NNPA
41-
4231
#ifdef __cplusplus
4332
extern "C" {
4433
#endif
@@ -429,6 +418,19 @@ GGML_API void ggml_aligned_free(void * ptr, size_t size);
429418
#define GGML_FP32_TO_FP16(x) GGML_COMPUTE_FP32_TO_FP16(x)
430419

431420
#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+
*/
432434

433435
#define GGML_COMPUTE_FP16_TO_FP32(x) ggml_compute_fp16_to_fp32(x)
434436
#define GGML_COMPUTE_FP32_TO_FP16(x) ggml_compute_fp32_to_fp16(x)
@@ -474,12 +476,6 @@ GGML_API void ggml_aligned_free(void * ptr, size_t size);
474476
}
475477

476478
static inline float ggml_compute_fp16_to_fp32(ggml_fp16_t h) {
477-
#ifdef __NNPA__
478-
printf("%s: __NNPA__ is defined.\n", __func__);
479-
#else
480-
printf("%s: __NNPA__ is not defined.\n", __func__);
481-
#endif
482-
483479
const uint32_t w = (uint32_t) h << 16;
484480
const uint32_t sign = w & UINT32_C(0x80000000);
485481
const uint32_t two_w = w + w;

0 commit comments

Comments
 (0)