Skip to content

Use templates for native arm and x64 f32 methods#143684

Merged
thecoop merged 6 commits intoelastic:mainfrom
thecoop:native-f32-templates
Mar 6, 2026
Merged

Use templates for native arm and x64 f32 methods#143684
thecoop merged 6 commits intoelastic:mainfrom
thecoop:native-f32-templates

Conversation

@thecoop
Copy link
Copy Markdown
Member

@thecoop thecoop commented Mar 5, 2026

Template bulk and single float32 methods

@elasticsearchmachine
Copy link
Copy Markdown
Collaborator

Pinging @elastic/es-search-relevance (Team:Search Relevance)

@elasticsearchmachine elasticsearchmachine added v9.4.0 Team:Search Relevance Meta label for the Search Relevance team in Elasticsearch labels Mar 5, 2026
Copy link
Copy Markdown
Contributor

@ldematte ldematte left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great! One idea, but they can be for a follow up: the scalar ops (vec_dotf32 and vec_sqrf32) are also basically identical but for the vector and scalar ops. Maybe we can templatize them too?

And one further idea, this one definitely for a follow up: what if we "reverse" things a bit? If we templatize the scalar ops too, the only thing that will remain platform specific will be the vector functions (e.g. sqrf32_vector) and the templates (e.g. call_f32_bulk); all the definitions/exports could be common.

@thecoop thecoop added the test-arm Pull Requests that should be tested against arm agents label Mar 5, 2026
Copy link
Copy Markdown
Contributor

@ldematte ldematte left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Still LGTM.
I'm happy when you are happy there is no regression (benchmarks/tests)

@ldematte ldematte requested a review from a team as a code owner March 5, 2026 17:02
@thecoop thecoop merged commit e13dfbe into elastic:main Mar 6, 2026
40 of 41 checks passed
@thecoop thecoop deleted the native-f32-templates branch March 6, 2026 08:57
spinscale pushed a commit to spinscale/elasticsearch that referenced this pull request Mar 6, 2026
sidosera pushed a commit to sidosera/elasticsearch that referenced this pull request Mar 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

>refactoring :Search Relevance/Vectors Vector search Team:Search Relevance Meta label for the Search Relevance team in Elasticsearch test-arm Pull Requests that should be tested against arm agents v9.4.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants