[
https://issues.apache.org/jira/browse/ARROW-15678?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17542244#comment-17542244
]
Antoine Pitrou edited comment on ARROW-15678 at 6/10/22 3:04 PM:
-----------------------------------------------------------------
On further investigation, we can include immintrin.h with or without -mavx2 and
clang at least will not complain unless the intrinsics are referenced, so
{code}
#include <immintrin.h>
[[gnu::target("avx2")]]
void use_simd() {
__m256i arg;
_mm256_abs_epi16 (arg);
}
int main() { use_simd(); }
{code}
compiles and runs happily without any special compilation flags. Using an
attribute like this seems viable provided we can be certain that the modified
target isn't transitively applied to functions which might be invoked for the
first time inside a SIMD enabled function
was (Author: bkietz):
On further investigation, we can include immintrin.h with or without -mavx2 and
clang at least will not complain unless the intrinsics are referenced, so
{{code}}
#include <immintrin.h>
[[gnu::target("avx2")]]
void use_simd() {
__m256i arg;
_mm256_abs_epi16 (arg);
}
int main() { use_simd(); }
{{code}}
compiles and runs happily without any special compilation flags. Using an
attribute like this seems viable provided we can be certain that the modified
target isn't transitively applied to functions which might be invoked for the
first time inside a SIMD enabled function
> [C++][CI] a crossbow job with MinRelSize enabled
> ------------------------------------------------
>
> Key: ARROW-15678
> URL: https://issues.apache.org/jira/browse/ARROW-15678
> Project: Apache Arrow
> Issue Type: Improvement
> Components: C++, Continuous Integration
> Reporter: Jonathan Keane
> Priority: Blocker
> Labels: pull-request-available
> Fix For: 9.0.0
>
> Time Spent: 13h
> Remaining Estimate: 0h
>
--
This message was sent by Atlassian Jira
(v8.20.7#820007)