Skip to content

Commit fb92b4f

Browse files
Merge pull request #1569 from IntelPython/merge_to_gold_rc2
Merge 0.13.0rc2 into gold/2021
2 parents 81b7861 + 1bcc10a commit fb92b4f

File tree

91 files changed

+6934
-3065
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

91 files changed

+6934
-3065
lines changed

.github/workflows/conda-package.yml

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ env:
1515
test_arraycreation.py
1616
test_dot.py
1717
test_dparray.py
18+
test_copy.py
1819
test_fft.py
1920
test_linalg.py
2021
test_logic.py
@@ -23,12 +24,16 @@ env:
2324
test_random_state.py
2425
test_sort.py
2526
test_special.py
27+
test_sycl_queue.py
2628
test_umath.py
2729
test_usm_type.py
2830
third_party/cupy/linalg_tests/test_product.py
31+
third_party/cupy/logic_tests/test_comparison.py
2932
third_party/cupy/logic_tests/test_truth.py
3033
third_party/cupy/manipulation_tests/test_basic.py
3134
third_party/cupy/manipulation_tests/test_join.py
35+
third_party/cupy/manipulation_tests/test_rearrange.py
36+
third_party/cupy/manipulation_tests/test_transpose.py
3237
third_party/cupy/math_tests/test_explog.py
3338
third_party/cupy/math_tests/test_misc.py
3439
third_party/cupy/math_tests/test_trigonometric.py
@@ -43,7 +48,7 @@ jobs:
4348

4449
strategy:
4550
matrix:
46-
python: ['3.8', '3.9', '3.10', '3.11']
51+
python: ['3.9', '3.10', '3.11']
4752
os: [ubuntu-20.04, windows-latest]
4853

4954
runs-on: ${{ matrix.os }}
@@ -120,7 +125,7 @@ jobs:
120125

121126
strategy:
122127
matrix:
123-
python: ['3.8', '3.9', '3.10', '3.11']
128+
python: ['3.9', '3.10', '3.11']
124129
os: [ubuntu-20.04, ubuntu-latest]
125130

126131
continue-on-error: true
@@ -221,7 +226,7 @@ jobs:
221226

222227
strategy:
223228
matrix:
224-
python: ['3.8', '3.9', '3.10', '3.11']
229+
python: ['3.9', '3.10', '3.11']
225230

226231
continue-on-error: true
227232

@@ -353,7 +358,7 @@ jobs:
353358

354359
strategy:
355360
matrix:
356-
python: ['3.8', '3.9', '3.10', '3.11']
361+
python: ['3.9', '3.10', '3.11']
357362
os: [ubuntu-20.04, windows-latest]
358363

359364
runs-on: ${{ matrix.os }}

.github/workflows/generate_coverage.yaml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,7 @@ jobs:
4949
conda list
5050
- name: Build dpnp with coverage
5151
run: |
52-
python scripts/gen_coverage.py --pytest-opts="--ignore tests/test_random.py \
53-
--ignore tests/test_strides.py"
52+
python scripts/gen_coverage.py --pytest-opts="--ignore tests/test_random.py"
5453
- name: Install coverall dependencies
5554
run: |
5655
sudo gem install coveralls-lcov

CHANGELOG.md

Lines changed: 55 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,66 @@ All notable changes to this project will be documented in this file.
44
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
55
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
66

7-
## [0.12.2] - TBA
7+
## [0.13.0] - TBA
88

99
### Added
1010

11+
* Added implementation of flipping functions: `dpnp.flip`, `dpnp.fliplr` and `dpnp.flipud` [#1543](https://github.com/IntelPython/dpnp/pull/1543)
12+
* Added implementation of `dpnp.rint` function through `dpnp.round` call [#1537](https://github.com/IntelPython/dpnp/pull/1537)
13+
* Added in-place support for arithmetic operators [#1530](https://github.com/IntelPython/dpnp/pull/1530)
14+
* Dropped build and uploading the package with `python=3.8` to `dppy/label/dev` channel of Anaconda [#1534](https://github.com/IntelPython/dpnp/pull/1534)
15+
* Implemented build and uploading the package with `python=3.11` to `dppy/label/dev` channel of Anaconda [#1501](https://github.com/IntelPython/dpnp/pull/1501)
16+
* Added the versioneer to compute a product version number [#1497](https://github.com/IntelPython/dpnp/pull/1497)
17+
* Added `cython` support of `3.0.0` or above version [#1495](https://github.com/IntelPython/dpnp/pull/1495)
18+
1119
### Changed
1220

21+
* Updated `Build from source` section in `README.md` to state all the required prerequisite packages [#1553](https://github.com/IntelPython/dpnp/pull/1553)
22+
* Reworked `dpnp.hstack` and `dpnp.atleast_1d` through existing functions to get rid of falling back on NumPy [#1544](https://github.com/IntelPython/dpnp/pull/1544)
23+
* Reworked `dpnp.asfarray` through existing functions to get rid of falling back on NumPy [#1542](https://github.com/IntelPython/dpnp/pull/1542)
24+
* Converted from `raw` to `multi_ptr` with `address_space_cast` to adopt towards changes introduced in `SYCL 2020` [#1538](https://github.com/IntelPython/dpnp/pull/1538)
25+
* Updated install instruction via `pip` [#1531](https://github.com/IntelPython/dpnp/pull/1531)
26+
* Reworked `dpnp.copyto` through existing functions instead of a separate kernel [#1516](https://github.com/IntelPython/dpnp/pull/1516)
27+
* Aligned default order value with NumPy in asarray-like functions [#1526](https://github.com/IntelPython/dpnp/pull/1526)
28+
* Created unary and binary elementwise functions at module import [#1522](https://github.com/IntelPython/dpnp/pull/1522)
29+
* Redesigned trigonometric and hyperbolic functions through pybind11 extension of OneMKL calls where possible or leveraging on `dpctl.tensor` implementation [#1545](https://github.com/IntelPython/dpnp/pull/1545)
30+
* Added `dpnp.signbit` and `dpnp.proj` functions implemented through pybind11 extension of OneMKL calls where possible or leveraging on `dpctl.tensor` implementation [#1535](https://github.com/IntelPython/dpnp/pull/1535)
31+
* Redesigned `dpnp.round` and `dpnp.around` functions through pybind11 extension of OneMKL calls where possible or leveraging on `dpctl.tensor` implementation [#1520](https://github.com/IntelPython/dpnp/pull/1520)
32+
* Redesigned `dpnp.sign` and `dpnp.negative` functions through pybind11 extension of OneMKL calls where possible or leveraging on `dpctl.tensor` implementation [#1523](https://github.com/IntelPython/dpnp/pull/1523)
33+
* Redesigned `dpnp.conjugate` and `dpnp.conj` functions through pybind11 extension of OneMKL calls where possible or leveraging on `dpctl.tensor` implementation [#1519](https://github.com/IntelPython/dpnp/pull/1519)
34+
* Redesigned `dpnp.ceil`, `dpnp.floor` and `dpnp.trunc` functions through pybind11 extension of OneMKL calls where possible or leveraging on `dpctl.tensor` implementation [#1518](https://github.com/IntelPython/dpnp/pull/1518)
35+
* Redesigned `dpnp.remainder` and `dpnp.mod` functions through pybind11 extension of OneMKL calls where possible or leveraging on `dpctl.tensor` implementation [#1515](https://github.com/IntelPython/dpnp/pull/1515)
36+
* Redesigned `dpnp.power` function through pybind11 extension of OneMKL calls where possible or leveraging on `dpctl.tensor` implementation [#1476](https://github.com/IntelPython/dpnp/pull/1476)
37+
* Leveraged `dpctl.tensor` implementation for `dpnp.put` function [#1529](https://github.com/IntelPython/dpnp/pull/1529)
38+
* Leveraged `dpctl.tensor` implementation for `dpnp.roll` and `dpnp.rollaxis` functions [#1517](https://github.com/IntelPython/dpnp/pull/1517)
39+
* Leveraged `dpctl.tensor` implementation for `dpnp.copy` function [#1540](https://github.com/IntelPython/dpnp/pull/1540)
40+
* Leveraged `dpctl.tensor` implementation for `dpnp.expand_dims` and `dpnp.swapaxes` functions [#1532](https://github.com/IntelPython/dpnp/pull/1532)
41+
* Leveraged `dpctl.tensor` implementation for bitwise operations [#1508](https://github.com/IntelPython/dpnp/pull/1508)
42+
* Leveraged `dpctl.tensor` implementation for `dpnp.all` and `dpnp.any` functions [#1512](https://github.com/IntelPython/dpnp/pull/1512)
43+
* Leveraged `dpctl.tensor` implementation for `dpnp.stack` function [#1509](https://github.com/IntelPython/dpnp/pull/1509)
44+
* Leveraged `dpctl.tensor` implementation for `dpnp.concatenate` function [#1507](https://github.com/IntelPython/dpnp/pull/1507)
45+
* Leveraged `dpctl.tensor` implementation for `dpnp.isnan`, `dpnp.isinf` and `dpnp.isfinite` functions [#1504](https://github.com/IntelPython/dpnp/pull/1504)
46+
* Leveraged `dpctl.tensor` implementation for `dpnp.take` function [#1492](https://github.com/IntelPython/dpnp/pull/1492)
47+
* Refreshed API References block in the documentation [#1490](https://github.com/IntelPython/dpnp/pull/1490)
48+
* Refreshed documentation to reflect an actual product behavior [#1485](https://github.com/IntelPython/dpnp/pull/1485)
49+
* Upgraded the build flow to use newer `pybind11=2.11.1` version [#1510](https://github.com/IntelPython/dpnp/pull/1510)
50+
* Updated pre-commit hooks to run with `flake8=6.1.0` and `black=23.7.0` [#1505](https://github.com/IntelPython/dpnp/pull/1505)
51+
* Pinned DPC++ and OneMKL versions to `2023.2`` release [#1496](https://github.com/IntelPython/dpnp/pull/1496)
52+
* Added a specialized kernel for F-contiguous arrays to `dpnp.sum` with `axis=1` [#1489](https://github.com/IntelPython/dpnp/pull/1489)
53+
* Removed a workaround to Klockwork since it is not used anymore due to transition to Coverity tool [#1493](https://github.com/IntelPython/dpnp/pull/1493)
54+
1355
### Fixed
1456

57+
* Resolved `Logically dead code` issue addressed by Coverity scan [#1541](https://github.com/IntelPython/dpnp/pull/1541)
58+
* Resolved `Arguments in wrong order` issue addressed by Coverity scan [#1513](https://github.com/IntelPython/dpnp/pull/1513)
59+
* Resolved `Pointer to local outside scope` issue addressed by Coverity scan [#1514](https://github.com/IntelPython/dpnp/pull/1514)
60+
* Fixed assigning a value to potentially none-valued dictionary coverage generation script [#1511](https://github.com/IntelPython/dpnp/pull/1511)
61+
* Resolved issues with running `dpnp.allclose` function on a device without fp64 support [#1536](https://github.com/IntelPython/dpnp/pull/1536)
62+
* Resolved issues with running FFT functions on a device without fp64 support [#1524](https://github.com/IntelPython/dpnp/pull/1524)
63+
* Resolved issues with running mathematical functions on a device without fp64 support [#1502](https://github.com/IntelPython/dpnp/pull/1502)
64+
* Resolved issues with running random functions on a device without fp64 support [#1498](https://github.com/IntelPython/dpnp/pull/1498)
65+
* Resolved issues with running statistics functions on a device without fp64 support [#1494](https://github.com/IntelPython/dpnp/pull/1494)
66+
1567
## [0.12.1] - 07/18/2023
1668

1769
### Added
@@ -29,8 +81,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
2981
* Pinned to `dpctl>=0.14.5` as host and run dependencies [#1481](https://github.com/IntelPython/dpnp/pull/1481)
3082
* Pinned dependent `cython` package to a version less than `3.0.0` [#1480](https://github.com/IntelPython/dpnp/pull/1480)
3183
* Added a specialized kernel for `dpnp.sum` with `axis=0` as a pybind11 extension [#1479](https://github.com/IntelPython/dpnp/pull/1479)
32-
* Redesigned `dpnp.square` function through pybind11 extension of OneMKL call where possible or Leveraging on `dpctl.tensor` implementation [#1473](https://github.com/IntelPython/dpnp/pull/1473)
33-
* Redesigned `dpnp.cos` and `dpnp.sin` functions through pybind11 extension of OneMKL calls where possible or Leveraging on `dpctl.tensor` implementation [#1471](https://github.com/IntelPython/dpnp/pull/1471)
84+
* Redesigned `dpnp.square` function through pybind11 extension of OneMKL call where possible or leveraging on `dpctl.tensor` implementation [#1473](https://github.com/IntelPython/dpnp/pull/1473)
85+
* Redesigned `dpnp.cos` and `dpnp.sin` functions through pybind11 extension of OneMKL calls where possible or leveraging on `dpctl.tensor` implementation [#1471](https://github.com/IntelPython/dpnp/pull/1471)
3486
* Redesigned `dpnp.sqrt` function through pybind11 extension of OneMKL call where possible or leveraging on `dpctl.tensor` implementation [#1470](https://github.com/IntelPython/dpnp/pull/1470)
3587
* Redesigned `dpnp.log` function through pybind11 extension of OneMKL call where possible or leveraging on `dpctl.tensor` implementation [#1469](https://github.com/IntelPython/dpnp/pull/1469)
3688
* Leveraged `dpctl.tensor` implementation for logical operations [#1464](https://github.com/IntelPython/dpnp/pull/1464)

CMakeLists.txt

Lines changed: 31 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,16 +28,43 @@ set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${DPCTL_MODULE_PATH})
2828

2929

3030
find_package(IntelDPCPP REQUIRED)
31-
find_package(TBB REQUIRED PATHS ${CMAKE_SOURCE_DIR}/dpnp/backend/cmake/Modules NO_DEFAULT_PATH)
31+
find_package(TBB QUIET)
32+
if(TBB_FOUND)
33+
find_package(TBB REQUIRED)
34+
else()
35+
find_package(TBB REQUIRED PATHS ${CMAKE_SOURCE_DIR}/dpnp/backend/cmake/Modules NO_DEFAULT_PATH)
36+
endif()
3237

3338
set(MKL_ARCH "intel64")
3439
set(MKL_LINK "dynamic")
35-
set(MKL_INTERFACE_FULL "intel_ilp64")
3640
set(MKL_THREADING "tbb_thread")
37-
find_package(MKL REQUIRED PATHS ${CMAKE_SOURCE_DIR}/dpnp/backend/cmake/Modules NO_DEFAULT_PATH)
41+
set(MKL_VERSION_2024 FALSE)
42+
find_package(MKL QUIET)
43+
if(MKL_FOUND)
44+
if(MKL_VERSION VERSION_GREATER_EQUAL "2024.0.0")
45+
set(MKL_VERSION_2024 TRUE)
46+
set(MKL_INTERFACE "ilp64")
47+
find_package(MKL REQUIRED)
48+
endif()
49+
endif()
50+
51+
if(NOT MKL_VERSION_2024)
52+
set(MKL_INTERFACE_FULL "intel_ilp64")
53+
find_package(MKL REQUIRED PATHS ${CMAKE_SOURCE_DIR}/dpnp/backend/cmake/Modules NO_DEFAULT_PATH)
54+
endif()
3855

3956
set(ONEDPL_PAR_BACKEND tbb)
40-
find_package(oneDPL REQUIRED PATHS ${CMAKE_SOURCE_DIR}/dpnp/backend/cmake/Modules NO_DEFAULT_PATH)
57+
find_package(oneDPL QUIET)
58+
if(oneDPL_FOUND)
59+
if(oneDPL_VERSION VERSION_GREATER_EQUAL "2022.3.0")
60+
find_package(oneDPL REQUIRED)
61+
else()
62+
find_package(oneDPL REQUIRED PATHS ${CMAKE_SOURCE_DIR}/dpnp/backend/cmake/Modules NO_DEFAULT_PATH)
63+
endif()
64+
else()
65+
find_package(oneDPL REQUIRED PATHS ${CMAKE_SOURCE_DIR}/dpnp/backend/cmake/Modules NO_DEFAULT_PATH)
66+
endif()
67+
4168

4269
include(GNUInstallDirs)
4370

README.md

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,19 @@
1515
## Build from source:
1616
Ensure you have the following prerequisite packages installed:
1717

18-
- `mkl-devel-dpcpp`
18+
- `cython`
19+
- `cmake >=3.21`
1920
- `dpcpp_linux-64` or `dpcpp_win-64` (depending on your OS)
21+
- `dpctl`
22+
- `mkl-devel-dpcpp`
2023
- `onedpl-devel`
24+
- `ninja`
25+
- `numpy >=1.19,<1.25a0`
26+
- `python`
27+
- `scikit-build`
28+
- `setuptools`
29+
- `sysroot_linux-64 >=2.28` (only on Linux OS)
2130
- `tbb-devel`
22-
- `dpctl`
2331

2432
After these steps, `dpnp` can be built in debug mode as follows:
2533

doc/reference/manipulation.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ Transpose-like operations
3535
:nosignatures:
3636

3737
dpnp.moveaxis
38+
dpnp.roll
3839
dpnp.rollaxis
3940
dpnp.swapaxes
4041
dpnp.ndarray.T

doc/reference/math.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -169,6 +169,7 @@ Handling complex numbers
169169
dpnp.imag
170170
dpnp.conj
171171
dpnp.conjugate
172+
dpnp.proj
172173

173174

174175
Extrema Finding

doc/reference/ufunc.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ Math operations
4242
dpnp.log10
4343
dpnp.expm1
4444
dpnp.log1p
45+
dpnp.proj
4546
dpnp.sqrt
4647
dpnp.square
4748
dpnp.reciprocal

dpnp/backend/CMakeLists.txt

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,12 @@ if(DPNP_GENERATE_COVERAGE)
8989
target_link_options(${_trgt} PRIVATE -fprofile-instr-generate -fcoverage-mapping)
9090
endif()
9191

92-
target_link_libraries(${_trgt} PUBLIC MKL::MKL_DPCPP)
92+
if (MKL_VERSION_2024)
93+
target_link_libraries(${_trgt} PUBLIC MKL::MKL_SYCL)
94+
else()
95+
target_link_libraries(${_trgt} PUBLIC MKL::MKL_DPCPP)
96+
endif()
97+
9398
target_link_libraries(${_trgt} PUBLIC oneDPL)
9499

95100
if (UNIX)

dpnp/backend/extensions/lapack/CMakeLists.txt

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,11 @@ if (DPNP_GENERATE_COVERAGE)
6969
target_link_options(${python_module_name} PRIVATE -fprofile-instr-generate -fcoverage-mapping)
7070
endif()
7171

72-
target_link_libraries(${python_module_name} PUBLIC MKL::MKL_DPCPP)
72+
if (MKL_VERSION_2024)
73+
target_link_libraries(${python_module_name} PUBLIC MKL::MKL_SYCL::LAPACK)
74+
else()
75+
target_link_libraries(${python_module_name} PUBLIC MKL::MKL_DPCPP)
76+
endif()
7377

7478
install(TARGETS ${python_module_name}
7579
DESTINATION "dpnp/backend/extensions/lapack"

0 commit comments

Comments
 (0)