rmuir commented on code in PR #13572: URL: https://github.com/apache/lucene/pull/13572#discussion_r1697452900
########## lucene/core/src/c/dotProduct.c: ########## @@ -0,0 +1,143 @@ +// dotProduct.c + +#include <stdio.h> +#include <arm_neon.h> + +#ifdef __ARM_ACLE +#include <arm_acle.h> +#endif + +#if (defined(__ARM_FEATURE_SVE) && !defined(__APPLE__)) +#include <arm_sve.h> +/* + * Unrolled and vectorized int8 dotProduct implementation using SVE instructions + * NOTE: Clang 15.0 compiler on Apple M3 Max compiles the code below sucessfully + * with '-march=native+sve' option but throws "Illegal Hardware Instruction" error + * Looks like Apple M3 does not implement SVE and Apple's official documentation + * is not explicit about this or at least I could not find it. + * + */ Review Comment: I think we should remove the ifdef, this does not happen with `-march=native`, correct? The problem is only you try to "force" SVE? afaik, M3 doesnt support it and so `-march=native` should automatically take the neon path. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org For additional commands, e-mail: issues-h...@lucene.apache.org