Skip to content

Commit 1e3bc52

Browse files
authored
ggml : support CUDA's half type for aarch64(#1455) (#2670)
* ggml: support CUDA's half type for aarch64(#1455) support CUDA's half type for aarch64 in ggml_fp16_t definition * ggml: use __CUDACC__ to recognise nvcc compiler
1 parent 14b1d7e commit 1e3bc52

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

ggml.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -259,8 +259,9 @@
259259
extern "C" {
260260
#endif
261261

262-
#ifdef __ARM_NEON
263-
// we use the built-in 16-bit float type
262+
#if defined(__ARM_NEON) && defined(__CUDACC__)
263+
typedef half ggml_fp16_t;
264+
#elif defined(__ARM_NEON)
264265
typedef __fp16 ggml_fp16_t;
265266
#else
266267
typedef uint16_t ggml_fp16_t;

0 commit comments

Comments
 (0)