Skip to content

Commit e674b7c

Browse files
authored
Change linkage of oneapi/2021.2.0 and skip tests for numpy/1.20.2 (#663)
* Skip some tests for oneapi/2021.2.0
1 parent 1b4ab46 commit e674b7c

File tree

8 files changed

+54
-29
lines changed

8 files changed

+54
-29
lines changed

dpnp/backend/CMakeLists.txt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,6 @@ if(UNIX)
219219
# -DMKL_ILP64 -I"${MKLROOT}/include"
220220
# -lmkl_sycl -lmkl_intel_ilp64 -lmkl_sequential -lmkl_core -lsycl -lOpenCL -lpthread -lm -ldl
221221
set(DPNP_MATHLIB_DEP_LIBS
222-
mkl_rt
223222
mkl_sycl
224223
mkl_intel_ilp64
225224
mkl_sequential
@@ -235,7 +234,6 @@ elseif(WIN32)
235234
# -DMKL_ILP64 -I"%MKLROOT%\include"
236235
# mkl_sycl_dll.lib mkl_intel_ilp64_dll.lib mkl_sequential_dll.lib mkl_core_dll.lib sycl.lib OpenCL.lib
237236
set(DPNP_MATHLIB_DEP_LIBS
238-
mkl_rt
239237
mkl_sycl # _dll
240238
mkl_intel_ilp64 # _dll
241239
mkl_sequential # _dll

scripts/azure-pipelines.yml

Lines changed: 6 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,8 @@ jobs:
99
steps:
1010

1111
- bash: |
12-
. ./scripts/set_ci_env.sh
13-
echo ========================= Conda ENV ===============================
14-
conda create -q -y -n CondaCodeStyle python=3.8 conda-build conda-verify \
15-
numpy cython pytest \
16-
pycodestyle autopep8 black
17-
. /usr/share/miniconda/etc/profile.d/conda.sh
18-
conda activate CondaCodeStyle
12+
. ./scripts/set_ci_env.sh 3.8
13+
conda install -y conda-build conda-verify numpy cython pytest pycodestyle autopep8 black
1914
echo ========================= Run style check ===============================
2015
# variables are not used but have to be installed for setuptools
2116
# export ONEAPI_ROOT=/opt/intel
@@ -47,14 +42,8 @@ jobs:
4742
vmImage: 'ubuntu-20.04'
4843
steps:
4944
- bash: |
50-
. ./scripts/set_ci_env.sh
51-
echo ========================= Conda ENV ===============================
52-
conda create -q -y -n CondaCodeStyle python=3.8 conda-build conda-verify \
53-
numpy cython pytest \
54-
pycodestyle autopep8 \
55-
cython pytest pytest-cov
56-
. /usr/share/miniconda/etc/profile.d/conda.sh
57-
conda activate CondaCodeStyle
45+
. ./scripts/set_ci_env.sh 3.8
46+
conda install -y conda-build conda-verify numpy cython pytest pycodestyle autopep8 cython pytest pytest-cov
5847
echo ========================= build DPNP ===============================
5948
./0.build.sh
6049
echo ========================= run code coverage ===============================
@@ -80,7 +69,7 @@ jobs:
8069
versionSpec: '$(python.version)'
8170
displayName: 'Use Python $(python.version)'
8271
- bash: |
83-
. ./scripts/set_ci_env.sh
72+
. ./scripts/set_ci_env.sh $(python.version)
8473
echo ========================= build DPNP ===============================
8574
./0.build.sh
8675
echo ========================= run pytest ===============================
@@ -104,8 +93,7 @@ jobs:
10493
versionSpec: '$(python.version)'
10594
displayName: 'Use Python $(python.version)'
10695
- bash: |
107-
. ./scripts/set_ci_env.sh
108-
pip3 install numpy==1.19
96+
. ./scripts/set_ci_env.sh $(python.version)
10997
echo ========================= build DPNP ===============================
11098
./0.build.sh
11199
echo ========================= run tests ===============================

scripts/install_python_deps.sh

Lines changed: 18 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,27 @@
22

33
THEDIR=$(dirname $(readlink -e ${BASH_SOURCE[0]}))
44

5-
echo +++++++++++++++++++++++++ Python prerequisites +++++++++++++++++++++++++++
5+
echo +++++++++++++++++++++++++ Python prerequisites +++++++++++++++++++++++++++++++++
66

7-
echo ========================= PIP3: install prerequisites ===============================
8-
pip3 install numpy cython pytest pytest-valgrind hypothesis
7+
echo ========================= Conda: create environment ============================
8+
PYTHON_VERSION=${1:-3.*}
9+
ENV_NAME=dpnp$PYTHON_VERSION
10+
conda create -q -y -n $ENV_NAME python=$PYTHON_VERSION
11+
. /usr/share/miniconda/etc/profile.d/conda.sh
12+
conda activate $ENV_NAME
913

10-
echo ========================= Conda: install prerequisites ===============================
11-
conda install -y conda-build numpy cython pytest hypothesis
14+
echo ========================= Conda: install prerequisites =========================
15+
# explicitly install mkl blas instead of openblas
16+
# because numpy is installed with openblas for Python 3.9 by default
17+
conda install -y conda-build numpy blas=*=mkl cython pytest hypothesis
1218

13-
echo ========================= SW versions ====================================
19+
echo ========================= Conda: remove mkl ====================================
20+
conda remove mkl --force -y || true
21+
22+
echo ========================= PIP3: install prerequisites ==========================
23+
pip3 install pytest-valgrind
24+
25+
echo ========================= SW versions ==========================================
1426
conda list
1527

1628
python --version

scripts/set_ci_env.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,8 @@ ${THEDIR}/install_system_deps.sh
1717
echo ========================= setup Intel OneAPI python changed to Intel OneAPI ====
1818
. /opt/intel/oneapi/setvars.sh
1919

20-
${THEDIR}/install_python_deps.sh # install any python modules into Intel OneAPI Python
20+
PYTHON_VERSION=$1
21+
${THEDIR}/install_python_deps.sh $PYTHON_VERSION
2122

2223
echo ========================= SW versions ===============================
2324
g++ --version

tests/skipped_tests.tbl

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -429,10 +429,20 @@ tests/third_party/cupy/fft_tests/test_fft.py::TestFft2_param_13_{axes=(0, 1), no
429429
tests/third_party/cupy/fft_tests/test_fft.py::TestFft2_param_13_{axes=(0, 1), norm=None, s=None, shape=(2, 3, 4)}::test_ifft2
430430
tests/third_party/cupy/fft_tests/test_fft.py::TestFft2_param_14_{axes=None, norm='ortho', s=None, shape=(2, 3, 4)}::test_fft2
431431
tests/third_party/cupy/fft_tests/test_fft.py::TestFft2_param_14_{axes=None, norm='ortho', s=None, shape=(2, 3, 4)}::test_ifft2
432+
tests/third_party/cupy/fft_tests/test_fft.py::TestFft2_param_15_{axes=(), norm=None, s=None, shape=(2, 3, 4)}::test_fft2
433+
tests/third_party/cupy/fft_tests/test_fft.py::TestFft2_param_15_{axes=(), norm=None, s=None, shape=(2, 3, 4)}::test_ifft2
434+
tests/third_party/cupy/fft_tests/test_fft.py::TestFft2_param_16_{axes=(0, 1, 2), norm='ortho', s=(2, 3), shape=(2, 3, 4)}::test_fft2
435+
tests/third_party/cupy/fft_tests/test_fft.py::TestFft2_param_16_{axes=(0, 1, 2), norm='ortho', s=(2, 3), shape=(2, 3, 4)}::test_ifft2
432436
tests/third_party/cupy/fft_tests/test_fft.py::TestFft2_param_17_{axes=None, norm=None, s=None, shape=(2, 3, 4, 5)}::test_fft2
433437
tests/third_party/cupy/fft_tests/test_fft.py::TestFft2_param_17_{axes=None, norm=None, s=None, shape=(2, 3, 4, 5)}::test_ifft2
438+
tests/third_party/cupy/fft_tests/test_fft.py::TestFft2_param_18_{axes=None, norm=None, s=None, shape=(0, 5)}::test_fft2
439+
tests/third_party/cupy/fft_tests/test_fft.py::TestFft2_param_18_{axes=None, norm=None, s=None, shape=(0, 5)}::test_ifft2
440+
tests/third_party/cupy/fft_tests/test_fft.py::TestFft2_param_19_{axes=None, norm=None, s=None, shape=(2, 0, 5)}::test_fft2
441+
tests/third_party/cupy/fft_tests/test_fft.py::TestFft2_param_19_{axes=None, norm=None, s=None, shape=(2, 0, 5)}::test_ifft2
434442
tests/third_party/cupy/fft_tests/test_fft.py::TestFft2_param_1_{axes=None, norm=None, s=(1, None), shape=(3, 4)}::test_fft2
435443
tests/third_party/cupy/fft_tests/test_fft.py::TestFft2_param_1_{axes=None, norm=None, s=(1, None), shape=(3, 4)}::test_ifft2
444+
tests/third_party/cupy/fft_tests/test_fft.py::TestFft2_param_20_{axes=None, norm=None, s=None, shape=(0, 0, 5)}::test_fft2
445+
tests/third_party/cupy/fft_tests/test_fft.py::TestFft2_param_20_{axes=None, norm=None, s=None, shape=(0, 0, 5)}::test_ifft2
436446
tests/third_party/cupy/fft_tests/test_fft.py::TestFft2_param_2_{axes=None, norm=None, s=(1, 5), shape=(3, 4)}::test_fft2
437447
tests/third_party/cupy/fft_tests/test_fft.py::TestFft2_param_2_{axes=None, norm=None, s=(1, 5), shape=(3, 4)}::test_ifft2
438448
tests/third_party/cupy/fft_tests/test_fft.py::TestFft2_param_3_{axes=(-2, -1), norm=None, s=None, shape=(3, 4)}::test_fft2
@@ -443,6 +453,8 @@ tests/third_party/cupy/fft_tests/test_fft.py::TestFft2_param_5_{axes=(0,), norm=
443453
tests/third_party/cupy/fft_tests/test_fft.py::TestFft2_param_5_{axes=(0,), norm=None, s=None, shape=(3, 4)}::test_ifft2
444454
tests/third_party/cupy/fft_tests/test_fft.py::TestFft2_param_6_{axes=None, norm='ortho', s=None, shape=(3, 4)}::test_fft2
445455
tests/third_party/cupy/fft_tests/test_fft.py::TestFft2_param_6_{axes=None, norm='ortho', s=None, shape=(3, 4)}::test_ifft2
456+
tests/third_party/cupy/fft_tests/test_fft.py::TestFft2_param_7_{axes=(), norm=None, s=None, shape=(3, 4)}::test_fft2
457+
tests/third_party/cupy/fft_tests/test_fft.py::TestFft2_param_7_{axes=(), norm=None, s=None, shape=(3, 4)}::test_ifft2
446458
tests/third_party/cupy/fft_tests/test_fft.py::TestFft2_param_8_{axes=None, norm=None, s=None, shape=(2, 3, 4)}::test_fft2
447459
tests/third_party/cupy/fft_tests/test_fft.py::TestFft2_param_8_{axes=None, norm=None, s=None, shape=(2, 3, 4)}::test_ifft2
448460
tests/third_party/cupy/fft_tests/test_fft.py::TestFft2_param_9_{axes=None, norm=None, s=(1, 4, None), shape=(2, 3, 4)}::test_fft2
@@ -465,12 +477,20 @@ tests/third_party/cupy/fft_tests/test_fft.py::TestFftn_param_16_{axes=None, norm
465477
tests/third_party/cupy/fft_tests/test_fft.py::TestFftn_param_16_{axes=None, norm='ortho', s=None, shape=(2, 3, 4)}::test_ifftn
466478
tests/third_party/cupy/fft_tests/test_fft.py::TestFftn_param_17_{axes=(), norm='ortho', s=None, shape=(2, 3, 4)}::test_fftn
467479
tests/third_party/cupy/fft_tests/test_fft.py::TestFftn_param_17_{axes=(), norm='ortho', s=None, shape=(2, 3, 4)}::test_ifftn
480+
tests/third_party/cupy/fft_tests/test_fft.py::TestFftn_param_18_{axes=(0, 1, 2), norm='ortho', s=(2, 3), shape=(2, 3, 4)}::test_fftn
481+
tests/third_party/cupy/fft_tests/test_fft.py::TestFftn_param_18_{axes=(0, 1, 2), norm='ortho', s=(2, 3), shape=(2, 3, 4)}::test_ifftn
468482
tests/third_party/cupy/fft_tests/test_fft.py::TestFftn_param_19_{axes=(2, 0, 1), norm='ortho', s=(4, 3, 2), shape=(2, 3, 4)}::test_fftn
469483
tests/third_party/cupy/fft_tests/test_fft.py::TestFftn_param_19_{axes=(2, 0, 1), norm='ortho', s=(4, 3, 2), shape=(2, 3, 4)}::test_ifftn
470484
tests/third_party/cupy/fft_tests/test_fft.py::TestFftn_param_1_{axes=None, norm=None, s=(1, None), shape=(3, 4)}::test_fftn
471485
tests/third_party/cupy/fft_tests/test_fft.py::TestFftn_param_1_{axes=None, norm=None, s=(1, None), shape=(3, 4)}::test_ifftn
472486
tests/third_party/cupy/fft_tests/test_fft.py::TestFftn_param_20_{axes=None, norm=None, s=None, shape=(2, 3, 4, 5)}::test_fftn
473487
tests/third_party/cupy/fft_tests/test_fft.py::TestFftn_param_20_{axes=None, norm=None, s=None, shape=(2, 3, 4, 5)}::test_ifftn
488+
tests/third_party/cupy/fft_tests/test_fft.py::TestFftn_param_21_{axes=None, norm=None, s=None, shape=(0, 5)}::test_fftn
489+
tests/third_party/cupy/fft_tests/test_fft.py::TestFftn_param_21_{axes=None, norm=None, s=None, shape=(0, 5)}::test_ifftn
490+
tests/third_party/cupy/fft_tests/test_fft.py::TestFftn_param_22_{axes=None, norm=None, s=None, shape=(2, 0, 5)}::test_fftn
491+
tests/third_party/cupy/fft_tests/test_fft.py::TestFftn_param_22_{axes=None, norm=None, s=None, shape=(2, 0, 5)}::test_ifftn
492+
tests/third_party/cupy/fft_tests/test_fft.py::TestFftn_param_23_{axes=None, norm=None, s=None, shape=(0, 0, 5)}::test_fftn
493+
tests/third_party/cupy/fft_tests/test_fft.py::TestFftn_param_23_{axes=None, norm=None, s=None, shape=(0, 0, 5)}::test_ifftn
474494
tests/third_party/cupy/fft_tests/test_fft.py::TestFftn_param_2_{axes=None, norm=None, s=(1, 5), shape=(3, 4)}::test_fftn
475495
tests/third_party/cupy/fft_tests/test_fft.py::TestFftn_param_2_{axes=None, norm=None, s=(1, 5), shape=(3, 4)}::test_ifftn
476496
tests/third_party/cupy/fft_tests/test_fft.py::TestFftn_param_3_{axes=(-2, -1), norm=None, s=None, shape=(3, 4)}::test_fftn
@@ -481,6 +501,8 @@ tests/third_party/cupy/fft_tests/test_fft.py::TestFftn_param_5_{axes=[-1, -2], n
481501
tests/third_party/cupy/fft_tests/test_fft.py::TestFftn_param_5_{axes=[-1, -2], norm=None, s=None, shape=(3, 4)}::test_ifftn
482502
tests/third_party/cupy/fft_tests/test_fft.py::TestFftn_param_6_{axes=(0,), norm=None, s=None, shape=(3, 4)}::test_fftn
483503
tests/third_party/cupy/fft_tests/test_fft.py::TestFftn_param_6_{axes=(0,), norm=None, s=None, shape=(3, 4)}::test_ifftn
504+
tests/third_party/cupy/fft_tests/test_fft.py::TestFftn_param_7_{axes=(), norm=None, s=None, shape=(3, 4)}::test_fftn
505+
tests/third_party/cupy/fft_tests/test_fft.py::TestFftn_param_7_{axes=(), norm=None, s=None, shape=(3, 4)}::test_ifftn
484506
tests/third_party/cupy/fft_tests/test_fft.py::TestFftn_param_8_{axes=None, norm='ortho', s=None, shape=(3, 4)}::test_fftn
485507
tests/third_party/cupy/fft_tests/test_fft.py::TestFftn_param_8_{axes=None, norm='ortho', s=None, shape=(3, 4)}::test_ifftn
486508
tests/third_party/cupy/fft_tests/test_fft.py::TestFftn_param_9_{axes=None, norm=None, s=None, shape=(2, 3, 4)}::test_fftn
@@ -1755,6 +1777,8 @@ tests/third_party/cupy/statistics_tests/test_histogram.py::TestHistogram::test_h
17551777
tests/third_party/cupy/statistics_tests/test_histogram.py::TestHistogram::test_histogram_weights_basic
17561778
tests/third_party/cupy/statistics_tests/test_histogram.py::TestHistogram::test_histogram_weights_mismatch
17571779
tests/third_party/cupy/statistics_tests/test_meanvar.py::TestAverage::test_average_all
1780+
tests/third_party/cupy/statistics_tests/test_meanvar.py::TestMeanVar::test_external_mean_axis
1781+
tests/third_party/cupy/statistics_tests/test_meanvar.py::TestMeanVar::test_mean_axis
17581782
tests/third_party/cupy/statistics_tests/test_meanvar.py::TestNanMeanAdditional::test_nanmean_all_nan
17591783
tests/third_party/cupy/statistics_tests/test_meanvar.py::TestNanMeanAdditional::test_nanmean_float16
17601784
tests/third_party/cupy/statistics_tests/test_meanvar.py::TestNanMeanAdditional::test_nanmean_huge

tests/skipped_tests_gpu.tbl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2123,6 +2123,8 @@ tests/third_party/cupy/statistics_tests/test_histogram.py::TestHistogram::test_h
21232123
tests/third_party/cupy/statistics_tests/test_histogram.py::TestHistogram::test_histogram_weights_basic
21242124
tests/third_party/cupy/statistics_tests/test_histogram.py::TestHistogram::test_histogram_weights_mismatch
21252125
tests/third_party/cupy/statistics_tests/test_meanvar.py::TestAverage::test_average_all
2126+
tests/third_party/cupy/statistics_tests/test_meanvar.py::TestMeanVar::test_external_mean_axis
2127+
tests/third_party/cupy/statistics_tests/test_meanvar.py::TestMeanVar::test_mean_axis
21262128
tests/third_party/cupy/statistics_tests/test_meanvar.py::TestNanMeanAdditional::test_nanmean_all_nan
21272129
tests/third_party/cupy/statistics_tests/test_meanvar.py::TestNanMeanAdditional::test_nanmean_float16
21282130
tests/third_party/cupy/statistics_tests/test_meanvar.py::TestNanMeanAdditional::test_nanmean_huge

tests/test_dot.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ def test_dot_arange(type):
3333

3434
result = inp.dot(ia, ib)
3535
expected = numpy.dot(a, b)
36-
numpy.testing.assert_array_equal(expected, result)
36+
numpy.testing.assert_allclose(expected, result)
3737

3838

3939
@pytest.mark.parametrize("type",

utils/command_build_clib.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@
142142
"""
143143
_project_cmplr_macro += [("MKL_ILP64", "1")] # using 64bit integers in MKL interface (long)
144144
if IS_LIN:
145-
_mathlibs = ["mkl_rt", "mkl_sycl", "mkl_intel_ilp64", "mkl_sequential",
145+
_mathlibs = ["mkl_sycl", "mkl_intel_ilp64", "mkl_sequential",
146146
"mkl_core", "sycl", "OpenCL", "pthread", "m", "dl"]
147147
elif IS_WIN:
148148
_mathlibs = ["mkl_sycl", "mkl_intel_ilp64", "mkl_tbb_thread", "mkl_core", "sycl", "OpenCL", "tbb"]

0 commit comments

Comments
 (0)