You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by "WillAyd (via GitHub)" <gi...@apache.org> on 2025/04/16 20:16:57 UTC
[PR] GH-46172: [C++] Add SIMD support in Meson configuration [arrow]
WillAyd opened a new pull request, #46173:
URL: https://github.com/apache/arrow/pull/46173
### Rationale for this change
This gets the Meson configuration closer to feature parity with CMake
### What changes are included in this PR?
Adds SIMD support to the top level arrow library
### Are these changes tested?
Yes
### Are there any user-facing changes?
No
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] GH-46172: [C++] Add SIMD support in Meson configuration [arrow]
Posted by "WillAyd (via GitHub)" <gi...@apache.org>.
WillAyd closed pull request #46173: GH-46172: [C++] Add SIMD support in Meson configuration
URL: https://github.com/apache/arrow/pull/46173
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] GH-46172: [C++] Add SIMD support in Meson configuration [arrow]
Posted by "WillAyd (via GitHub)" <gi...@apache.org>.
WillAyd commented on code in PR #46173:
URL: https://github.com/apache/arrow/pull/46173#discussion_r2055964634
##########
cpp/src/arrow/meson.build:
##########
@@ -227,6 +230,26 @@ arrow_testing_srcs = [
'testing/util.cc',
]
+simd = import('unstable-simd')
+rval = simd.check(
+ 'simd-modules',
+ avx2: 'util/bpacking_avx2.cc',
+ # TODO: Meson has not yet implemented avx512
+ #avx512: 'util/bpacking_avx512.cc',
+ neon: 'util/bpacking_neon.cc',
+ compiler: cpp_compiler,
+ include_directories: arrow_includes,
+)
+simd_libraries = rval[0]
+simd_configuration = rval[1]
+arrow_simd_defines = []
+
+if simd_configuration.has('HAVE_AVX2')
+ arrow_simd_defines += ['-DARROW_HAVE_RUNTIME_AVX2']
Review Comment:
Ah my mistake - I didn't realize we had both `ARROW_HAVE_AVX2` and `ARROW_HAVE_RUNTIME_AVX2`; I am pretty new to SIMD so that distinction isn't yet clear to me, but yes we can go ahead and add.
It's also worth noting that the Meson SIMD check adds defines like` HAVE_AVX2` through this object when that instruction set is supported. Not something we would change the mainline code for today, but in the long run that might help us simplify the macro usage
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] GH-46172: [C++] Add SIMD support in Meson configuration [arrow]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #46173:
URL: https://github.com/apache/arrow/pull/46173#issuecomment-2810664375
:warning: GitHub issue #46172 **has been automatically assigned in GitHub** to PR creator.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] GH-46172: [C++] Add SIMD support in Meson configuration [arrow]
Posted by "WillAyd (via GitHub)" <gi...@apache.org>.
WillAyd commented on PR #46173:
URL: https://github.com/apache/arrow/pull/46173#issuecomment-2810666762
Note that there are also SIMD modules to be used in the compute and acero directories, but those are not in main yet
I noticed that the CSV module also uses some macros around SSE4 and Neon detection, but does not use the separate module approach that is used here (see arrow/csv/lexing_internal.h). I have not looked into that too deeply; it may require a refactor to work nicely with Meson's SIMD assumptions
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] GH-46172: [C++] Add SIMD support in Meson configuration [arrow]
Posted by "kou (via GitHub)" <gi...@apache.org>.
kou commented on code in PR #46173:
URL: https://github.com/apache/arrow/pull/46173#discussion_r2055429262
##########
cpp/src/arrow/meson.build:
##########
@@ -227,6 +230,26 @@ arrow_testing_srcs = [
'testing/util.cc',
]
+simd = import('unstable-simd')
+rval = simd.check(
Review Comment:
Can we use better variable name than `rval`?
##########
cpp/src/arrow/meson.build:
##########
@@ -227,6 +230,26 @@ arrow_testing_srcs = [
'testing/util.cc',
]
+simd = import('unstable-simd')
+rval = simd.check(
+ 'simd-modules',
+ avx2: 'util/bpacking_avx2.cc',
+ # TODO: Meson has not yet implemented avx512
+ #avx512: 'util/bpacking_avx512.cc',
+ neon: 'util/bpacking_neon.cc',
+ compiler: cpp_compiler,
+ include_directories: arrow_includes,
+)
+simd_libraries = rval[0]
+simd_configuration = rval[1]
+arrow_simd_defines = []
+
+if simd_configuration.has('HAVE_AVX2')
+ arrow_simd_defines += ['-DARROW_HAVE_RUNTIME_AVX2']
Review Comment:
Do we need to define `ARROW_HAVE_AVX2` ,`ARROW_HAVE_SSE4_2` and so on?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] GH-46172: [C++] Add SIMD support in Meson configuration [arrow]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #46173:
URL: https://github.com/apache/arrow/pull/46173#issuecomment-2821924839
Revision: 607154b6445c6405be01360b8af86fae1697d94e
Submitted crossbow builds: [ursacomputing/crossbow @ actions-830ec7104c](https://github.com/ursacomputing/crossbow/branches/all?query=actions-830ec7104c)
|Task|Status|
|----|------|
|test-conda-cpp-meson|[](https://github.com/ursacomputing/crossbow/actions/runs/14600251241/job/40956386952)|
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] GH-46172: [C++] Add SIMD support in Meson configuration [arrow]
Posted by "WillAyd (via GitHub)" <gi...@apache.org>.
WillAyd commented on PR #46173:
URL: https://github.com/apache/arrow/pull/46173#issuecomment-2821919569
@github-actions crossbow submit *meson
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] GH-46172: [C++] Add SIMD support in Meson configuration [arrow]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #46173:
URL: https://github.com/apache/arrow/pull/46173#issuecomment-4312838075
Thank you for your contribution. Unfortunately, this pull request has been marked as stale because it has had no activity in the past 365 days. Please remove the stale label or comment below, or this PR will be closed in 14 days. Feel free to re-open this if it has been closed in error. If you do not have repository permissions to reopen the PR, please tag a maintainer.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org