Skip to content

GH-49921: [C++] Bump xsimd to 14.2.0 - #49922

Merged
raulcd merged 11 commits into
apache:mainfrom
AntoinePrv:main
Jun 3, 2026
Merged

GH-49921: [C++] Bump xsimd to 14.2.0#49922
raulcd merged 11 commits into
apache:mainfrom
AntoinePrv:main

Conversation

@AntoinePrv

@AntoinePrvAntoinePrv commented May 5, 2026

Copy link
Copy Markdown
Collaborator

Rationale for this change

What changes are included in this PR?

Bump version and cleanup backports.

Are these changes tested?

Yes, in CI.

Are there any user-facing changes?

No

@github-actions

Copy link
Copy Markdown

⚠️ GitHub issue #49921has been automatically assigned in GitHub to PR creator.

@AntoinePrvAntoinePrv changed the title GH-49921: [C++] Bunp xsimd to 14.2.0GH-49921: [C++] Bump xsimd to 14.2.0May 5, 2026
@pitrou

Copy link
Copy Markdown
Member

@AntoinePrv Can you take a look at the CI failures? They seem related.

@AntoinePrv

Copy link
Copy Markdown
CollaboratorAuthor

Yes, I am still waiting for the Msys2 build of xsimd to happen...

@pitrou

Copy link
Copy Markdown
Member

@AntoinePrv

AntoinePrv commented May 6, 2026

Copy link
Copy Markdown
CollaboratorAuthor

Perhaps it's this check that does not work on MSVC?

https://github.com/xtensor-stack/xsimd/blob/80c23624ce008d937da7e845e528e82ce0cbf4e0/include/xsimd/types/xsimd_batch_constant.hpp#L500

Either we could add /Zc:__cplusplus or re-introduce the backport.

@pitrou

pitrou commented May 6, 2026

Copy link
Copy Markdown
Member

I think we should both 1) fix xsimd upstream anyway and 2) pass /Zc:__cplusplus when building Arrow C++.

It seems xsimd should do something like this:

#ifdef _MSVC_LANG
#defineXSIMD_CPP_LEVEL _MSVC_LANG
#else
#defineXSIMD_CPP_LEVEL __cplusplus
#endif

and then use the XSIMD_CPP_LEVEL macro everywhere instead of __cplusplus.

(but xsimd could also use find-grained feature testing).

@AntoinePrv

AntoinePrv commented May 6, 2026

Copy link
Copy Markdown
CollaboratorAuthor

Already sending a patch, but not sure I want to go through another round of xsimd releases

xtensor-stack/xsimd#1342

@pitrou

Copy link
Copy Markdown
Member

Agreed, hence "pass /Zc:__cplusplus when building Arrow C++" as well 😉

@pitrou

Copy link
Copy Markdown
Member

Bloody protobuf fails building with /Zc:__cplusplus.
https://github.com/apache/arrow/actions/runs/25429128655/job/74590408553?pr=49922#step:9:2218

@pitroupitrou added the CI: Extra: C++ Run extra C++ CI label May 6, 2026
@pitrou

Copy link
Copy Markdown
Member

Tiny syntax error that needs fixing:

 #17 27.36 Failed to load manifest from directory /arrow/ci/vcpkg
#17 27.36 /arrow/ci/vcpkg/vcpkg.json:24:26: error: Trailing comma in an object
#17 27.36 on expression: "version>=": "14.2",

@AntoinePrv

Copy link
Copy Markdown
CollaboratorAuthor

@pitrou I'm not very proactively working on this until the msys2 xsimd build is live

@github-actionsgithub-actionsBot removed the CI: Extra: C++ Run extra C++ CI label May 6, 2026
@pitrou

Copy link
Copy Markdown
Member

@pitrou I'm not very proactively working on this until the msys2 xsimd build is live

@kou Do you know how we can make that happen?

@pitroupitrou added the CI: Extra: C++ Run extra C++ CI label May 6, 2026
@pitrou

Copy link
Copy Markdown
Member

@github-actions crossbow submit -g cpp

@github-actions

Copy link
Copy Markdown

Revision: 89a1f7e

Submitted crossbow builds: ursacomputing/crossbow @ actions-9c434593fe

TaskStatus
example-cpp-minimal-build-staticGitHub Actions
example-cpp-minimal-build-static-system-dependencyGitHub Actions
example-cpp-tutorialGitHub Actions
test-build-cpp-fuzzGitHub Actions
test-conda-cppGitHub Actions
test-conda-cpp-valgrindGitHub Actions
test-debian-13-cpp-amd64GitHub Actions
test-debian-13-cpp-i386GitHub Actions
test-debian-experimental-cpp-gcc-15GitHub Actions
test-fedora-42-cppGitHub Actions
test-ubuntu-22.04-cppGitHub Actions
test-ubuntu-22.04-cpp-bundledGitHub Actions
test-ubuntu-22.04-cpp-emscriptenGitHub Actions
test-ubuntu-22.04-cpp-no-threadingGitHub Actions
test-ubuntu-24.04-cppGitHub Actions
test-ubuntu-24.04-cpp-bundled-offlineGitHub Actions
test-ubuntu-24.04-cpp-gcc-13-bundledGitHub Actions
test-ubuntu-24.04-cpp-gcc-14GitHub Actions
test-ubuntu-24.04-cpp-minimal-with-formatsGitHub Actions
test-ubuntu-24.04-cpp-thread-sanitizerGitHub Actions

@raulcd

Copy link
Copy Markdown
Member

Do you know how we can make that happen?

It's just a matter of waiting for their queue to update it:
https://packages.msys2.org/queue

Based on experience when uploading Arrow it takes between 6 and 12 hours. Their CI seems to run several times a day and xsimd is already listed on the queue so it should be available "soon".

@github-actionsgithub-actionsBot removed the CI: Extra: C++ Run extra C++ CI label May 6, 2026
@pitroupitrou added the CI: Extra: C++ Run extra C++ CI label May 7, 2026
@github-actionsgithub-actionsBot added the awaiting merge Awaiting merge label Jun 2, 2026

@raulcdraulcd left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Sorry, just thought about this, I am happy to merge as is.
Are we planning to bump this requirement later on when we improve the cpu detection feature?

resolve_dependency(xsimd
FORCE_ANY_NEWER_VERSION
TRUE
IS_RUNTIME_DEPENDENCY
FALSE
REQUIRED_VERSION
"14.0.0")

@github-actionsgithub-actionsBot added awaiting changes Awaiting changes and removed awaiting merge Awaiting merge labels Jun 2, 2026
@github-actionsgithub-actionsBot added awaiting change review Awaiting change review and removed CI: Extra: C++ Run extra C++ CI CI: Extra: Package: Linux Run extra Linux Packages CI awaiting changes Awaiting changes labels Jun 2, 2026
@raulcd

Copy link
Copy Markdown
Member

@github-actions crossbow submit wheelcp314

@raulcdraulcd added the CI: Extra: Package: Linux Run extra Linux Packages CI label Jun 2, 2026
@github-actions

Copy link
Copy Markdown

Revision: 8278222

Submitted crossbow builds: ursacomputing/crossbow @ actions-0d5b743af7

TaskStatus
wheel-macos-monterey-cp314-cp314-amd64GitHub Actions
wheel-macos-monterey-cp314-cp314-arm64GitHub Actions
wheel-macos-monterey-cp314-cp314t-amd64GitHub Actions
wheel-macos-monterey-cp314-cp314t-arm64GitHub Actions
wheel-manylinux-2-28-cp314-cp314-amd64GitHub Actions
wheel-manylinux-2-28-cp314-cp314-arm64GitHub Actions
wheel-manylinux-2-28-cp314-cp314t-amd64GitHub Actions
wheel-manylinux-2-28-cp314-cp314t-arm64GitHub Actions
wheel-musllinux-1-2-cp314-cp314-amd64GitHub Actions
wheel-musllinux-1-2-cp314-cp314-arm64GitHub Actions
wheel-musllinux-1-2-cp314-cp314t-amd64GitHub Actions
wheel-musllinux-1-2-cp314-cp314t-arm64GitHub Actions
wheel-windows-cp314-cp314-amd64GitHub Actions
wheel-windows-cp314-cp314t-amd64GitHub Actions

@raulcd

Copy link
Copy Markdown
Member

The C GLib & Ruby failure on Windows is related. I think we also have to update the vcpkg.json baseline version here:

"builtin-baseline": "40c89449f0ccce12d21f8a906639f6c2c649b9e7"

and here:
"builtin-baseline": "40c89449f0ccce12d21f8a906639f6c2c649b9e7"

We should update to the same one we have on .env (9b965a116838c6cdcd36bca60d1b81b030c8ab8d), sorry I did not realised about that. Can you give that a quick try. If it fails due to any other build failure, I'll try to bump it on isolation and fix any possible CI issue.

CopilotAI review requested due to automatic review settings June 3, 2026 07:26

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 6 out of 6 changed files in this pull request and generated 2 comments.

Comment threadcpp/src/arrow/util/bpacking_simd_kernel_internal.h
Comment threadcpp/src/arrow/util/bpacking_simd_kernel_internal.h
@github-actionsgithub-actionsBot added Component: GLib and removed CI: Extra: Package: Linux Run extra Linux Packages CI labels Jun 3, 2026
@raulcdraulcd added CI: Extra: C++ Run extra C++ CI CI: Extra: Package: Linux Run extra Linux Packages CI labels Jun 3, 2026

@raulcdraulcd left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

ok, the latest fixed the CI failure. Current CI failures are unrelated, there's still some CI jobs finishing but if no surprises, I'll merge once they finish

@github-actionsgithub-actionsBot added awaiting merge Awaiting merge and removed awaiting change review Awaiting change review labels Jun 3, 2026
@AntoinePrv

Copy link
Copy Markdown
CollaboratorAuthor

Thanks @raulcd ! Looks like this is ready now

@raulcd
raulcd merged commit a10f254 into apache:mainJun 3, 2026
138 of 155 checks passed
@raulcdraulcd removed the awaiting merge Awaiting merge label Jun 3, 2026
@raulcdraulcd mentioned this pull request Jun 3, 2026
@raulcd

Copy link
Copy Markdown
Member

Merged! Thanks @AntoinePrv for following it up!

@conbench-apache-arrow

Copy link
Copy Markdown

After merging your PR, Conbench analyzed the 4 benchmarking runs that have been run so far on merge-commit a10f254.

There were no benchmark performance regressions. 🎉

The full Conbench report has more details. It also includes information about 107 possible false positives for unstable benchmarks that are known to sometimes produce them.

pitrou pushed a commit that referenced this pull request Jun 10, 2026
### Rationale for this change
Use xsimd cpu feature instead of maitaining them here.
Stacked on GH-49922.
Should also handle issue from GH-30368.
### What changes are included in this PR?
- Use xsimd for CPu feature detection, cache sizes are still using the same implementation
- We are loosing CPU model name (which was unused)
- Simplify CpuInfo (remove Pimpl pattern)
### Are these changes tested?
in CI
### Are there any user-facing changes?
No
* GitHub Issue: #45331
Authored-by: AntoinePrv <AntoinePrv@users.noreply.github.com>
Signed-off-by: Antoine Pitrou <antoine@python.org>
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CI: Extra: C++Run extra C++ CICI: Extra: Package: LinuxRun extra Linux Packages CICI: Extra: RRun extra R CIComponent: C++Component: GLib

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants

@AntoinePrv@pitrou@raulcd@kou