Skip to content

Commit 70d2781

Browse files
committed
Merge branch 'master' into merge_to_gold2
2 parents ff9bed2 + 79ac2b0 commit 70d2781

File tree

149 files changed

+12790
-3969
lines changed

Some content is hidden

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

149 files changed

+12790
-3969
lines changed

.flake8

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ exclude =
5757
conda.recipe,
5858
tests/*.py,
5959
tests_external/*.py,
60-
version.py,
60+
versioneer.py,
6161

6262
# Print detailed statistic if any issue detected
6363
count = True

.github/workflows/build-sphinx.yml

Lines changed: 88 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,17 +4,21 @@ on:
44
branches:
55
- master
66
pull_request:
7+
types: [opened, synchronize, reopened, closed]
8+
9+
env:
10+
PUBLISH_DIR: doc/_build/html/
11+
12+
defaults:
13+
run:
14+
shell: bash -l {0}
715

816
jobs:
917
build-and-deploy:
1018
name: Build and Deploy Docs
1119

1220
runs-on: ubuntu-20.04
1321

14-
defaults:
15-
run:
16-
shell: bash -l {0}
17-
1822
env:
1923
python-ver: '3.9'
2024
CHANNELS: '-c dppy/label/dev -c intel -c conda-forge --override-channels'
@@ -25,6 +29,12 @@ jobs:
2529
with:
2630
access_token: ${{ github.token }}
2731

32+
- name: Dump GitHub context
33+
env:
34+
GITHUB_CONTEXT: ${{ toJson(github) }}
35+
run: |
36+
echo "$GITHUB_CONTEXT"
37+
2838
- name: Free Disk Space (Ubuntu)
2939
uses: jlumbroso/free-disk-space@main
3040
with:
@@ -61,6 +71,8 @@ jobs:
6171
6272
- name: Checkout repo
6373
uses: actions/checkout@v3.5.2
74+
with:
75+
fetch-depth: 0
6476

6577
# https://github.com/marketplace/actions/setup-miniconda
6678
- name: Setup miniconda
@@ -79,8 +91,8 @@ jobs:
7991
8092
- name: Install dpnp dependencies
8193
run: |
82-
conda install dpctl mkl-devel-dpcpp onedpl-devel tbb-devel dpcpp_linux-64 \
83-
cmake cython"<3" pytest ninja scikit-build sysroot_linux-64">=2.28" ${{ env.CHANNELS }}
94+
conda install numpy"<1.24" dpctl mkl-devel-dpcpp onedpl-devel tbb-devel dpcpp_linux-64 \
95+
cmake cython pytest ninja scikit-build sysroot_linux-64">=2.28" ${{ env.CHANNELS }}
8496
8597
- name: Install cuPy dependencies
8698
run: conda install cupy cudatoolkit=10.0
@@ -99,6 +111,13 @@ jobs:
99111
run: make html
100112
working-directory: doc
101113

114+
- name: Set a project number to current release
115+
run: |
116+
export PROJECT_NUMBER=$(git describe --tags --abbrev=0)
117+
118+
echo PROJECT_NUMBER=${PROJECT_NUMBER}
119+
echo "PROJECT_NUMBER=$PROJECT_NUMBER" >> $GITHUB_ENV
120+
102121
# https://github.com/marketplace/actions/doxygen-action
103122
- name: Build backend docs
104123
uses: mattnotmitt/doxygen-action@v1.9.5
@@ -111,9 +130,70 @@ jobs:
111130
# https://github.com/marketplace/actions/github-pages-action
112131
- name: Deploy docs
113132
if: |
114-
!github.event.pull_request.head.repo.fork &&
133+
github.event.pull_request && !github.event.pull_request.head.repo.fork &&
115134
(github.ref == 'refs/heads/master' || (startsWith(github.ref, 'refs/heads/release') == true) || github.event_name == 'push' && contains(github.ref, 'refs/tags/'))
116135
uses: peaceiris/actions-gh-pages@v3.9.3
117136
with:
118137
github_token: ${{ secrets.GITHUB_TOKEN }}
119-
publish_dir: doc/_build/html/
138+
publish_dir: ${{ env.PUBLISH_DIR }}
139+
140+
- name: Publish pull-request docs
141+
if: |
142+
github.event.pull_request && !github.event.pull_request.head.repo.fork && github.event.action != 'closed'
143+
uses: peaceiris/actions-gh-pages@v3.9.3
144+
with:
145+
github_token: ${{ secrets.GITHUB_TOKEN }}
146+
publish_dir: ${{ env.PUBLISH_DIR }}
147+
destination_dir: ./pull/${{ github.event.number }}
148+
allow_empty_commit : true
149+
keep_files: true
150+
commit_message: ${{ github.event.head_commit.message }}
151+
publish_branch: gh-pages
152+
user_name: 'github-actions[bot]'
153+
user_email: 'github-actions[bot]@users.noreply.github.com'
154+
155+
- name: Comment with URL to published pull-request docs
156+
if: |
157+
github.event.pull_request && !github.event.pull_request.head.repo.fork && github.event.action != 'closed'
158+
env:
159+
PR_NUM: ${{ github.event.number }}
160+
uses: mshick/add-pr-comment@v2.8.1
161+
with:
162+
message: |
163+
View rendered docs @ https://intelpython.github.io/dpnp/pull/${{ env.PR_NUM }}/index.html
164+
allow-repeats: false
165+
166+
clean:
167+
if: |
168+
github.event.pull_request && !github.event.pull_request.head.repo.fork && github.event.action == 'closed'
169+
170+
needs: build-and-deploy
171+
172+
runs-on: ubuntu-20.04
173+
174+
steps:
175+
- uses: actions/checkout@v3.5.2
176+
with:
177+
fetch-depth: 0
178+
179+
- name: Remove docs [PR closed]
180+
env:
181+
PR_NUM: ${{ github.event.number }}
182+
run: |
183+
git remote add tokened_docs https://IntelPython:${{ secrets.GITHUB_TOKEN }}@github.com/IntelPython/dpnp.git
184+
git fetch tokened_docs
185+
git checkout --track tokened_docs/gh-pages
186+
echo `pwd`
187+
[ -d pull/${PR_NUM} ] && git rm -rf pull/${PR_NUM}
188+
git config --global user.name 'github-actions[bot]'
189+
git config --global user.email 'github-actions[bot]@users.noreply.github.com'
190+
git commit -m "Removing docs for closed pull request ${PR_NUM}"
191+
git push tokened_docs gh-pages
192+
193+
- name: Modify the comment with URL to official documentation
194+
uses: mshick/add-pr-comment@v2.8.1
195+
with:
196+
find: |
197+
View rendered docs @.+
198+
replace: |
199+
View rendered docs @ https://intelpython.github.io/dpnp/index.html

.github/workflows/conda-package.yml

Lines changed: 18 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -10,19 +10,25 @@ env:
1010
PACKAGE_NAME: dpnp
1111
MODULE_NAME: dpnp
1212
CHANNELS: '-c dppy/label/dev -c intel -c conda-forge --override-channels'
13+
# TODO: to add test_arraymanipulation.py back to the scope once crash on Windows is gone
1314
TEST_SCOPE: >-
1415
test_arraycreation.py
1516
test_dot.py
1617
test_dparray.py
1718
test_fft.py
1819
test_linalg.py
20+
test_logic.py
21+
test_manipulation.py
1922
test_mathematical.py
2023
test_random_state.py
2124
test_sort.py
2225
test_special.py
2326
test_umath.py
2427
test_usm_type.py
2528
third_party/cupy/linalg_tests/test_product.py
29+
third_party/cupy/logic_tests/test_truth.py
30+
third_party/cupy/manipulation_tests/test_basic.py
31+
third_party/cupy/manipulation_tests/test_join.py
2632
third_party/cupy/math_tests/test_explog.py
2733
third_party/cupy/math_tests/test_misc.py
2834
third_party/cupy/math_tests/test_trigonometric.py
@@ -37,7 +43,7 @@ jobs:
3743

3844
strategy:
3945
matrix:
40-
python: ['3.8', '3.9', '3.10']
46+
python: ['3.8', '3.9', '3.10', '3.11']
4147
os: [ubuntu-20.04, windows-latest]
4248

4349
runs-on: ${{ matrix.os }}
@@ -114,12 +120,10 @@ jobs:
114120

115121
strategy:
116122
matrix:
117-
python: ['3.8', '3.9', '3.10']
123+
python: ['3.8', '3.9', '3.10', '3.11']
118124
os: [ubuntu-20.04, ubuntu-latest]
119125

120-
experimental: [false]
121-
122-
continue-on-error: ${{ matrix.experimental }}
126+
continue-on-error: true
123127

124128
env:
125129
conda-pkgs: '/home/runner/conda_pkgs_dir/'
@@ -194,7 +198,9 @@ jobs:
194198
run: conda list
195199

196200
- name: Smoke test
197-
run: python -c "import dpnp, dpctl; dpctl.lsplatform()"
201+
run: |
202+
python -c "import dpnp, dpctl; dpctl.lsplatform()"
203+
python -c "import dpnp; print(dpnp.__version__)"
198204
199205
# TODO: run the whole scope once the issues on CPU are resolved
200206
- name: Run tests
@@ -215,10 +221,9 @@ jobs:
215221

216222
strategy:
217223
matrix:
218-
python: ['3.8', '3.9', '3.10']
219-
experimental: [false]
224+
python: ['3.8', '3.9', '3.10', '3.11']
220225

221-
continue-on-error: ${{ matrix.experimental }}
226+
continue-on-error: true
222227

223228
env:
224229
conda-pkgs: 'C:\Users\runneradmin\conda_pkgs_dir\'
@@ -331,7 +336,9 @@ jobs:
331336
Get-Content -Tail 5 -Path $cl_cfg
332337
333338
- name: Smoke test
334-
run: python -c "import dpnp, dpctl; dpctl.lsplatform()"
339+
run: |
340+
python -c "import dpnp, dpctl; dpctl.lsplatform()"
341+
python -c "import dpnp; print(dpnp.__version__)"
335342
336343
# TODO: run the whole scope once the issues on CPU are resolved
337344
- name: Run tests
@@ -346,7 +353,7 @@ jobs:
346353

347354
strategy:
348355
matrix:
349-
python: ['3.8', '3.9', '3.10']
356+
python: ['3.8', '3.9', '3.10', '3.11']
350357
os: [ubuntu-20.04, windows-latest]
351358

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

.github/workflows/generate_coverage.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ jobs:
4141
sudo apt-get install lcov
4242
- name: Install dpnp dependencies
4343
run: |
44-
conda install cython"<3" llvm cmake">=3.21" scikit-build ninja pytest pytest-cov coverage[toml] \
44+
conda install cython llvm cmake">=3.21" scikit-build ninja pytest pytest-cov coverage[toml] \
4545
dpctl dpcpp_linux-64 sysroot_linux-64">=2.28" mkl-devel-dpcpp tbb-devel onedpl-devel ${{ env.CHANNELS }}
4646
- name: Conda info
4747
run: |

.github/workflows/pre-commit.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,5 +19,5 @@ jobs:
1919
- uses: actions/checkout@v3.5.2
2020
- uses: actions/setup-python@v4.6.1
2121
with:
22-
python-version: '3.10'
22+
python-version: '3.11'
2323
- uses: pre-commit/action@v3.0.0

.pre-commit-config.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ repos:
4343
- id: rst-inline-touching-normal
4444
- id: text-unicode-replacement-char
4545
- repo: https://github.com/psf/black
46-
rev: 23.3.0
46+
rev: 23.7.0
4747
hooks:
4848
- id: black
4949
args: ["--check", "--diff", "--color"]
@@ -59,7 +59,7 @@ repos:
5959
name: isort (pyi)
6060
types: [pyi]
6161
- repo: https://github.com/pycqa/flake8
62-
rev: 6.0.0
62+
rev: 6.1.0
6363
hooks:
6464
- id: flake8
6565
args: ["--config=.flake8"]

CHANGELOG.md

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,14 @@ 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
8+
9+
### Added
10+
11+
### Changed
12+
13+
### Fixed
14+
715
## [0.12.1] - 07/18/2023
816

917
### Added
@@ -23,11 +31,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
2331
* Added a specialized kernel for `dpnp.sum` with `axis=0` as a pybind11 extension [#1479](https://github.com/IntelPython/dpnp/pull/1479)
2432
* 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)
2533
* 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)
26-
* 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)
27-
* 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)
34+
* 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)
35+
* 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)
2836
* Leveraged `dpctl.tensor` implementation for logical operations [#1464](https://github.com/IntelPython/dpnp/pull/1464)
2937
* Leveraged `dpctl.tensor` implementation for `dpnp.floor_divide` function [#1462](https://github.com/IntelPython/dpnp/pull/1462)
3038
* Leveraged `dpctl.tensor` implementation for comparison functions [#1458](https://github.com/IntelPython/dpnp/pull/1458)
39+
3140
### Fixed
3241

3342
* Improved `dpnp.dot` function to support OneMKL calls for input and output arrays with strides [#1477](https://github.com/IntelPython/dpnp/pull/1477)

CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,8 @@ include(GNUInstallDirs)
4545
include(FetchContent)
4646
FetchContent_Declare(
4747
pybind11
48-
URL https://github.com/pybind/pybind11/archive/refs/tags/v2.10.2.tar.gz
49-
URL_HASH SHA256=93bd1e625e43e03028a3ea7389bba5d3f9f2596abc074b068e70f4ef9b1314ae
48+
URL https://github.com/pybind/pybind11/archive/refs/tags/v2.11.1.tar.gz
49+
URL_HASH SHA256=d475978da0cdc2d43b73f30910786759d593a9d8ee05b1b6846d1eb16c6d2e0c
5050
)
5151
FetchContent_MakeAvailable(pybind11)
5252

README.md

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,13 +29,11 @@ cd dpnp
2929
python scripts/build_locally.py
3030
```
3131

32-
## Install Wheel Package from Pypi
32+
## Install Wheel Package via pip
3333
Install DPNP
3434
```cmd
35-
python -m pip install --index-url https://pypi.anaconda.org/intel/simple --extra-index-url https://pypi.org/simple dpnp
35+
python -m pip install --index-url https://pypi.anaconda.org/intel/simple dpnp
3636
```
37-
Note: DPNP wheel package is placed on Pypi, but some of its dependencies (like Intel numpy) are in Anaconda Cloud.
38-
That is why install command requires additional intel Pypi channel from Anaconda Cloud.
3937

4038
Set path to Performance Libraries in case of using venv or system Python:
4139
```cmd

conda-recipe/build.sh

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,7 @@
11
#!/bin/bash
22

3-
# Workaround to Klocwork overwriting LD_LIBRARY_PATH that was modified
4-
# by DPC++ compiler conda packages. Will need to be added to DPC++ compiler
5-
# activation scripts.
6-
export LDFLAGS="$LDFLAGS -Wl,-rpath,$PREFIX/lib"
7-
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$PREFIX/compiler/lib/intel64_lin:$PREFIX/compiler/lib:$PREFIX/lib"
3+
# This is necessary to help DPC++ find Intel libraries such as SVML, IRNG, etc in build prefix
4+
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:${BUILD_PREFIX}/lib"
85

96
# Intel LLVM must cooperate with compiler and sysroot from conda
107
echo "--gcc-toolchain=${BUILD_PREFIX} --sysroot=${BUILD_PREFIX}/${HOST}/sysroot -target ${HOST}" > icpx_for_conda.cfg

conda-recipe/meta.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,19 +9,19 @@ requirements:
99
- python
1010
- setuptools
1111
- numpy 1.21
12-
- cython <3
12+
- cython
1313
- cmake >=3.21
1414
- ninja
1515
- git
1616
- dpctl >=0.14.5
17-
- mkl-devel-dpcpp {{ environ.get('MKL_VER', '>=2023.1.0') }}
17+
- mkl-devel-dpcpp {{ environ.get('MKL_VER', '>=2023.2.0') }}
1818
- onedpl-devel
1919
- tbb-devel
2020
- wheel
2121
- scikit-build
2222
build:
2323
- {{ compiler('cxx') }}
24-
- {{ compiler('dpcpp') }} >=2023.1.0 # [not osx]
24+
- {{ compiler('dpcpp') }} >=2023.2.0 # [not osx]
2525
- sysroot_linux-64 >=2.28 # [linux]
2626
run:
2727
- python

doc/conf.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,17 +23,17 @@
2323
with open("reference/comparison_table.rst.inc", "w") as fd:
2424
fd.write(comparison_generator.generate())
2525

26+
import dpnp
2627

2728
# -- Project information -----------------------------------------------------
2829

29-
project = "dpnp"
30+
project = "Data Parallel Extension for NumPy"
3031
copyright = "2020-2023, Intel Corporation"
3132
author = "Intel"
3233

33-
# The short X.Y version
34-
version = "0.12"
34+
version = dpnp.__version__.strip(".dirty")
3535
# The full version, including alpha/beta/rc tags
36-
release = "0.12.1"
36+
release = dpnp.__version__.strip(".dirty")
3737

3838

3939
# -- General configuration ---------------------------------------------------

0 commit comments

Comments
 (0)