Repository navigation
Conversation
rmuir
reviewed
Oct 26, 2026
| push: | ||
| branches: | ||
| - 'main' | ||
| - 'branch_10x' |
Member
There was a problem hiding this comment.
I don't think we should add 2 github actions jobs to every PR/push build for this. Can we please scope it to only relevant globs
rmuir
reviewed
Oct 26, 2026
| strategy: | ||
| fail-fast: false | ||
| matrix: | ||
| os: [ ubuntu-latest, ubuntu-26.04-arm ] |
Member
There was a problem hiding this comment.
what is the benefit of running these tests on both architectures?
rmuir
reviewed
Oct 26, 2026
| os: [ ubuntu-latest, ubuntu-26.04-arm ] | ||
| runs-on: ${{ matrix.os }} | ||
| # The scalar fixture checks FFM integration without architecture-specific kernels. | ||
| runs-on: ubuntu-latest |
Member
There was a problem hiding this comment.
would use ubuntu-26.04-arm when we don't care. its faster and has significantly less queue time than ubuntu-latest or any of the x86 runners.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
The Java-backed tests in #16795 exercise dispatch and argument/result handling, but cannot detect failures in real library loading, symbol lookup, or the FFM calling convention. This adds the small native-integration follow-up discussed in #15840, based directly on current
mainand the native contract from #16812. It can be reviewed independently of #16795.A scalar C fixture implements six representative functions: byte dot product and cosine, float dot product/distance/cosine, and in-place normalization. The build produces both
lucene_-prefixed and unprefixed variants. Native counters and argument observations verify that calls really reached C, including element counts and the normalization flag. The fixture checks lengths before accessing arrays, so an incorrect length fails a Java assertion instead of reading outside a heap array.Five tests each launch a fresh JVM to cover:
MemorySegmententry points, using heap and off-heap byte segments, empty inputs, and boundary lengths; fractional cosine results and normalization's null-pointer/exception behavior.-Ptests.nativevector.run=truebuilds the fixtures withccon Linux/macOS and enables the tests.-Plucene.tool.cc=<compiler>selects another compiler. Ordinary test runs skip this suite and do not invoke a C compiler. A dedicated workflow runs the integration suite on Linux x86-64. Pull-request and push runs are limited to vectorization code/tests, the native fixtures and C API, and their build/CI dependencies; manual dispatch remains available. The fixture uses scalar C implementations, so CI uses a single architecture.Production Java and C implementations are unchanged. This is an initial real-library test harness, not complete native coverage: the remaining 16 functions, strict-mode success with a complete library, and Windows fixture builds remain follow-up work. Relates to #15840.
Validation
On macOS AArch64, Temurin 25.0.5+8, with Clang:
A6D22205733C9209.lucene.tool.ccset to a nonexistent compiler: 369 tests, 22 skips (the five integration tests are disabled), with no native compilation tasks run.Workflow validation passed after narrowing the path filters and switching to a single Linux runner, including actionlint, zizmor, EditorConfig, and representative path-inclusion/exclusion checks. The full repository test suite has not been run locally.
Review status
Prepared with Codex assistance under the author's direction. This draft is for review of the native-test approach and its CI/build integration.