diff --git a/ggml.h b/ggml.h index 544ad2d11..0ec7ec5bf 100644 --- a/ggml.h +++ b/ggml.h @@ -259,8 +259,9 @@ extern "C" { #endif -#ifdef __ARM_NEON - // we use the built-in 16-bit float type +#if defined(__ARM_NEON) && defined(__CUDACC__) + typedef half ggml_fp16_t; +#elif defined(__ARM_NEON) typedef __fp16 ggml_fp16_t; #else typedef uint16_t ggml_fp16_t;