AI-backed analysis insists this is an permissible floating point
computation difference between different jvm compilation levels. It wrote a
test that has an
allowed epsilon difference but it's so ugly that I won't present it here.
The problem remains though, quote:

"The test compares bytes that depend on a Vector API floating-point
reduction, and the JDK does not guarantee that reduction is stable within
one JVM.

The .vemq body for field v lays out fixed ints, a few vints, then the
64-float centroid at bytes 18 to 273, then the centroid dot product [...]
The writer computes the stored value with VectorUtil.dotProduct on that
identical centroid at Lucene104ScalarQuantizedVectorsWriter.java:381,
and the two calls returned results two ULPs apart.

The Panama dot product ends with a reduceLanes(ADD). The JDK javadoc for
FloatVector.reduceLanes says that for
ADD the result "will reflect the choice of an arbitrary order of
operations, which may even vary over time." Concretely, the Java fallback
used by the
interpreter and C1 folds lanes sequentially, while the C2 intrinsic uses a
horizontal tree reduction.

Confirmation. A standalone program that reduces the same 64-float vector
200,000 times on JDK 25 with 256-bit species yields two distinct results.
The value
flips at iteration 4472, which is when C2 takes over."

On Fri, Sep 25, 2026 at 9:46 PM Policeman Jenkins Server via builds <
[email protected]> wrote:

> Build: https://jenkins.thetaphi.de/job/Lucene-main-Windows/20875/
> Java: 64bit/hotspot/jdk-25.0.4 -XX:+UseCompressedOops -XX:+UseG1GC
>
> 1 tests failed.
> FAILED:
> org.apache.lucene.codecs.lucene104.TestLucene104ScalarQuantizedMergeScorer.testGraphIsIdenticalToTheReaderFallback
>
> Error Message:
> org.junit.internal.ArrayComparisonFailure: the body of the merged .vemq
> file, header and footer aside, differs for
> SINGLE_BIT_QUERY_NIBBLE/DOT_PRODUCT: arrays first differed at element
> [274]; expected:<72> but was:<74>
>
> Stack Trace:
> the body of the merged .vemq file, header and footer aside, differs for
> SINGLE_BIT_QUERY_NIBBLE/DOT_PRODUCT: arrays first differed at element
> [274]; expected:<72> but was:<74>
>         at
> __randomizedtesting.SeedInfo.seed([9DF6B06B0789DE44:780FC4F7790BB5E1]:0)
>         at
> org.junit.internal.ComparisonCriteria.arrayEquals(ComparisonCriteria.java:78)
>         at
> org.junit.internal.ComparisonCriteria.arrayEquals(ComparisonCriteria.java:28)
>         at org.junit.Assert.internalArrayEquals(Assert.java:534)
>         at org.junit.Assert.assertArrayEquals(Assert.java:343)
>         at
> org.apache.lucene.codecs.lucene104.TestLucene104ScalarQuantizedMergeScorer.assertBothPathsWriteTheSameFiles(TestLucene104ScalarQuantizedMergeScorer.java:259)
>         at
> org.apache.lucene.codecs.lucene104.TestLucene104ScalarQuantizedMergeScorer.testGraphIsIdenticalToTheReaderFallback(TestLucene104ScalarQuantizedMergeScorer.java:212)
> Caused by: java.lang.AssertionError: expected:<72> but was:<74>
>         at org.junit.Assert.fail(Assert.java:89)
>         at org.junit.Assert.failNotEquals(Assert.java:835)
>         at org.junit.Assert.assertEquals(Assert.java:120)
>         at org.junit.Assert.assertEquals(Assert.java:146)
>         at
> org.junit.internal.ExactComparisonCriteria.assertElementsEqual(ExactComparisonCriteria.java:8)
>         at
> org.junit.internal.ComparisonCriteria.arrayEquals(ComparisonCriteria.java:76)
>         ... 5 more
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]

Reply via email to