Skip to content

Fix for AVX10_2 target with Android NDK r29-beta3#2695

Merged
copybara-service[bot] merged 1 commit into
google:masterfrom
johnplatts:hwy_ndk_avx10_2_fix_083125
Sep 1, 2025
Merged

Fix for AVX10_2 target with Android NDK r29-beta3#2695
copybara-service[bot] merged 1 commit into
google:masterfrom
johnplatts:hwy_ndk_avx10_2_fix_083125

Conversation

@johnplatts

Copy link
Copy Markdown
Contributor

Resolves issue #2694.

Android NDK r29-beta3 uses a pre-release version of Clang 21 that does not include the updates made to avx10_2satcvtdsintrin.h and avx10_2_512convertintrin.h that was made in pull request llvm/llvm-project#131592 for Clang 21 and later (and backported to Clang 20.1.x in pull request llvm/llvm-project#135549 that made its way into Clang 20.1.3).

@jan-wassenberg jan-wassenberg 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.

Thanks @johnplatts !

@copybara-service copybara-service Bot merged commit 047980a into google:master Sep 1, 2025
36 checks passed
@BillyONeal

Copy link
Copy Markdown

Instead of disabling that shouldn't the typo just be fixed? The comment after it says _mm256_cvttpd_epu32...

BillyONeal added a commit to BillyONeal/highway that referenced this pull request Feb 23, 2026
Resolves the following compiler errors. Related: google#2695

Note that for each of these intrinsics, the new name matches the name in the comment a few lines later and the name suggested by clang.

```console
/android-ndk-r29/toolchains/llvm/prebuilt/linux-x86_64/bin/clang++ --target=x86_64-none-linux-android28 --sysroot=/android-ndk-r29/toolchains/llvm/prebuilt/linux-x86_64/sysroot -DHWY_STATIC_DEFINE -DTOOLCHAIN_MISS_ASM_HWCAP_H -I/mnt/vcpkg-ci/b/highway/src/1.3.0-d8ef17a685.clean -g -DANDROID -fdata-sections -ffunction-sections -funwind-tables -fstack-protector-strong -no-canonical-prefixes -D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security -frtti -fexceptions  -fPIC   -fno-limit-debug-info    -std=c++17 -fPIC -fvisibility=hidden -fvisibility-inlines-hidden -Wno-builtin-macro-redefined -D__DATE__=\"redacted\" -D__TIMESTAMP__=\"redacted\" -D__TIME__=\"redacted\" -fmerge-all-constants -Wall -Wextra -Wconversion -Wsign-conversion -Wvla -Wnon-virtual-dtor -Wcast-align -Wfloat-overflow-conversion -Wfloat-zero-conversion -Wfor-loop-analysis -Wgnu-redeclared-enum -Winfinite-recursion -Wself-assign -Wstring-conversion -Wtautological-overlap-compare -Wthread-safety-analysis -Wundefined-func-template -fno-cxx-exceptions -fno-slp-vectorize -fno-vectorize -fdiagnostics-show-option -fcolor-diagnostics -Wc++2a-extensions -fmath-errno -fno-exceptions -Wno-psabi -MD -MT CMakeFiles/hwy.dir/hwy/per_target.cc.o -MF CMakeFiles/hwy.dir/hwy/per_target.cc.o.d -o CMakeFiles/hwy.dir/hwy/per_target.cc.o -c /mnt/vcpkg-ci/b/highway/src/1.3.0-d8ef17a685.clean/hwy/per_target.cc
In file included from /mnt/vcpkg-ci/b/highway/src/1.3.0-d8ef17a685.clean/hwy/per_target.cc:27:
In file included from /mnt/vcpkg-ci/b/highway/src/1.3.0-d8ef17a685.clean/hwy/foreach_target.h:149:
In file included from /mnt/vcpkg-ci/b/highway/src/1.3.0-d8ef17a685.clean/hwy/per_target.cc:28:
In file included from /mnt/vcpkg-ci/b/highway/src/1.3.0-d8ef17a685.clean/hwy/highway.h:688:
In file included from /mnt/vcpkg-ci/b/highway/src/1.3.0-d8ef17a685.clean/hwy/ops/x86_avx3-inl.h:20:
In file included from /mnt/vcpkg-ci/b/highway/src/1.3.0-d8ef17a685.clean/hwy/ops/x86_512-inl.h:84:
/mnt/vcpkg-ci/b/highway/src/1.3.0-d8ef17a685.clean/hwy/ops/x86_256-inl.h:6922:20: error: use of undeclared identifier '_mm256_cvtts_pd_epi32'; did you mean '_mm256_cvttspd_epi32'?
 6922 |   return VFromD<D>{_mm256_cvtts_pd_epi32(v.raw)};
      |                    ^~~~~~~~~~~~~~~~~~~~~
      |                    _mm256_cvttspd_epi32
/android-ndk-r29/toolchains/llvm/prebuilt/linux-x86_64/lib/clang/21/include/avx10_2satcvtdsintrin.h:93:1: note: '_mm256_cvttspd_epi32' declared here
   93 | _mm256_cvttspd_epi32(__m256d __A) {
      | ^
In file included from /mnt/vcpkg-ci/b/highway/src/1.3.0-d8ef17a685.clean/hwy/per_target.cc:27:
In file included from /mnt/vcpkg-ci/b/highway/src/1.3.0-d8ef17a685.clean/hwy/foreach_target.h:149:
In file included from /mnt/vcpkg-ci/b/highway/src/1.3.0-d8ef17a685.clean/hwy/per_target.cc:28:
In file included from /mnt/vcpkg-ci/b/highway/src/1.3.0-d8ef17a685.clean/hwy/highway.h:688:
In file included from /mnt/vcpkg-ci/b/highway/src/1.3.0-d8ef17a685.clean/hwy/ops/x86_avx3-inl.h:20:
In file included from /mnt/vcpkg-ci/b/highway/src/1.3.0-d8ef17a685.clean/hwy/ops/x86_512-inl.h:84:
/mnt/vcpkg-ci/b/highway/src/1.3.0-d8ef17a685.clean/hwy/ops/x86_256-inl.h:6954:20: error: use of undeclared identifier '_mm256_cvtts_pd_epu32'; did you mean '_mm256_cvttspd_epu32'?
 6954 |   return VFromD<D>{_mm256_cvtts_pd_epu32(v.raw)};
      |                    ^~~~~~~~~~~~~~~~~~~~~
      |                    _mm256_cvttspd_epu32
/android-ndk-r29/toolchains/llvm/prebuilt/linux-x86_64/lib/clang/21/include/avx10_2satcvtdsintrin.h:145:1: note: '_mm256_cvttspd_epu32' declared here
  145 | _mm256_cvttspd_epu32(__m256d __A) {
      | ^
In file included from /mnt/vcpkg-ci/b/highway/src/1.3.0-d8ef17a685.clean/hwy/per_target.cc:27:
In file included from /mnt/vcpkg-ci/b/highway/src/1.3.0-d8ef17a685.clean/hwy/foreach_target.h:149:
In file included from /mnt/vcpkg-ci/b/highway/src/1.3.0-d8ef17a685.clean/hwy/per_target.cc:28:
In file included from /mnt/vcpkg-ci/b/highway/src/1.3.0-d8ef17a685.clean/hwy/highway.h:688:
In file included from /mnt/vcpkg-ci/b/highway/src/1.3.0-d8ef17a685.clean/hwy/ops/x86_avx3-inl.h:20:
In file included from /mnt/vcpkg-ci/b/highway/src/1.3.0-d8ef17a685.clean/hwy/ops/x86_512-inl.h:84:
/mnt/vcpkg-ci/b/highway/src/1.3.0-d8ef17a685.clean/hwy/ops/x86_256-inl.h:7251:20: error: use of undeclared identifier '_mm256_cvtts_ps_epi32'; did you mean '_mm256_cvttsps_epi32'?
 7251 |   return VFromD<D>{_mm256_cvtts_ps_epi32(v.raw)};
      |                    ^~~~~~~~~~~~~~~~~~~~~
      |                    _mm256_cvttsps_epi32
/android-ndk-r29/toolchains/llvm/prebuilt/linux-x86_64/lib/clang/21/include/avx10_2satcvtdsintrin.h:302:1: note: '_mm256_cvttsps_epi32' declared here
  302 | _mm256_cvttsps_epi32(__m256 __A) {
      | ^
In file included from /mnt/vcpkg-ci/b/highway/src/1.3.0-d8ef17a685.clean/hwy/per_target.cc:27:
In file included from /mnt/vcpkg-ci/b/highway/src/1.3.0-d8ef17a685.clean/hwy/foreach_target.h:149:
In file included from /mnt/vcpkg-ci/b/highway/src/1.3.0-d8ef17a685.clean/hwy/per_target.cc:28:
In file included from /mnt/vcpkg-ci/b/highway/src/1.3.0-d8ef17a685.clean/hwy/highway.h:688:
In file included from /mnt/vcpkg-ci/b/highway/src/1.3.0-d8ef17a685.clean/hwy/ops/x86_avx3-inl.h:20:
In file included from /mnt/vcpkg-ci/b/highway/src/1.3.0-d8ef17a685.clean/hwy/ops/x86_512-inl.h:84:
/mnt/vcpkg-ci/b/highway/src/1.3.0-d8ef17a685.clean/hwy/ops/x86_256-inl.h:7287:20: error: use of undeclared identifier '_mm256_cvtts_pd_epi64'; did you mean '_mm256_cvttspd_epi64'?
 7287 |   return VFromD<D>{_mm256_cvtts_pd_epi64(v.raw)};
      |                    ^~~~~~~~~~~~~~~~~~~~~
      |                    _mm256_cvttspd_epi64
/android-ndk-r29/toolchains/llvm/prebuilt/linux-x86_64/lib/clang/21/include/avx10_2satcvtdsintrin.h:197:1: note: '_mm256_cvttspd_epi64' declared here
  197 | _mm256_cvttspd_epi64(__m256d __A) {
      | ^
In file included from /mnt/vcpkg-ci/b/highway/src/1.3.0-d8ef17a685.clean/hwy/per_target.cc:27:
In file included from /mnt/vcpkg-ci/b/highway/src/1.3.0-d8ef17a685.clean/hwy/foreach_target.h:149:
In file included from /mnt/vcpkg-ci/b/highway/src/1.3.0-d8ef17a685.clean/hwy/per_target.cc:28:
In file included from /mnt/vcpkg-ci/b/highway/src/1.3.0-d8ef17a685.clean/hwy/highway.h:688:
In file included from /mnt/vcpkg-ci/b/highway/src/1.3.0-d8ef17a685.clean/hwy/ops/x86_avx3-inl.h:20:
/mnt/vcpkg-ci/b/highway/src/1.3.0-d8ef17a685.clean/hwy/ops/x86_512-inl.h:5901:20: error: use of undeclared identifier '_mm512_cvtts_pd_epi32'; did you mean '_mm512_cvttspd_epi32'?
 5901 |   return VFromD<D>{_mm512_cvtts_pd_epi32(v.raw)};
      |                    ^~~~~~~~~~~~~~~~~~~~~
      |                    _mm512_cvttspd_epi32
/android-ndk-r29/toolchains/llvm/prebuilt/linux-x86_64/lib/clang/21/include/avx10_2_512satcvtdsintrin.h:23:46: note: '_mm512_cvttspd_epi32' declared here
   23 | static __inline__ __m256i __DEFAULT_FN_ATTRS _mm512_cvttspd_epi32(__m512d __A) {
      |                                              ^
In file included from /mnt/vcpkg-ci/b/highway/src/1.3.0-d8ef17a685.clean/hwy/per_target.cc:27:
In file included from /mnt/vcpkg-ci/b/highway/src/1.3.0-d8ef17a685.clean/hwy/foreach_target.h:149:
In file included from /mnt/vcpkg-ci/b/highway/src/1.3.0-d8ef17a685.clean/hwy/per_target.cc:28:
In file included from /mnt/vcpkg-ci/b/highway/src/1.3.0-d8ef17a685.clean/hwy/highway.h:688:
In file included from /mnt/vcpkg-ci/b/highway/src/1.3.0-d8ef17a685.clean/hwy/ops/x86_avx3-inl.h:20:
/mnt/vcpkg-ci/b/highway/src/1.3.0-d8ef17a685.clean/hwy/ops/x86_512-inl.h:5938:20: error: use of undeclared identifier '_mm512_cvtts_pd_epu32'; did you mean '_mm512_cvttspd_epu32'?
 5938 |   return VFromD<D>{_mm512_cvtts_pd_epu32(v.raw)};
      |                    ^~~~~~~~~~~~~~~~~~~~~
      |                    _mm512_cvttspd_epu32
/android-ndk-r29/toolchains/llvm/prebuilt/linux-x86_64/lib/clang/21/include/avx10_2_512satcvtdsintrin.h:58:46: note: '_mm512_cvttspd_epu32' declared here
   58 | static __inline__ __m256i __DEFAULT_FN_ATTRS _mm512_cvttspd_epu32(__m512d __A) {
      |                                              ^
In file included from /mnt/vcpkg-ci/b/highway/src/1.3.0-d8ef17a685.clean/hwy/per_target.cc:27:
In file included from /mnt/vcpkg-ci/b/highway/src/1.3.0-d8ef17a685.clean/hwy/foreach_target.h:149:
In file included from /mnt/vcpkg-ci/b/highway/src/1.3.0-d8ef17a685.clean/hwy/per_target.cc:28:
In file included from /mnt/vcpkg-ci/b/highway/src/1.3.0-d8ef17a685.clean/hwy/highway.h:688:
In file included from /mnt/vcpkg-ci/b/highway/src/1.3.0-d8ef17a685.clean/hwy/ops/x86_avx3-inl.h:20:
/mnt/vcpkg-ci/b/highway/src/1.3.0-d8ef17a685.clean/hwy/ops/x86_512-inl.h:6286:20: error: use of undeclared identifier '_mm512_cvtts_ps_epi32'; did you mean '_mm512_cvttsps_epi32'?
 6286 |   return VFromD<D>{_mm512_cvtts_ps_epi32(v.raw)};
      |                    ^~~~~~~~~~~~~~~~~~~~~
      |                    _mm512_cvttsps_epi32
/android-ndk-r29/toolchains/llvm/prebuilt/linux-x86_64/lib/clang/21/include/avx10_2_512satcvtdsintrin.h:163:46: note: '_mm512_cvttsps_epi32' declared here
  163 | static __inline__ __m512i __DEFAULT_FN_ATTRS _mm512_cvttsps_epi32(__m512 __A) {
      |                                              ^
In file included from /mnt/vcpkg-ci/b/highway/src/1.3.0-d8ef17a685.clean/hwy/per_target.cc:27:
In file included from /mnt/vcpkg-ci/b/highway/src/1.3.0-d8ef17a685.clean/hwy/foreach_target.h:149:
In file included from /mnt/vcpkg-ci/b/highway/src/1.3.0-d8ef17a685.clean/hwy/per_target.cc:28:
In file included from /mnt/vcpkg-ci/b/highway/src/1.3.0-d8ef17a685.clean/hwy/highway.h:688:
In file included from /mnt/vcpkg-ci/b/highway/src/1.3.0-d8ef17a685.clean/hwy/ops/x86_avx3-inl.h:20:
/mnt/vcpkg-ci/b/highway/src/1.3.0-d8ef17a685.clean/hwy/ops/x86_512-inl.h:6328:20: error: use of undeclared identifier '_mm512_cvtts_pd_epi64'; did you mean '_mm512_cvttspd_epi64'?
 6328 |   return VFromD<D>{_mm512_cvtts_pd_epi64(v.raw)};
      |                    ^~~~~~~~~~~~~~~~~~~~~
      |                    _mm512_cvttspd_epi64
/android-ndk-r29/toolchains/llvm/prebuilt/linux-x86_64/lib/clang/21/include/avx10_2_512satcvtdsintrin.h:94:46: note: '_mm512_cvttspd_epi64' declared here
   94 | static __inline__ __m512i __DEFAULT_FN_ATTRS _mm512_cvttspd_epi64(__m512d __A) {
      |                                              ^
8 errors generated.
```
@BillyONeal

Copy link
Copy Markdown

Oh I see because it wants saturation...

BillyONeal added a commit to BillyONeal/vcpkg that referenced this pull request Feb 23, 2026
This applies google/highway#2695

Note that this must *NOT* take clang's suggestions as I tried initially in BillyONeal/highway@d0decc2 because those intrinsics aren't saturating.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants