File tree Expand file tree Collapse file tree 2 files changed +8
-2
lines changed
native/src/main/java/org/elasticsearch/nativeaccess/jdk Expand file tree Collapse file tree 2 files changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -41,7 +41,7 @@ public final class JdkVectorLibrary implements VectorLibrary {
4141 try {
4242 int caps = (int ) vecCaps$mh .invokeExact ();
4343 logger .info ("vec_caps=" + caps );
44- if (caps != 0 ) {
44+ if (caps > 0 ) {
4545 if (caps == 2 ) {
4646 dot7u$mh = downcallHandle (
4747 "dot7u_2" ,
@@ -67,6 +67,12 @@ public final class JdkVectorLibrary implements VectorLibrary {
6767 }
6868 INSTANCE = new JdkVectorSimilarityFunctions ();
6969 } else {
70+ if (caps < 0 ) {
71+ logger .warn ("""
72+ Your CPU supports vector capabilities, but they are disabled at OS level. For optimal performance, enable them in \
73+ your OS/Hypervisor/VM/container
74+ """ );
75+ }
7076 dot7u$mh = null ;
7177 sqr7u$mh = null ;
7278 INSTANCE = null ;
Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ apply plugin: 'cpp'
1111
1212var os = org.gradle.internal.os.OperatingSystem . current()
1313
14- // To update this library run publish_vec_binaries.sh ( or ./gradlew vecSharedLibrary )
14+ // To update this library run publish_vec_binaries.sh ( or ./gradlew buildSharedLibrary )
1515// Or
1616// For local development, build the docker image with:
1717// docker build --platform linux/arm64 --progress=plain --file=Dockerfile.aarch64 . (for aarch64)
You can’t perform that action at this time.
0 commit comments