Skip to content

Commit d85170b

Browse files
committed
ggml-impl.h: Fix build issues on AArch64 with CUDA version 12
Fix ggml-org#12732: * Remove incorrect inclusion of "arm_neon.h" for CUDA versions ≥ 12
1 parent fe5b78c commit d85170b

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

ggml/src/ggml-impl.h

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -301,6 +301,14 @@ struct ggml_cgraph ggml_graph_view(struct ggml_cgraph * cgraph, int i0, int i1);
301301
GGML_API void * ggml_aligned_malloc(size_t size);
302302
GGML_API void ggml_aligned_free(void * ptr, size_t size);
303303

304+
#if defined(__ARM_NEON) && !defined(__CUDACC__) && !defined(__MUSACC__)
305+
// if YCM cannot find <arm_neon.h>, make a symbolic link to it, for example:
306+
//
307+
// $ ln -sfn /Library/Developer/CommandLineTools/usr/lib/clang/13.1.6/include/arm_neon.h ./src/
308+
//
309+
#include <arm_neon.h>
310+
#endif
311+
304312
// FP16 to FP32 conversion
305313

306314
// 16-bit float
@@ -312,12 +320,6 @@ GGML_API void ggml_aligned_free(void * ptr, size_t size);
312320
//
313321
#if defined(__ARM_NEON) && !(defined(__CUDACC__) && __CUDACC_VER_MAJOR__ <= 11) && !defined(__MUSACC__)
314322

315-
// if YCM cannot find <arm_neon.h>, make a symbolic link to it, for example:
316-
//
317-
// $ ln -sfn /Library/Developer/CommandLineTools/usr/lib/clang/13.1.6/include/arm_neon.h ./src/
318-
//
319-
#include <arm_neon.h>
320-
321323
#define GGML_COMPUTE_FP16_TO_FP32(x) ggml_compute_fp16_to_fp32(x)
322324
#define GGML_COMPUTE_FP32_TO_FP16(x) ggml_compute_fp32_to_fp16(x)
323325

0 commit comments

Comments
 (0)