Merge pull request #88 from SwayamInSync/matmul-nd #86
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Test Older CPUs + Build Options | |
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| jobs: | |
| test_old_cpu: | |
| name: Test ${{ matrix.config.name }} | |
| runs-on: ubuntu-24.04 | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| config: | |
| - name: "Sandy Bridge (x86_64-v2)" | |
| sde_cpu: "snb" | |
| meson_args: "-Csetup-args=-Ddisable_fma=true" | |
| - name: "Haswell (x86_64-v3)" | |
| sde_cpu: "hsw" | |
| meson_args: "" | |
| - name: "Haswell, no QBLAS" | |
| sde_cpu: "hsw" | |
| meson_args: "-Csetup-args=-Ddisable_quadblas=true" | |
| steps: | |
| - uses: actions/checkout@v6 | |
| with: | |
| submodules: recursive | |
| - name: Set up Python | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version: "3.12" | |
| - name: Install Intel SDE | |
| run: | | |
| curl -o /tmp/sde.tar.xz https://downloadmirror.intel.com/859732/sde-external-9.58.0-2025-06-16-lin.tar.xz | |
| mkdir /tmp/sde && tar -xvf /tmp/sde.tar.xz -C /tmp/sde/ | |
| sudo mv /tmp/sde/* /opt/sde && sudo ln -s /opt/sde/sde64 /usr/bin/sde | |
| - name: Install system dependencies | |
| run: | | |
| sudo apt-get update -y | |
| sudo apt-get install -y cmake gcc g++ make git pkg-config | |
| - name: Install Python dependencies | |
| run: | | |
| pip install -U pip | |
| pip install numpy meson meson-python ninja pytest | |
| - name: Build numpy-quaddtype | |
| env: | |
| LDFLAGS: "-fopenmp" | |
| run: | | |
| pip install .[test] --no-build-isolation -v ${{ matrix.config.meson_args }} | |
| - name: Test import on ${{ matrix.config.name }} | |
| run: | | |
| echo "Testing basic import on ${{ matrix.config.name }}..." | |
| sde -${{ matrix.config.sde_cpu }} -- python -c " | |
| import numpy as np | |
| print('NumPy version:', np.__version__) | |
| from numpy_quaddtype import QuadPrecDType | |
| print('QuadPrecDType imported successfully!') | |
| arr = np.zeros(3, dtype=QuadPrecDType()) | |
| print('Created quad array:', arr) | |
| print('SUCCESS: Works on ${{ matrix.config.name }}!') | |
| " | |
| - name: Run tests on ${{ matrix.config.name }} | |
| run: | | |
| sde -${{ matrix.config.sde_cpu }} -- python -m pytest tests/ -v --tb=short -v -s |