@@ -19,7 +19,7 @@ if ! cmake -B "$BUILD_DIR" -S . -DCMAKE_BUILD_TYPE=Release >/dev/null 2>&1; then
1919fi
2020
2121if [ $ERRORS -eq 0 ]; then
22- if ! cmake --build " $BUILD_DIR " -j$( nproc) > /dev/null 2>&1 ; then
22+ if ! cmake --build " $BUILD_DIR " -j$( sysctl -n hw.logicalcpu 2> /dev/null || nproc 2> /dev/null || echo 4 ) > /dev/null 2>&1 ; then
2323 echo " FAIL: cmake build failed"
2424 ERRORS=$(( ERRORS + 1 ))
2525 fi
@@ -37,23 +37,35 @@ if [ -z "$CMAKE_LIB" ]; then
3737 exit 1
3838fi
3939
40- SYMBOLS=$( nm -g " $CMAKE_LIB " 2> /dev/null | grep " T " | awk ' {print $3}' )
40+ SYMBOLS=$( nm -g " $CMAKE_LIB " 2> /dev/null | grep " T " | awk ' {print $3}' | sed ' s/^_// ' )
4141
42- # Check for per-ISA dispatch symbols
43- for sym in simd_sse2_abpoa_align_sequence_to_subgraph \
44- simd_sse41_abpoa_align_sequence_to_subgraph \
45- simd_avx2_abpoa_align_sequence_to_subgraph \
46- simd_avx512_abpoa_align_sequence_to_subgraph \
47- simd_abpoa_align_sequence_to_subgraph \
48- simd_abpoa_align_sequence_to_graph; do
49- if ! echo " $SYMBOLS " | grep -qx " $sym " ; then
50- echo " FAIL: dispatch symbol '$sym ' not found in CMake-built library"
51- ERRORS=$(( ERRORS + 1 ))
52- fi
53- done
42+ ARCH=$( uname -m)
43+ if [ " $ARCH " = " x86_64" ] || [ " $ARCH " = " amd64" ]; then
44+ # Check for per-ISA dispatch symbols (x86 only)
45+ for sym in simd_sse2_abpoa_align_sequence_to_subgraph \
46+ simd_sse41_abpoa_align_sequence_to_subgraph \
47+ simd_avx2_abpoa_align_sequence_to_subgraph \
48+ simd_avx512_abpoa_align_sequence_to_subgraph \
49+ simd_abpoa_align_sequence_to_subgraph \
50+ simd_abpoa_align_sequence_to_graph; do
51+ if ! echo " $SYMBOLS " | grep -qx " $sym " ; then
52+ echo " FAIL: dispatch symbol '$sym ' not found in CMake-built library"
53+ ERRORS=$(( ERRORS + 1 ))
54+ fi
55+ done
56+ else
57+ # Non-x86: just verify the generic align symbols are present
58+ for sym in simd_abpoa_align_sequence_to_subgraph \
59+ simd_abpoa_align_sequence_to_graph; do
60+ if ! echo " $SYMBOLS " | grep -qx " $sym " ; then
61+ echo " FAIL: dispatch symbol '$sym ' not found in CMake-built library"
62+ ERRORS=$(( ERRORS + 1 ))
63+ fi
64+ done
65+ fi
5466
5567# Compare output with Makefile reference
56- CMAKE_BIN=$( find " $BUILD_DIR " -name ' abpoa' -type f -executable | head -1)
68+ CMAKE_BIN=$( find " $BUILD_DIR " -name ' abpoa' -type f -perm +111 | head -1)
5769if [ -z " $CMAKE_BIN " ]; then
5870 echo " FAIL: abpoa binary not found in CMake build"
5971 ERRORS=$(( ERRORS + 1 ))
0 commit comments