simde: Test build failed on Mac OS M1

Hey, I am building the test project with my Mac m1 machine, and used the following command to build the test source file:

cmake -S . -B build
cmake --build build

but it failed with a lot of incompatible pointer types assigning errors

such as:

/simde/arm/neon/ld1_x4.h:51:24: error: incompatible pointer types assigning to 'const __fp16 *' from 'const simde_float16 *' (aka 'const _Float16 *')
    return vld1_f16_x4(ptr);
                        ^~~
/simde/arm/neon/ld1q_x2.h:52:25: error: incompatible pointer types assigning to 'const __fp16 *' from 'const simde_float16 *' (aka 'const _Float16 *')
    return vld1q_f16_x2(ptr);
                        ^~~
simde/arm/neon/ld3_dup.h:250:26: error: incompatible pointer types assigning to 'const __fp16 *' from 'const simde_float16 *' (aka 'const _Float16 *')
    return vld3q_dup_f16(ptr);
                         ^~~
...

Maybe I should add some flags when run the cmake command, but I did not find any useful information in the CMakeLists.txt file.

Could anyone provide some help?

About this issue

  • Original URL
  • State: closed
  • Created 8 months ago
  • Reactions: 2
  • Comments: 20 (5 by maintainers)

Commits related to this issue

Most upvoted comments

We should try testing with the latest qemu. It isn’t impossible that Apple Silicon / apple clang are wrong, but it seems more likely that qemu is in error.

@yyctw can you

  1. Build and test the master branch of SIMDe using the latest qemu with a CPU profile and compilation options that matches the capability of a M1 chip?
  2. Review the test results reported here, comparing the plain SIMDe implementations and the Arm intrinsics documentation. If qemu is in error, then the plain implementations will need changing.

@yyctw I applied the commit patch and rebuilt the test, but the test errors still remain:

Summary of Failures:

 720/1838 arm/neon/cvt/native/c                   ERROR           2.63s   exit status 1
 722/1838 arm/neon/cvt/native/cpp                 ERROR           2.51s   exit status 1
 724/1838 arm/neon/cvt_n/native/c                 ERROR           2.36s   exit status 1
 726/1838 arm/neon/cvt_n/native/cpp               ERROR           2.50s   exit status 1
 728/1838 arm/neon/cvtm/native/c                  ERROR           2.79s   exit status 1
 730/1838 arm/neon/cvtm/native/cpp                ERROR           2.82s   exit status 1
 732/1838 arm/neon/cvtn/native/c                  ERROR           2.85s   exit status 1
 734/1838 arm/neon/cvtn/native/cpp                ERROR           2.76s   exit status 1
 736/1838 arm/neon/cvtp/native/c                  ERROR           2.45s   exit status 1
 738/1838 arm/neon/cvtp/native/cpp                ERROR           2.57s   exit status 1

Ok:                 1828
Expected Fail:      0   
Fail:               10  
Unexpected Pass:    0   
Skipped:            0   
Timeout:            0   

But the error log differed from the previous, may be it can help:


 718/1838 arm/neon/cnt/native/cpp                           OK              0.03s   4 subtests passed
▶  719/1838 cvt/vcvth_s16_f16                               FAIL          
▶  719/1838 cvt/vcvtah_s16_f16                              FAIL          
 720/1838 arm/neon/cvt/emul/c                               OK              0.03s   70 subtests passed
▶  721/1838 cvt/vcvth_s16_f16                               FAIL          
▶  721/1838 cvt/vcvtah_s16_f16                              FAIL          
▶  722/1838 cvt_n/vcvth_n_s32_f16                           FAIL          
▶  722/1838 cvt_n/vcvth_n_s64_f16                           FAIL          
▶  722/1838 cvt_n/vcvth_n_u32_f16                           FAIL          
▶  722/1838 cvt_n/vcvth_n_u64_f16                           FAIL          
▶  722/1838 cvt_n/vcvth_n_f16_s32                           FAIL          
▶  722/1838 cvt_n/vcvth_n_f16_s64                           FAIL          
▶  722/1838 cvt_n/vcvth_n_f16_u32                           FAIL          
▶  722/1838 cvt_n/vcvth_n_f16_u64                           FAIL          
 719/1838 arm/neon/cvt/native/c                             ERROR           0.03s   exit status 1
>>> MALLOC_PERTURB_=89 /Users/lanjunkang/Documents/grandline/simde/build/test/arm/neon/cvt-native-c
―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――― ✀  ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――
stderr:
../test/arm/neon/cvt.c:47: assertion failed: r == test_vec[i].r (-32768 == 32767)
../test/arm/neon/cvt.c:2106: assertion failed: r == test_vec[i].r (-32768 == 32767)

(test program exited with status code 1)
―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――

▶  723/1838 cvt_n/vcvth_n_s32_f16                           FAIL          
▶  723/1838 cvt_n/vcvth_n_s64_f16                           FAIL          
▶  723/1838 cvt_n/vcvth_n_u32_f16                           FAIL          
▶  723/1838 cvt_n/vcvth_n_u64_f16                           FAIL          
▶  723/1838 cvt_n/vcvth_n_f16_s32                           FAIL          
▶  723/1838 cvt_n/vcvth_n_f16_s64                           FAIL          
▶  723/1838 cvt_n/vcvth_n_f16_u32                           FAIL          
▶  723/1838 cvt_n/vcvth_n_f16_u64                           FAIL          
 724/1838 arm/neon/cvt/emul/cpp                             OK              0.03s   70 subtests passed
 725/1838 arm/neon/cvt_n/emul/c                             OK              0.03s   43 subtests passed
 721/1838 arm/neon/cvt/native/cpp                           ERROR           0.04s   exit status 1
>>> MALLOC_PERTURB_=216 /Users/lanjunkang/Documents/grandline/simde/build/test/arm/neon/cvt-native-cpp
―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――― ✀  ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――
stderr:
test/arm/neon/cvt.cpp:47: assertion failed: r == test_vec[i].r (-32768 == 32767)
test/arm/neon/cvt.cpp:2106: assertion failed: r == test_vec[i].r (-32768 == 32767)

(test program exited with status code 1)
―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――

 722/1838 arm/neon/cvt_n/native/c                           ERROR           0.03s   exit status 1
>>> MALLOC_PERTURB_=115 /Users/lanjunkang/Documents/grandline/simde/build/test/arm/neon/cvt_n-native-c
―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――― ✀  ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――
stderr:
../test/arm/neon/cvt_n.c:184: assertion failed: r10 == test_vec[i].r10 (32767 == 2147483647)
../test/arm/neon/cvt_n.c:287: assertion failed: r13 == test_vec[i].r13 (32767 == 9223372036854775807)
../test/arm/neon/cvt_n.c:437: assertion failed: r10 == test_vec[i].r10 (65535 == 4294967295)
../test/arm/neon/cvt_n.c:509: assertion failed: r10 == test_vec[i].r10 (65535 == 18446744073709551615)
../test/arm/neon/cvt_n.c:669: assertion failed: r3 ~= test_vec[i].r3 (-3764.000000 ~= inf)
../test/arm/neon/cvt_n.c:767: assertion failed: r3 ~= test_vec[i].r3 (3084.000000 ~= -inf)
../test/arm/neon/cvt_n.c:928: assertion failed: r3 ~= test_vec[i].r3 (7768.000000 ~= inf)
../test/arm/neon/cvt_n.c:1026: assertion failed: r3 ~= test_vec[i].r3 (3320.000000 ~= inf)

(test program exited with status code 1)
―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――

 726/1838 arm/neon/cvt_n/emul/cpp                           OK              0.03s   43 subtests passed
 723/1838 arm/neon/cvt_n/native/cpp                         ERROR           0.04s   exit status 1
>>> MALLOC_PERTURB_=152 /Users/lanjunkang/Documents/grandline/simde/build/test/arm/neon/cvt_n-native-cpp
―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――― ✀  ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――
stderr:
test/arm/neon/cvt_n.cpp:184: assertion failed: r10 == test_vec[i].r10 (32767 == 2147483647)
test/arm/neon/cvt_n.cpp:287: assertion failed: r13 == test_vec[i].r13 (32767 == 9223372036854775807)
test/arm/neon/cvt_n.cpp:437: assertion failed: r10 == test_vec[i].r10 (65535 == 4294967295)
test/arm/neon/cvt_n.cpp:509: assertion failed: r10 == test_vec[i].r10 (65535 == 18446744073709551615)
test/arm/neon/cvt_n.cpp:669: assertion failed: r3 ~= test_vec[i].r3 (-3764.000000 ~= inf)
test/arm/neon/cvt_n.cpp:767: assertion failed: r3 ~= test_vec[i].r3 (3084.000000 ~= -inf)
test/arm/neon/cvt_n.cpp:928: assertion failed: r3 ~= test_vec[i].r3 (7768.000000 ~= inf)
test/arm/neon/cvt_n.cpp:1026: assertion failed: r3 ~= test_vec[i].r3 (3320.000000 ~= inf)

(test program exited with status code 1)
―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――

▶  727/1838 cvtm/vcvtmh_s16_f16                             FAIL          
 728/1838 arm/neon/cvtm/emul/c                              OK              0.08s   22 subtests passed
▶  729/1838 cvtm/vcvtmh_s16_f16                             FAIL          
▶  730/1838 cvtn/vcvtnh_s16_f16                             FAIL          
 727/1838 arm/neon/cvtm/native/c                            ERROR           0.09s   exit status 1
>>> MALLOC_PERTURB_=16 /Users/lanjunkang/Documents/grandline/simde/build/test/arm/neon/cvtm-native-c
―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――― ✀  ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――
stderr:
../test/arm/neon/cvtm.c:256: assertion failed: r == test_vec[i].r (-32768 == 32767)

(test program exited with status code 1)
―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――

 731/1838 arm/neon/cvtm/emul/cpp                            OK              0.08s   22 subtests passed
▶  732/1838 cvtn/vcvtnh_s16_f16                             FAIL          
 729/1838 arm/neon/cvtm/native/cpp                          ERROR           0.08s   exit status 1
>>> MALLOC_PERTURB_=246 /Users/lanjunkang/Documents/grandline/simde/build/test/arm/neon/cvtm-native-cpp
―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――― ✀  ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――
stderr:
test/arm/neon/cvtm.cpp:256: assertion failed: r == test_vec[i].r (-32768 == 32767)

(test program exited with status code 1)
―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――

 733/1838 arm/neon/cvtn/emul/c                              OK              0.08s   22 subtests passed
 734/1838 arm/neon/cvtn/emul/cpp                            OK              0.07s   22 subtests passed
 730/1838 arm/neon/cvtn/native/c                            ERROR           0.09s   exit status 1
>>> MALLOC_PERTURB_=159 /Users/lanjunkang/Documents/grandline/simde/build/test/arm/neon/cvtn-native-c
―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――― ✀  ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――
stderr:
../test/arm/neon/cvtn.c:213: assertion failed: r == test_vec[i].r (-32768 == 32767)

(test program exited with status code 1)
―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――

 732/1838 arm/neon/cvtn/native/cpp                          ERROR           0.08s   exit status 1
>>> MALLOC_PERTURB_=61 /Users/lanjunkang/Documents/grandline/simde/build/test/arm/neon/cvtn-native-cpp
―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――― ✀  ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――
stderr:
test/arm/neon/cvtn.cpp:213: assertion failed: r == test_vec[i].r (-32768 == 32767)

(test program exited with status code 1)
―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――

 735/1838 arm/neon/cvtp/emul/c                              OK              0.03s   22 subtests passed
▶  736/1838 cvtp/vcvtph_s16_f16                             FAIL          
▶  737/1838 cvtp/vcvtph_s16_f16                             FAIL          
 738/1838 arm/neon/cvtp/emul/cpp                            OK              0.03s   22 subtests passed
 736/1838 arm/neon/cvtp/native/c                            ERROR           0.03s   exit status 1
>>> MALLOC_PERTURB_=70 /Users/lanjunkang/Documents/grandline/simde/build/test/arm/neon/cvtp-native-c
―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――― ✀  ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――
stderr:
../test/arm/neon/cvtp.c:256: assertion failed: r == test_vec[i].r (-32768 == 32767)

(test program exited with status code 1)
―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――

 739/1838 arm/neon/combine/emul/c                           OK              0.02s   11 subtests passed
 740/1838 arm/neon/combine/native/c                         OK              0.02s   11 subtests passed
 737/1838 arm/neon/cvtp/native/cpp                          ERROR           0.04s   exit status 1
>>> MALLOC_PERTURB_=54 /Users/lanjunkang/Documents/grandline/simde/build/test/arm/neon/cvtp-native-cpp
―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――― ✀  ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――
stderr:
test/arm/neon/cvtp.cpp:256: assertion failed: r == test_vec[i].r (-32768 == 32767)

(test program exited with status code 1)
―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――

 741/1838 arm/neon/combine/emul/cpp                         OK              0.03s   11 subtests passed

I’m not sure whether there are some bugs in Compiler or Apple chips.

Build failures were fixed in https://github.com/simd-everywhere/simde/pull/1148 ; I’ll make a new issue to re-implement the FCVTZS/FCVTMS/FCVTPS/FCVTNS family intrinsics that I had to disable

@yyctw Running with a newer qemu version, I am able to reproduce errors:

$ /opt/qemu/bin/qemu-aarch64 --version
qemu-aarch64 version 8.2.90 (v9.0.0-rc0)
$  meson test -C aarch64-clang-18-fp16  --print-errorlogs arm/neon/cvt{_n,m,n,p,,}/native/c | grep failed
../../../usr/local/src/simde/test/arm/neon/cvt.c:47: assertion failed: r == test_vec[i].r (-32768 == 32767)
../../../usr/local/src/simde/test/arm/neon/cvt.c:2198: assertion failed: r == test_vec[i].r (-32768 == 32767)
../../../usr/local/src/simde/test/arm/neon/cvt_n.c:184: assertion failed: r10 == test_vec[i].r10 (32767 == 2147483647)
../../../usr/local/src/simde/test/arm/neon/cvt_n.c:287: assertion failed: r13 == test_vec[i].r13 (32767 == 9223372036854775807)
../../../usr/local/src/simde/test/arm/neon/cvt_n.c:437: assertion failed: r10 == test_vec[i].r10 (65535 == 4294967295)
../../../usr/local/src/simde/test/arm/neon/cvt_n.c:509: assertion failed: r10 == test_vec[i].r10 (65535 == 18446744073709551615)
../../../usr/local/src/simde/test/arm/neon/cvt_n.c:669: assertion failed: r3 ~= test_vec[i].r3 (-3764.000000 ~= inf)
../../../usr/local/src/simde/test/arm/neon/cvt_n.c:767: assertion failed: r3 ~= test_vec[i].r3 (3084.000000 ~= -inf)
../../../usr/local/src/simde/test/arm/neon/cvt_n.c:928: assertion failed: r3 ~= test_vec[i].r3 (7768.000000 ~= inf)
../../../usr/local/src/simde/test/arm/neon/cvt_n.c:1026: assertion failed: r3 ~= test_vec[i].r3 (3320.000000 ~= inf)
../../../usr/local/src/simde/test/arm/neon/cvtm.c:256: assertion failed: r == test_vec[i].r (-32768 == 32767)
../../../usr/local/src/simde/test/arm/neon/cvtn.c:213: assertion failed: r == test_vec[i].r (-32768 == 32767)
../../../usr/local/src/simde/test/arm/neon/cvtp.c:256: assertion failed: r == test_vec[i].r (-32768 == 32767)

I think this issue has some weird points:

  1. For cvt_n.c, I tested it on the Mac server and encountered the same error as @SakuragiHnmch. However, @mr-c didn’t get assertions in the last four functions (vcvth_n_f16_{s/u}{32/64}) and also received different assertions in the first four functions. This implies that the behavior of aarch64 arm8.2-a and arm64 might differ.

My clang version

Apple clang version 14.0.3 (clang-1403.0.22.14.1)
Target: arm64-apple-darwin22.3.0
Thread model: posix
InstalledDir: /Library/Developer/CommandLineTools/usr/bin

Assertions of arm64

stderr:
../test/arm/neon/cvt_n.c:184: assertion failed: r10 == test_vec[i].r10 (32767 == 2147483647)
../test/arm/neon/cvt_n.c:287: assertion failed: r13 == test_vec[i].r13 (32767 == 9223372036854775807)
../test/arm/neon/cvt_n.c:437: assertion failed: r10 == test_vec[i].r10 (65535 == 4294967295)
../test/arm/neon/cvt_n.c:509: assertion failed: r10 == test_vec[i].r10 (65535 == 18446744073709551615)
../test/arm/neon/cvt_n.c:669: assertion failed: r3 ~= test_vec[i].r3 (-3764.000000 ~= inf)
../test/arm/neon/cvt_n.c:767: assertion failed: r3 ~= test_vec[i].r3 (3084.000000 ~= -inf)
../test/arm/neon/cvt_n.c:928: assertion failed: r3 ~= test_vec[i].r3 (7768.000000 ~= inf)
../test/arm/neon/cvt_n.c:1026: assertion failed: r3 ~= test_vec[i].r3 (3320.000000 ~= inf)

Assertions of aarch64 arm8.2-a

ok 1 cvt_n/vcvth_n_s16_f16
../test/arm/neon/cvt_n.c:184: assertion failed: r10 == test_vec[i].r10 (457472 == 2147483647)
not ok 2 cvt_n/vcvth_n_s32_f16
../test/arm/neon/cvt_n.c:287: assertion failed: r13 == test_vec[i].r13 (223360 == 9223372036854775807)
not ok 3 cvt_n/vcvth_n_s64_f16
ok 4 cvt_n/vcvth_n_u16_f16
../test/arm/neon/cvt_n.c:437: assertion failed: r10 == test_vec[i].r10 (150016 == 4294967295)
not ok 5 cvt_n/vcvth_n_u32_f16
../test/arm/neon/cvt_n.c:509: assertion failed: r10 == test_vec[i].r10 (221056 == 18446744073709551615)
not ok 6 cvt_n/vcvth_n_u64_f16

  1. According to ARM documentation, all of these functions actually perform the same operation, FPToFixed, which calls SatQ functions after rounding. The SatQ function saturates the result if it exceeds the range of the return type. The difference between those functions is rounding mode (cvtp: +infinity, cvtm: -infinity) and the number of shift bits (cvt_n). However, when I tested vcvtah_s16_f16 with test case A, I encountered the assertion 31776 == -32768. It seems that the results are not saturated to INT16_MIN but rather the integer overflow occurs.

test case A of vcvtah_s16_f16

{    simde_float16_from_float32(HEDLEY_STATIC_CAST(simde_float32_t, INT16_MIN-1000)),
                 INT16_MIN },

Assertion

../test/arm/neon/cvt.c:2198: assertion failed: r == test_vec[i].r (31776 == -32768)
not ok 44 cvt/vcvtah_s16_f16

The process of integer overflow

simde_float16_from_float32(-33767) = -33760
overflow = 33760 - 32768 = 992
result = INT16_MIN - overflow = INT16_MAX - overflow + 1 = 32767 - 991 = 31776

  1. Looking at another perspective, if the NEON intrinsics didn’t require saturating the result after rounding, the assertion should also appear in other functions (like vcvtah_u16_f16), not just in both vcvth_s16_f16 and vcvtah_s16_f16.

Considering the mentioned points, I believe there’s a higher likelihood of bugs existing in ARM chips rather than bugs in the documentation or QEMU.

Thanks for reading and any recommendations are welcome!

@yyctw It did’t work to add the flag -march=native or -mcpu=apple-m1.

I used following command to set up meson

CFLAGS="-march=native -DSIMDE_FLOAT16_API=4" CXXFLAGS="-march=native -DSIMDE_FLOAT16_API=4" meson setup ..

and then run:

ninja test

Before running the above command, I also add -mcpu=apple-m1 in the file simde/test/meson.build.(I am not sure if the flag -march=native in meson.build file takes the same effect as it in the commad above)

simde_c_args = ['-mcpu=apple-m1']
simde_cxx_args = ['-mcpu=apple-m1']

But the test failed again.

 Summary of Failures:

 720/1838 arm/neon/cvt/native/c                   ERROR           2.41s   exit status 1
 722/1838 arm/neon/cvt/native/cpp                 ERROR           2.50s   exit status 1
 724/1838 arm/neon/cvt_n/native/c                 ERROR           2.51s   exit status 1
 726/1838 arm/neon/cvt_n/native/cpp               ERROR           2.49s   exit status 1
 728/1838 arm/neon/cvtm/native/c                  ERROR           2.47s   exit status 1
 730/1838 arm/neon/cvtm/native/cpp                ERROR           2.64s   exit status 1
 732/1838 arm/neon/cvtn/native/c                  ERROR           2.76s   exit status 1
 734/1838 arm/neon/cvtn/native/cpp                ERROR           3.10s   exit status 1
 736/1838 arm/neon/cvtp/native/c                  ERROR           3.28s   exit status 1
 738/1838 arm/neon/cvtp/native/cpp                ERROR           3.33s   exit status 1

Ok:                 1828
Expected Fail:      0   
Fail:               10  
Unexpected Pass:    0   
Skipped:            0   
Timeout:            0   

@yyctw The definition of vcvth_n_s32_f16 is the same as you showed above: 1

And the clang is a built-in compiler of Xcode:

➜  ~ clang -v
Apple clang version 15.0.0 (clang-1500.0.40.1)
Target: arm64-apple-darwin22.6.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
  1. Is that apple’s built-in clang (from XCode) or another source? The output from when you ran meson setup would be helpful here.

  2. Are you compiling the latest code from this repository, or a particular release of SIMDe?

  3. Lets try out using __fp16 directly from the SIMDe side by adding -DSIMDE_FLOAT16_API=4 to the CFLAGS & CXXFLAGS.

    CFLAGS="-march=native -DSIMDE_FLOAT16_API=4" CXXFLAGS="-march=native -DSIMDE_FLOAT16_API=4" meson setup ..
    

    https://github.com/simd-everywhere/simde/blob/f132275f85ab1c1cb1e890538ee552c11ca09c38/simde/simde-f16.h#L60-L62

If that works, I can use the information from meson setup to fix the configuration in SIMDe

https://github.com/simd-everywhere/simde/blob/f132275f85ab1c1cb1e890538ee552c11ca09c38/simde/simde-f16.h#L64-L82