From cfef47f243f3f1f6f8e969c654cfc7e40b8e2624 Mon Sep 17 00:00:00 2001 From: Uwe Schindler Date: Sat, 28 Oct 2023 23:24:53 +0200 Subject: [PATCH] Log FMA usage --- .../lucene/internal/vectorization/PanamaVectorUtilSupport.java | 2 +- .../internal/vectorization/PanamaVectorizationProvider.java | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/lucene/core/src/java20/org/apache/lucene/internal/vectorization/PanamaVectorUtilSupport.java b/lucene/core/src/java20/org/apache/lucene/internal/vectorization/PanamaVectorUtilSupport.java index b54136b69fa..5b382c4c7c2 100644 --- a/lucene/core/src/java20/org/apache/lucene/internal/vectorization/PanamaVectorUtilSupport.java +++ b/lucene/core/src/java20/org/apache/lucene/internal/vectorization/PanamaVectorUtilSupport.java @@ -107,7 +107,7 @@ final class PanamaVectorUtilSupport implements VectorUtilSupport { } // true if we know FMA is supported, to deliver less error - private static final boolean HAS_FAST_FMA = hasFastFMA(); + static final boolean HAS_FAST_FMA = hasFastFMA(); // the way FMA should work! if available use it, otherwise fall back to mul/add private static FloatVector fma(FloatVector a, FloatVector b, FloatVector c) { diff --git a/lucene/core/src/java20/org/apache/lucene/internal/vectorization/PanamaVectorizationProvider.java b/lucene/core/src/java20/org/apache/lucene/internal/vectorization/PanamaVectorizationProvider.java index b47bf802097..fc303a687a0 100644 --- a/lucene/core/src/java20/org/apache/lucene/internal/vectorization/PanamaVectorizationProvider.java +++ b/lucene/core/src/java20/org/apache/lucene/internal/vectorization/PanamaVectorizationProvider.java @@ -60,8 +60,9 @@ final class PanamaVectorizationProvider extends VectorizationProvider { log.info( String.format( Locale.ENGLISH, - "Java vector incubator API enabled; uses preferredBitSize=%d%s", + "Java vector incubator API enabled; uses preferredBitSize=%d%s%s", PanamaVectorUtilSupport.VECTOR_BITSIZE, + PanamaVectorUtilSupport.HAS_FAST_FMA ? "; FMA enabled" : "", PanamaVectorUtilSupport.HAS_FAST_INTEGER_VECTORS ? "" : "; floating-point vectors only"));