Skip to content

Use templates for native arm and x64 f32 methods#143684

Open
thecoop wants to merge 6 commits intoelastic:mainfrom
thecoop:native-f32-templates
Open

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

Conversation

@thecoop
Copy link
Member

@thecoop thecoop commented Mar 5, 2026

Template bulk and single float32 methods

@elasticsearchmachine
Copy link
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
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
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
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