diff --git a/src/ggml-impl.h b/src/ggml-impl.h
index 3965be787..ed8abe1f1 100644
--- a/src/ggml-impl.h
+++ b/src/ggml-impl.h
@@ -14,7 +14,7 @@
 #include <arm_sve.h>
 #endif // __ARM_FEATURE_SVE
 
-#if defined(__ARM_NEON)
+#if defined(__ARM_NEON) && !(defined(__NVCC__) && defined(__CUDACC__))
 // if YCM cannot find <arm_neon.h>, make a symbolic link to it, for example:
 //
 //   $ ln -sfn /Library/Developer/CommandLineTools/usr/lib/clang/13.1.6/include/arm_neon.h ./src/