Skip to content

Commit 8a25bd4

Browse files
committed
ggml: support CUDA's half type for aarch64(#1455)
support CUDA's half type for aarch64 in ggml_fp16_t definition
1 parent 1f0bccb commit 8a25bd4

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

ggml.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -255,9 +255,11 @@
255255
extern "C" {
256256
#endif
257257

258-
#ifdef __ARM_NEON
258+
#if defined(__ARM_NEON) && !defined(GGML_CUDA_F16)
259259
// we use the built-in 16-bit float type
260260
typedef __fp16 ggml_fp16_t;
261+
#elif defined(GGML_CUDA_F16)
262+
typedef half ggml_fp16_t;
261263
#else
262264
typedef uint16_t ggml_fp16_t;
263265
#endif

0 commit comments

Comments
 (0)