Skip to content

Commit 525116a

Browse files
npolina4antonwolfy
andauthored
Require dpcpp compiler 2024.0 and runtime >=2024.0 (#1625)
* Require dpcpp compiler 2024.0 and runtime >=2024.0 * fix build error * Pinned compiler and dpctl versions * Rolled back to intel channel for conda build * Power is properly working for complex types with latest dpctl * Keep backward compatibility with dpctl 0.15.0 * Install dpctl version compatible with DPC++ 2023.2 while collecting coverage --------- Co-authored-by: Anton Volkov <antonwolfy@gmail.com> Co-authored-by: Anton <100830759+antonwolfy@users.noreply.github.com>
1 parent 5bcf910 commit 525116a

File tree

4 files changed

+16
-13
lines changed

4 files changed

+16
-13
lines changed

.github/workflows/build-sphinx.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ jobs:
9191
9292
- name: Install dpnp dependencies
9393
run: |
94-
conda install numpy"<1.24" dpctl">=0.15.0" mkl-devel-dpcpp onedpl-devel tbb-devel dpcpp_linux-64 \
94+
conda install numpy"<1.24" dpctl">=0.15.1dev2" mkl-devel-dpcpp onedpl-devel tbb-devel dpcpp_linux-64 \
9595
cmake cython pytest ninja scikit-build sysroot_linux-64">=2.28" ${{ env.CHANNELS }}
9696
9797
- name: Install cuPy dependencies

.github/workflows/generate_coverage.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515

1616
env:
1717
python-ver: '3.10'
18-
CHANNELS: '-c dppy/label/dev -c intel -c conda-forge --override-channels'
18+
CHANNELS: '-c dppy/label/coverage -c intel -c conda-forge --override-channels'
1919

2020
steps:
2121
- name: Cancel Previous Runs
@@ -44,7 +44,7 @@ jobs:
4444
run: |
4545
# use DPC++ compiler 2023.2 to work around an issue with crash
4646
conda install cython llvm cmake">=3.21" scikit-build ninja pytest pytest-cov coverage[toml] \
47-
dpctl dpcpp_linux-64"=2023.2" sysroot_linux-64">=2.28" mkl-devel-dpcpp tbb-devel"=2021.10" \
47+
dpctl">=0.15.1dev2" dpcpp_linux-64"=2023.2" sysroot_linux-64">=2.28" mkl-devel-dpcpp tbb-devel"=2021.10" \
4848
onedpl-devel ${{ env.CHANNELS }}
4949
5050
- name: Conda info

conda-recipe/meta.yaml

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
{% set required_compiler_and_mkl_version = "2024.0" %}
2+
{% set required_dpctl_version = "0.15.1dev2" %}
3+
14
package:
25
name: dpnp
36
version: {{ GIT_DESCRIBE_TAG }}
@@ -13,19 +16,19 @@ requirements:
1316
- cmake >=3.21
1417
- ninja
1518
- git
16-
- dpctl >=0.15.0
17-
- mkl-devel-dpcpp {{ environ.get('MKL_VER', '>=2023.2.0') }}
19+
- dpctl >={{ required_dpctl_version }}
20+
- mkl-devel-dpcpp >={{ required_compiler_and_mkl_version }}
1821
- onedpl-devel
1922
- tbb-devel
2023
- wheel
2124
- scikit-build
2225
build:
2326
- {{ compiler('cxx') }}
24-
- {{ compiler('dpcpp') }} >=2023.2.0 # [not osx]
27+
- {{ compiler('dpcpp') }} >={{ required_compiler_and_mkl_version }} # [not osx]
2528
- sysroot_linux-64 >=2.28 # [linux]
2629
run:
2730
- python
28-
- dpctl >=0.15.0
31+
- {{ pin_compatible('dpctl', min_pin='x.x.x', max_pin=None) }}
2932
- {{ pin_compatible('dpcpp-cpp-rt', min_pin='x.x', max_pin='x') }}
3033
- {{ pin_compatible('mkl-dpcpp', min_pin='x.x', max_pin='x') }}
3134
- {{ pin_compatible('numpy', min_pin='x.x', max_pin='x') }}

tests/test_mathematical.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1876,13 +1876,13 @@ def test_complex_values(self):
18761876
dp_arr = dpnp.array(np_arr)
18771877
func = lambda x: x**2
18781878

1879-
# Linux: ((inf + 0j) ** 2) == (Inf + NaNj) in dpnp and == (NaN + NaNj) in numpy
1880-
# Win: ((inf + 0j) ** 2) == (Inf + 0j) in dpnp and == (Inf + NaNj) in numpy
1879+
# TODO: unmute the test once it's available
18811880
if is_win_platform():
1882-
assert_equal(func(dp_arr)[5], numpy.inf)
1883-
else:
1884-
assert_equal(func(dp_arr)[5], (numpy.inf + 0j) * 1)
1885-
assert_allclose(func(np_arr)[:5], func(dp_arr).asnumpy()[:5], rtol=1e-6)
1881+
pytest.skip(
1882+
"Until the latest dpctl is available on internal channel"
1883+
)
1884+
1885+
assert_dtype_allclose(func(dp_arr), func(np_arr))
18861886

18871887
@pytest.mark.parametrize("val", [0, 1], ids=["0", "1"])
18881888
@pytest.mark.parametrize("dtype", [dpnp.int32, dpnp.int64])

0 commit comments

Comments
 (0)