Skip to content

Commit 0d4e59f

Browse files
committed
applying reviews + disable-quadblas CI test
1 parent bc790da commit 0d4e59f

4 files changed

Lines changed: 21 additions & 33 deletions

File tree

.github/workflows/build_wheels.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ jobs:
116116

117117
# QBLAS is auto-disabled on Windows by meson.build (it uses GCC/POSIX-only
118118
# constructs that MSVC does not support); the wheel falls back to the
119-
# naive matmul kernel. No CFLAGS hack needed.
119+
# naive matmul kernel.
120120
build_wheels_windows:
121121
name: Build wheels on Windows
122122
runs-on: windows-latest

.github/workflows/test_old_cpu.yml

Lines changed: 19 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,4 @@
1-
name: Test on Older CPUs (x86_64-v2)
2-
3-
# This workflow tests numpy-quaddtype on older x86 CPUs using Intel SDE.
4-
# It ensures compatibility with x86_64-v2 baseline CPUs (e.g., Sandy Bridge)
5-
# that don't have AVX2/FMA support.
1+
name: Test Older CPUs + Build Options
62

73
on:
84
push:
@@ -13,14 +9,21 @@ on:
139

1410
jobs:
1511
test_old_cpu:
16-
name: Test on ${{ matrix.cpu[1] }}
12+
name: Test ${{ matrix.config.name }}
1713
runs-on: ubuntu-24.04
1814
strategy:
1915
fail-fast: false
2016
matrix:
21-
cpu:
22-
- ['snb', 'Sandy Bridge (x86_64-v2)']
23-
- ['hsw', 'Haswell (x86_64-v3)']
17+
config:
18+
- name: "Sandy Bridge (x86_64-v2)"
19+
sde_cpu: "snb"
20+
meson_args: "-Csetup-args=-Ddisable_fma=true"
21+
- name: "Haswell (x86_64-v3)"
22+
sde_cpu: "hsw"
23+
meson_args: ""
24+
- name: "Haswell, no QBLAS"
25+
sde_cpu: "hsw"
26+
meson_args: "-Csetup-args=-Ddisable_quadblas=true"
2427
steps:
2528
- uses: actions/checkout@v6
2629
with:
@@ -51,27 +54,21 @@ jobs:
5154
env:
5255
LDFLAGS: "-fopenmp"
5356
run: |
54-
# For Sandy Bridge (x86-64-v2), we need to disable FMA code paths
55-
# since FMA instructions are not available on that microarchitecture
56-
if [ "${{ matrix.cpu[0] }}" = "snb" ]; then
57-
pip install .[test] --no-build-isolation -v -Csetup-args=-Ddisable_fma=true
58-
else
59-
pip install .[test] --no-build-isolation -v
60-
fi
57+
pip install .[test] --no-build-isolation -v ${{ matrix.config.meson_args }}
6158
62-
- name: Test import on ${{ matrix.cpu[1] }}
59+
- name: Test import on ${{ matrix.config.name }}
6360
run: |
64-
echo "Testing basic import on ${{ matrix.cpu[1] }}..."
65-
sde -${{ matrix.cpu[0] }} -- python -c "
61+
echo "Testing basic import on ${{ matrix.config.name }}..."
62+
sde -${{ matrix.config.sde_cpu }} -- python -c "
6663
import numpy as np
6764
print('NumPy version:', np.__version__)
6865
from numpy_quaddtype import QuadPrecDType
6966
print('QuadPrecDType imported successfully!')
7067
arr = np.zeros(3, dtype=QuadPrecDType())
7168
print('Created quad array:', arr)
72-
print('SUCCESS: Works on ${{ matrix.cpu[1] }}!')
69+
print('SUCCESS: Works on ${{ matrix.config.name }}!')
7370
"
7471
75-
- name: Run tests on ${{ matrix.cpu[1] }}
72+
- name: Run tests on ${{ matrix.config.name }}
7673
run: |
77-
sde -${{ matrix.cpu[0] }} -- python -m pytest tests/ -v --tb=short -v -s
74+
sde -${{ matrix.config.sde_cpu }} -- python -m pytest tests/ -v --tb=short -v -s

meson.build

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -115,15 +115,6 @@ npymath_lib = c.find_library('npymath', dirs: npymath_path)
115115

116116
dependencies = [py_dep, qblas_dep, sleef_dep, sleefquad_dep, npymath_lib]
117117

118-
# OpenMP is not used directly by any source in this package (#pragma omp
119-
# is absent); it only matters because qblas's static lib has OpenMP
120-
# objects baked in. qblas_dep already propagates the OpenMP requirement
121-
# transitively, so adding a second dependency('openmp') here would put
122-
# OpenMP into the compile-args closure twice. On Apple's clang++ that
123-
# duplication leaves an orphan '-Xpreprocessor' in $ARGS which then
124-
# pairs with '-MD' from the dep-gen flags ('-Xpreprocessor -MD'), and
125-
# the preprocessor rejects -MD as unknown - failing all C++ compiles.
126-
127118
# compiler flags for QBLAS compatibility
128119
if not is_windows
129120
# QBLAS requires extended numeric literals for Q suffix support

meson.options

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@ option('disable_quadblas', type: 'boolean', value: false,
66
description: 'Skip the QBLAS subproject and fall back to naive ' +
77
'matmul kernels. Auto-enabled on Windows because ' +
88
'QBLAS uses GCC/POSIX-only constructs that do not ' +
9-
'build under MSVC.')
9+
'build under MSVC.')

0 commit comments

Comments
 (0)