Skip to content

Commit 82e5939

Browse files
authored
Merge pull request #22099 from greglucas/numpy-cpu-avx512
CI: Disable numpy avx512 instructions
2 parents e4add66 + d6f6875 commit 82e5939

File tree

4 files changed

+8
-3
lines changed

4 files changed

+8
-3
lines changed

.github/workflows/tests.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ on:
99

1010
env:
1111
NO_AT_BRIDGE: 1 # Necessary for GTK3 interactive test.
12+
NPY_DISABLE_CPU_FEATURES: "AVX512F,AVX512CD,AVX512VL,AVX512BW,AVX512DQ,AVX512_SKX"
1213
OPENBLAS_NUM_THREADS: 1
1314
PYTHONFAULTHANDLER: 1
1415

azure-pipelines.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,7 @@ stages:
129129
displayName: 'print env'
130130

131131
- bash: |
132+
export NPY_DISABLE_CPU_FEATURES="AVX512F,AVX512CD,AVX512VL,AVX512BW,AVX512DQ,AVX512_SKX"
132133
PYTHONFAULTHANDLER=1 python -m pytest --junitxml=junit/test-results.xml -raR --maxfail=50 --timeout=300 --durations=25 --cov-report= --cov=lib -n 2 ||
133134
[[ "$PYTHON_VERSION" = 'Pre' ]]
134135
displayName: 'pytest'

lib/matplotlib/tests/test_backend_tk.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,8 @@ def test_func():
3636
try:
3737
proc = subprocess.run(
3838
[sys.executable, "-c", f"{source}\n{func.__name__}()"],
39-
env={**os.environ, "MPLBACKEND": "TkAgg"},
39+
env={**os.environ, "MPLBACKEND": "TkAgg",
40+
"NPY_DISABLE_CPU_FEATURES": ""},
4041
timeout=_test_timeout,
4142
stdout=subprocess.PIPE,
4243
stderr=subprocess.PIPE,

lib/matplotlib/tests/test_sphinxext.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,8 @@ def test_tinypages(tmpdir):
2828
# coverage anyways); hide them using GCOV_ERROR_FILE.
2929
proc = Popen(
3030
cmd, stdout=PIPE, stderr=PIPE, universal_newlines=True,
31-
env={**os.environ, "MPLBACKEND": "", "GCOV_ERROR_FILE": os.devnull})
31+
env={**os.environ, "MPLBACKEND": "", "GCOV_ERROR_FILE": os.devnull,
32+
"NPY_DISABLE_CPU_FEATURES": ""})
3233
out, err = proc.communicate()
3334

3435
# Build the pages with warnings turned into errors
@@ -128,7 +129,8 @@ def build_sphinx_html(source_dir, doctree_dir, html_dir, extra_args=None):
128129
cmd = [sys.executable, '-msphinx', '-W', '-b', 'html',
129130
'-d', str(doctree_dir), str(source_dir), str(html_dir), *extra_args]
130131
proc = Popen(cmd, stdout=PIPE, stderr=PIPE, universal_newlines=True,
131-
env={**os.environ, "MPLBACKEND": ""})
132+
env={**os.environ, "MPLBACKEND": "",
133+
"NPY_DISABLE_CPU_FEATURES": ""})
132134
out, err = proc.communicate()
133135

134136
assert proc.returncode == 0, \

0 commit comments

Comments
 (0)