Skip to content

Commit 782eec9

Browse files
author
peng.li24
committed
ci: fix pybind11 v3 --cmakedir; make AVX-512 check non-fatal
- CMakeLists.txt: pybind11 v3.x dropped --cmake, now uses --cmakedir; try --cmakedir first, fall back to --cmake for v2.x compatibility - ci.yml: remove exit 1 from AVX-512 check — SVML bridge falls back to scalar npy_* path on non-AVX-512 runners; both paths are bit-exact since they resolve the same numpy functions via dlsym
1 parent f6ac6a3 commit 782eec9

2 files changed

Lines changed: 14 additions & 3 deletions

File tree

.github/workflows/ci.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,8 @@ jobs:
5353
- name: Verify AVX-512 support
5454
run: |
5555
grep -q avx512f /proc/cpuinfo \
56-
&& echo "✓ AVX-512 supported" \
57-
|| (echo " AVX-512 not detected — tests may SIGILL"; exit 1)
56+
&& echo "✓ AVX-512 supported — SVML vector path active" \
57+
|| echo " AVX-512 not detected — SVML bridge falls back to scalar npy_* (still bit-exact)"
5858
5959
- name: Configure
6060
run: cmake -S tests -B tests/build -DCMAKE_BUILD_TYPE=Release

tests/CMakeLists.txt

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,23 @@ set(CMAKE_CXX_EXTENSIONS OFF)
2323
find_package(Python3 REQUIRED COMPONENTS Interpreter Development)
2424

2525
# pybind11 — prefer the copy installed alongside Python
26+
# pybind11 v2.x uses --cmake; v3.x uses --cmakedir — try both
2627
execute_process(
27-
COMMAND "${Python3_EXECUTABLE}" -m pybind11 --cmake
28+
COMMAND "${Python3_EXECUTABLE}" -m pybind11 --cmakedir
2829
OUTPUT_VARIABLE PYBIND11_CMAKE_DIR
2930
OUTPUT_STRIP_TRAILING_WHITESPACE
3031
RESULT_VARIABLE _pybind11_cmake_result
32+
ERROR_QUIET
3133
)
34+
if(NOT (_pybind11_cmake_result EQUAL 0 AND EXISTS "${PYBIND11_CMAKE_DIR}"))
35+
execute_process(
36+
COMMAND "${Python3_EXECUTABLE}" -m pybind11 --cmake
37+
OUTPUT_VARIABLE PYBIND11_CMAKE_DIR
38+
OUTPUT_STRIP_TRAILING_WHITESPACE
39+
RESULT_VARIABLE _pybind11_cmake_result
40+
ERROR_QUIET
41+
)
42+
endif()
3243
if(_pybind11_cmake_result EQUAL 0 AND EXISTS "${PYBIND11_CMAKE_DIR}")
3344
find_package(pybind11 CONFIG REQUIRED
3445
PATHS "${PYBIND11_CMAKE_DIR}" NO_DEFAULT_PATH)

0 commit comments

Comments
 (0)