Skip to content

[cpp] add version detection for highway#288

Merged
immanuelazn merged 5 commits intomainfrom
ia/highway-dependency-configure-fix
Jul 21, 2025
Merged

[cpp] add version detection for highway#288
immanuelazn merged 5 commits intomainfrom
ia/highway-dependency-configure-fix

Conversation

@immanuelazn
Copy link
Copy Markdown
Collaborator

Background

We use a package named highway, which helps with added efficiency in automatically choosing the best CPU intrinsics for vectorization based on your architecture.

Previously, there was a previous bug during compilation, which did not allow BPCells to utilize Highway if it was already installed. This was fixed. However, I suspect that if you have an older version of highway, installation would fail, and would not fall back to our packaged version of highway. We can see this in #285, where BroadcastLane, which is part of highway is not being detected.

Fix

I made some general improvements to configure for highway, in both the logging and the detection.
I added some version detection within hwy-test.cpp, which is version templated through hwy-test.cpp.in. I also added a fallback to using pkg-config found libraries, if the first compilation try fails. There is also some additional clarity on whether the compilation fails because of versioning, or from failing to compile for a different reason.

Fixes #285

@immanuelazn immanuelazn marked this pull request as ready for review July 21, 2025 19:21
@immanuelazn immanuelazn merged commit f0ad427 into main Jul 21, 2025
4 checks passed
@immanuelazn immanuelazn deleted the ia/highway-dependency-configure-fix branch August 6, 2025 22:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Plausible missing files for instalation - from recent version?

1 participant