Skip to content

Commit

Permalink
Merge pull request numpy#26457 from charris/backport-26443-26443-26447
Browse files Browse the repository at this point in the history
MAINT: Various CI fixes
  • Loading branch information
charris committed May 16, 2024
2 parents 6a8fa66 + d358b74 commit c2f0f17
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 25 deletions.
30 changes: 11 additions & 19 deletions .github/workflows/linux_simd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ jobs:
fetch-tags: true
- uses: actions/setup-python@82c7e631bb3cdc910f68e0081d67478d79c6982d # v5.1.0
with:
python-version: '3.9'
python-version: '3.10'
- uses: ./.github/meson_actions
name: Build/Test

Expand All @@ -81,7 +81,7 @@ jobs:
fetch-tags: true
- uses: actions/setup-python@82c7e631bb3cdc910f68e0081d67478d79c6982d # v5.1.0
with:
python-version: '3.9'
python-version: '3.10'

- name: Install GCC/8/9
run: |
Expand Down Expand Up @@ -117,7 +117,7 @@ jobs:
- [
"without optimizations",
"-Dallow-noblas=true -Ddisable-optimization=true",
"3.12-dev"
"3.12"
]
- [
"native",
Expand All @@ -132,7 +132,7 @@ jobs:
- [
"without avx512/avx2/fma3",
"-Dallow-noblas=true -Dcpu-dispatch=SSSE3,SSE41,POPCNT,SSE42,AVX,F16C",
"3.9"
"3.10"
]

env:
Expand All @@ -152,7 +152,7 @@ jobs:

intel_sde_avx512:
needs: [baseline_only]
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with:
Expand All @@ -170,27 +170,23 @@ jobs:
- name: Install dependencies
run: |
sudo apt update
sudo apt install -y g++-13
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-13 1
sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-13 1
python -m pip install -r requirements/build_requirements.txt
python -m pip install pytest pytest-xdist hypothesis typing_extensions
- name: Build
run: spin build -- -Dallow-noblas=true -Dcpu-baseline=avx512f -Dtest-simd='BASELINE,AVX512_KNL,AVX512_KNM,AVX512_SKX,AVX512_CLX,AVX512_CNL,AVX512_ICL,AVX512_SPR'
run: CC=gcc-13 CXX=g++-13 spin build -- -Dallow-noblas=true -Dcpu-baseline=avx512_skx -Dtest-simd='BASELINE,AVX512_KNL,AVX512_KNM,AVX512_SKX,AVX512_CLX,AVX512_CNL,AVX512_ICL,AVX512_SPR'

- name: Meson Log
if: always()
run: cat build/meson-logs/meson-log.txt

- name: SIMD tests (KNM)
- name: SIMD tests (SKX)
run: |
export NUMPY_SITE=$(realpath build-install/usr/lib/python*/site-packages/)
export PYTHONPATH="$PYTHONPATH:$NUMPY_SITE"
cd build-install &&
sde -knm -- python -c "import numpy; numpy.show_config()" &&
sde -knm -- python -m pytest $NUMPY_SITE/numpy/_core/tests/test_simd*
sde -skx -- python -c "import numpy; numpy.show_config()" &&
sde -skx -- python -m pytest $NUMPY_SITE/numpy/_core/tests/test_simd*
- name: linalg/ufunc/umath tests (TGL)
run: |
Expand All @@ -206,7 +202,7 @@ jobs:
intel_sde_spr:
needs: [baseline_only]
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with:
Expand All @@ -224,15 +220,11 @@ jobs:
- name: Install dependencies
run: |
sudo apt update
sudo apt install -y g++-13
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-13 1
sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-13 1
python -m pip install -r requirements/build_requirements.txt
python -m pip install pytest pytest-xdist hypothesis typing_extensions
- name: Build
run: spin build -- -Dallow-noblas=true -Dcpu-baseline=avx512_spr
run: CC=gcc-13 CXX=g++-13 spin build -- -Dallow-noblas=true -Dcpu-baseline=avx512_spr

- name: Meson Log
if: always()
Expand Down
2 changes: 1 addition & 1 deletion environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ dependencies:
- pkg-config
- meson-python
- pip
- spin
- spin=0.8 # Unpin when spin 0.9.1 is released
- ccache
# For testing
- pytest
Expand Down
11 changes: 6 additions & 5 deletions numpy/_core/tests/test_strings.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@

MAX = np.iinfo(np.int64).max

IS_PYPY_LT_7_3_16 = IS_PYPY and sys.implementation.version < (7, 3, 16)

@pytest.mark.parametrize(["op", "ufunc", "sym"], COMPARISONS)
def test_mixed_string_comparison_ufuncs_fail(op, ufunc, sym):
Expand Down Expand Up @@ -770,7 +771,7 @@ def test_replace_unicode(self, buf, old, new, count, res, dt):
'\U00011066',
'\U000104A0',
pytest.param('\U0001F107', marks=pytest.mark.xfail(
sys.platform == 'win32' and IS_PYPY,
sys.platform == 'win32' and IS_PYPY_LT_7_3_16,
reason="PYPY bug in Py_UNICODE_ISALNUM",
strict=True)),
])
Expand All @@ -787,7 +788,7 @@ def test_isalnum_unicode(self, in_, dt):
('\U0001F46F', False),
('\u2177', True),
pytest.param('\U00010429', True, marks=pytest.mark.xfail(
sys.platform == 'win32' and IS_PYPY,
sys.platform == 'win32' and IS_PYPY_LT_7_3_16,
reason="PYPY bug in Py_UNICODE_ISLOWER",
strict=True)),
('\U0001044E', True),
Expand All @@ -805,7 +806,7 @@ def test_islower_unicode(self, in_, out, dt):
('\U0001F46F', False),
('\u2177', False),
pytest.param('\U00010429', False, marks=pytest.mark.xfail(
sys.platform == 'win32' and IS_PYPY,
sys.platform == 'win32' and IS_PYPY_LT_7_3_16,
reason="PYPY bug in Py_UNICODE_ISUPPER",
strict=True)),
('\U0001044E', False),
Expand All @@ -818,12 +819,12 @@ def test_isupper_unicode(self, in_, out, dt):
('\u1FFc', True),
('Greek \u1FFcitlecases ...', True),
pytest.param('\U00010401\U00010429', True, marks=pytest.mark.xfail(
sys.platform == 'win32' and IS_PYPY,
sys.platform == 'win32' and IS_PYPY_LT_7_3_16,
reason="PYPY bug in Py_UNICODE_ISISTITLE",
strict=True)),
('\U00010427\U0001044E', True),
pytest.param('\U00010429', False, marks=pytest.mark.xfail(
sys.platform == 'win32' and IS_PYPY,
sys.platform == 'win32' and IS_PYPY_LT_7_3_16,
reason="PYPY bug in Py_UNICODE_ISISTITLE",
strict=True)),
('\U0001044E', False),
Expand Down

0 comments on commit c2f0f17

Please sign in to comment.