Repository: IntelPython/dpnp (language: python)

Issue:
Cherry pick commits from gold
The following commit are picked from `gold/2021`.
[3fb4f24](https://github.com/IntelPython/dpnp/pull/1619/commits/3fb4f245362f8ddebc3a5c824c4422776578129e), [b5d0de3](https://github.com/IntelPython/dpnp/pull/1619/commits/b5d0de316b0e58cf299a27a60476b6aa08745d0d), [105ffd1](https://github.com/IntelPython/dpnp/pull/1619/commits/105ffd1aac8b50bd8a782a01f7f870e35d983d5c) and [4c5f844](https://github.com/IntelPython/dpnp/pull/1619/commits/4c5f8449686b0be6f71473e0bf7e55e4450a4920)

- [x] Have you provided a meaningful PR description?
- [ ] Have you added a test, reproducer or referred to issue with a reproducer?
- [ ] Have you tested your changes locally for CPU and GPU devices?
- [ ] Have you made sure that new changes do not introduce compiler warnings?
- [ ] Have you checked performance impact of proposed changes?
- [ ] If this PR is a work in progress, are you filing the PR as a draft?



Discussion / hints:
<!-- add-pr-comment:add-pr-comment -->

View rendered docs @ https://intelpython.github.io/dpnp/pull/1623/index.html

Fix patch:
diff --git a/.github/workflows/build-sphinx.yml b/.github/workflows/build-sphinx.yml
index 8dc54185f0a..90efdc044c9 100644
--- a/.github/workflows/build-sphinx.yml
+++ b/.github/workflows/build-sphinx.yml
@@ -91,7 +91,7 @@ jobs:
 
       - name: Install dpnp dependencies
         run: |
-          conda install numpy"<1.24" dpctl">=0.15.0" mkl-devel-dpcpp onedpl-devel tbb-devel dpcpp_linux-64 \
+          conda install numpy"<1.24" dpctl">=0.15.1dev2" mkl-devel-dpcpp onedpl-devel tbb-devel dpcpp_linux-64 \
               cmake cython pytest ninja scikit-build sysroot_linux-64">=2.28" ${{ env.CHANNELS }}
 
       - name: Install cuPy dependencies
diff --git a/.github/workflows/generate_coverage.yaml b/.github/workflows/generate_coverage.yaml
index f52d2dcb6e1..9d6b2e511f4 100644
--- a/.github/workflows/generate_coverage.yaml
+++ b/.github/workflows/generate_coverage.yaml
@@ -15,7 +15,7 @@ jobs:
 
     env:
       python-ver: '3.10'
-      CHANNELS: '-c dppy/label/dev -c intel -c conda-forge --override-channels'
+      CHANNELS: '-c dppy/label/coverage -c intel -c conda-forge --override-channels'
 
     steps:
       - name: Cancel Previous Runs
@@ -44,7 +44,7 @@ jobs:
         run: |
           # use DPC++ compiler 2023.2 to work around an issue with crash
           conda install cython llvm cmake">=3.21" scikit-build ninja pytest pytest-cov coverage[toml] \
-              dpctl dpcpp_linux-64"=2023.2" sysroot_linux-64">=2.28" mkl-devel-dpcpp tbb-devel"=2021.10" \
+              dpctl">=0.15.1dev2" dpcpp_linux-64"=2023.2" sysroot_linux-64">=2.28" mkl-devel-dpcpp tbb-devel"=2021.10" \
               onedpl-devel ${{ env.CHANNELS }}
 
       - name: Conda info
diff --git a/conda-recipe/meta.yaml b/conda-recipe/meta.yaml
index dd77870dee5..874f02bbae3 100644
--- a/conda-recipe/meta.yaml
+++ b/conda-recipe/meta.yaml
@@ -1,3 +1,6 @@
+{% set required_compiler_and_mkl_version = "2024.0" %}
+{% set required_dpctl_version = "0.15.1dev2" %}
+
 package:
     name: dpnp
     version: {{ GIT_DESCRIBE_TAG }}
@@ -13,19 +16,19 @@ requirements:
       - cmake >=3.21
       - ninja
       - git
-      - dpctl >=0.15.0
-      - mkl-devel-dpcpp {{ environ.get('MKL_VER', '>=2023.2.0') }}
+      - dpctl >={{ required_dpctl_version }}
+      - mkl-devel-dpcpp >={{ required_compiler_and_mkl_version }}
       - onedpl-devel
       - tbb-devel
       - wheel
       - scikit-build
     build:
       - {{ compiler('cxx') }}
-      - {{ compiler('dpcpp') }}  >=2023.2.0  # [not osx]
+      - {{ compiler('dpcpp') }} >={{ required_compiler_and_mkl_version }}  # [not osx]
       - sysroot_linux-64 >=2.28 # [linux]
     run:
       - python
-      - dpctl >=0.15.0
+      - {{ pin_compatible('dpctl', min_pin='x.x.x', max_pin=None) }}
       - {{ pin_compatible('dpcpp-cpp-rt', min_pin='x.x', max_pin='x') }}
       - {{ pin_compatible('mkl-dpcpp', min_pin='x.x', max_pin='x') }}
       - {{ pin_compatible('numpy', min_pin='x.x', max_pin='x') }}


Test patch:
diff --git a/tests/test_mathematical.py b/tests/test_mathematical.py
index 89a09a7dc29..b0c8caff3ad 100644
--- a/tests/test_mathematical.py
+++ b/tests/test_mathematical.py
@@ -1876,13 +1876,13 @@ def test_complex_values(self):
         dp_arr = dpnp.array(np_arr)
         func = lambda x: x**2
 
-        # Linux: ((inf + 0j) ** 2) == (Inf + NaNj) in dpnp and == (NaN + NaNj) in numpy
-        # Win:   ((inf + 0j) ** 2) == (Inf + 0j)   in dpnp and == (Inf + NaNj) in numpy
+        # TODO: unmute the test once it's available
         if is_win_platform():
-            assert_equal(func(dp_arr)[5], numpy.inf)
-        else:
-            assert_equal(func(dp_arr)[5], (numpy.inf + 0j) * 1)
-        assert_allclose(func(np_arr)[:5], func(dp_arr).asnumpy()[:5], rtol=1e-6)
+            pytest.skip(
+                "Until the latest dpctl is available on internal channel"
+            )
+
+        assert_dtype_allclose(func(dp_arr), func(np_arr))
 
     @pytest.mark.parametrize("val", [0, 1], ids=["0", "1"])
     @pytest.mark.parametrize("dtype", [dpnp.int32, dpnp.int64])