Skip to content

Commit 52363db

Browse files
committed
Merge branch 'master' into sycl_to_cython_fft_random_linalg
2 parents ee88bec + 42ec3a2 commit 52363db

File tree

11 files changed

+93
-50
lines changed

11 files changed

+93
-50
lines changed

.github/workflows/build-sphinx.yml

Lines changed: 43 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -3,89 +3,109 @@ on:
33
push:
44
branches:
55
- master
6+
pull_request:
67

78
jobs:
89
build-and-deploy:
910
name: Build and Deploy Docs
11+
1012
runs-on: ubuntu-20.04
13+
14+
defaults:
15+
run:
16+
shell: bash -l {0}
17+
18+
env:
19+
python-ver: '3.9'
20+
1121
steps:
1222
- name: Cancel Previous Runs
13-
uses: styfle/cancel-workflow-action@0.6.0
23+
uses: styfle/cancel-workflow-action@0.10.0
1424
with:
1525
access_token: ${{ github.token }}
26+
1627
- name: Install Intel repository
1728
run: |
1829
wget https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS-2023.PUB
1930
sudo apt-key add GPG-PUB-KEY-INTEL-SW-PRODUCTS-2023.PUB
2031
rm GPG-PUB-KEY-INTEL-SW-PRODUCTS-2023.PUB
2132
sudo add-apt-repository "deb https://apt.repos.intel.com/oneapi all main"
2233
sudo apt-get update
34+
2335
- name: Update libstdc++-dev
2436
run: |
2537
sudo apt remove -y gcc-7 g++-7 gcc-8 g++-8 gcc-10 g++-10
2638
sudo apt remove -y libstdc++-10-dev
2739
sudo apt autoremove
2840
sudo apt install --reinstall -y gcc-9 g++-9 libstdc++-9-dev
41+
2942
- name: Install Intel OneAPI
3043
run: |
3144
sudo apt-get install intel-oneapi-mkl \
3245
intel-oneapi-mkl-devel \
3346
intel-oneapi-dpcpp-cpp-compiler
47+
3448
# https://github.com/marketplace/actions/checkout
3549
- name: Install nvidia-cuda support drivers
3650
run: |
3751
sudo add-apt-repository ppa:graphics-drivers/ppa
3852
sudo apt-get update
3953
sudo apt-get install -y libnvidia-gl-450
4054
sudo apt-get install -y nvidia-cuda-toolkit clinfo
55+
4156
- name: Checkout repo
42-
uses: actions/checkout@v2
57+
uses: actions/checkout@v3
58+
4359
# https://github.com/marketplace/actions/setup-miniconda
4460
- name: Setup miniconda
4561
uses: conda-incubator/setup-miniconda@v2
4662
with:
47-
activate-environment: dpnp
48-
python-version: 3.8
49-
channels: intel,conda-forge
50-
auto-activate-base: false
51-
- name: Conda info
52-
shell: bash -l {0}
53-
run: |
54-
conda info
55-
conda list
63+
auto-update-conda: true
64+
python-version: ${{ env.python-ver }}
65+
miniconda-version: 'latest'
66+
activate-environment: 'docs'
67+
channels: intel, conda-forge
68+
5669
- name: Install sphinx dependencies
57-
shell: bash -l {0}
58-
run: |
59-
conda install sphinx sphinx_rtd_theme
70+
run: conda install sphinx sphinx_rtd_theme
71+
6072
- name: Install dpnp dependencies
61-
shell: bash -l {0}
6273
run: |
63-
conda install dpctl mkl-devel-dpcpp tbb-devel dpcpp_linux-64 cmake=3.19 cython pytest \
74+
conda install dpctl mkl-devel-dpcpp tbb-devel dpcpp_linux-64 cmake cython pytest \
6475
-c dppy/label/dev -c intel -c conda-forge
76+
6577
- name: Install cuPy dependencies
66-
shell: bash -l {0}
78+
run: conda install -c conda-forge cupy cudatoolkit=10.0
79+
80+
- name: Conda info
6781
run: |
68-
conda install -c conda-forge cupy cudatoolkit=10.0
82+
conda info
83+
conda list
84+
6985
- name: Build library
70-
shell: bash -l {0}
7186
run: |
7287
DPLROOT=/opt/intel/oneapi/dpl/latest python setup.py build_clib
7388
CC=dpcpp python setup.py build_ext --inplace
7489
python setup.py develop
90+
7591
- name: Build docs
76-
shell: bash -l {0}
77-
run: |
78-
make html
92+
run: make html
7993
working-directory: doc
94+
8095
# https://github.com/marketplace/actions/doxygen-action
8196
- name: Build backend docs
82-
uses: mattnotmitt/doxygen-action@v1
97+
uses: mattnotmitt/doxygen-action@v1.9.4
8398
with:
8499
working-directory: 'dpnp/backend/doc'
100+
85101
- name: Copy backend docs
86102
run: cp -r dpnp/backend/doc/html doc/_build/html/backend_doc
103+
87104
# https://github.com/marketplace/actions/github-pages-action
88105
- name: Deploy docs
106+
if: |
107+
!github.event.pull_request.head.repo.fork &&
108+
(github.ref == 'refs/heads/master' || (startsWith(github.ref, 'refs/heads/release') == true) || github.event_name == 'push' && contains(github.ref, 'refs/tags/'))
89109
uses: peaceiris/actions-gh-pages@v3
90110
with:
91111
github_token: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/conda-package.yml

Lines changed: 21 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,11 @@ jobs:
3030
conda-pkgs: '/home/runner/conda_pkgs_dir/'
3131

3232
steps:
33+
- name: Cancel Previous Runs
34+
uses: styfle/[email protected]
35+
with:
36+
access_token: ${{ github.token }}
37+
3338
- name: Checkout DPNP repo
3439
uses: actions/checkout@v3
3540
with:
@@ -95,6 +100,11 @@ jobs:
95100
conda-pkgs: 'C:\Users\runneradmin\conda_pkgs_dir\'
96101

97102
steps:
103+
- name: Cancel Previous Runs
104+
uses: styfle/[email protected]
105+
with:
106+
access_token: ${{ github.token }}
107+
98108
- name: Checkout DPNP repo
99109
uses: actions/checkout@v3
100110
with:
@@ -238,12 +248,14 @@ jobs:
238248

239249
- name: Smoke test
240250
run: python -c "import dpnp, dpctl; dpctl.lsplatform()"
251+
env:
252+
OCL_ICD_FILENAMES: 'libintelocl.so'
241253

242254
# TODO: run the whole scope once the issues on CPU are resolved
243255
- name: Run tests
244256
run: python -m pytest -q -ra --disable-warnings -vv test_arraycreation.py test_dparray.py test_fft.py test_linalg.py test_mathematical.py test_special.py
245257
env:
246-
SYCL_ENABLE_HOST_DEVICE: '1'
258+
OCL_ICD_FILENAMES: 'libintelocl.so'
247259
working-directory: ${{ env.tests-path }}
248260

249261
test_windows:
@@ -422,7 +434,9 @@ jobs:
422434
upload_linux:
423435
needs: test_linux
424436

425-
if: ${{github.ref == 'refs/heads/master' || (startsWith(github.ref, 'refs/heads/release') == true) || github.event_name == 'push' && contains(github.ref, 'refs/tags/')}}
437+
if: |
438+
!github.event.pull_request.head.repo.fork &&
439+
(github.ref == 'refs/heads/master' || (startsWith(github.ref, 'refs/heads/release') == true) || github.event_name == 'push' && contains(github.ref, 'refs/tags/'))
426440
427441
runs-on: ubuntu-latest
428442

@@ -452,14 +466,16 @@ jobs:
452466
run: conda install anaconda-client
453467

454468
- name: Upload
469+
run: anaconda --token ${{ env.ANACONDA_TOKEN }} upload --user dppy --label dev ${{ env.PACKAGE_NAME }}-*.tar.bz2
455470
env:
456471
ANACONDA_TOKEN: ${{ secrets.ANACONDA_TOKEN }}
457-
run: anaconda --token ${{ env.ANACONDA_TOKEN }} upload --user dppy --label dev ${{ env.PACKAGE_NAME }}-*.tar.bz2
458472

459473
upload_windows:
460474
needs: test_windows
461475

462-
if: ${{github.ref == 'refs/heads/master' || (startsWith(github.ref, 'refs/heads/release') == true) || github.event_name == 'push' && contains(github.ref, 'refs/tags/')}}
476+
if: |
477+
!github.event.pull_request.head.repo.fork &&
478+
(github.ref == 'refs/heads/master' || (startsWith(github.ref, 'refs/heads/release') == true) || github.event_name == 'push' && contains(github.ref, 'refs/tags/'))
463479
464480
runs-on: windows-latest
465481

@@ -488,6 +504,6 @@ jobs:
488504
run: conda install anaconda-client
489505

490506
- name: Upload
507+
run: anaconda --token ${{ env.ANACONDA_TOKEN }} upload --user dppy --label dev ${{ env.PACKAGE_NAME }}-*.tar.bz2
491508
env:
492509
ANACONDA_TOKEN: ${{ secrets.ANACONDA_TOKEN }}
493-
run: anaconda --token ${{ env.ANACONDA_TOKEN }} upload --user dppy --label dev ${{ env.PACKAGE_NAME }}-*.tar.bz2

.gitignore

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,12 @@ __pycache__/
88
# Code project files
99
.vscode
1010

11+
# Files from test of code coverage
12+
coverage.xml
13+
14+
# Backup files kept after git merge/rebase
15+
*.orig
16+
1117
*dpnp_backend*
1218
dpnp/**/*.cpython*.so
1319
dpnp/**/*.pyd

doc/conf.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,13 +27,13 @@
2727
# -- Project information -----------------------------------------------------
2828

2929
project = 'dpnp'
30-
copyright = '2020, Intel'
30+
copyright = '2020-2022, Intel'
3131
author = 'Intel'
3232

3333
# The short X.Y version
3434
version = '0.10'
3535
# The full version, including alpha/beta/rc tags
36-
release = '0.10.1'
36+
release = '0.10.2'
3737

3838

3939
# -- General configuration ---------------------------------------------------
@@ -73,7 +73,7 @@
7373
#
7474
# This is also used if you do content translation via gettext catalogs.
7575
# Usually you set "language" from the command line for these cases.
76-
language = None
76+
language = 'en'
7777

7878
# List of patterns, relative to source directory, that match files and
7979
# directories to ignore when looking for source files.

doc/reference/fft.rst

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,9 @@ Helper routines
5757
dpnp.fft.rfftfreq
5858
dpnp.fft.fftshift
5959
dpnp.fft.ifftshift
60-
dpnp.fft.config.set_cufft_callbacks
61-
dpnp.fft.config.set_cufft_gpus
62-
dpnp.fft.config.get_plan_cache
63-
dpnp.fft.config.show_plan_cache_info
60+
61+
.. fft.config module is not implemented yet
62+
.. dpnp.fft.config.set_cufft_callbacks
63+
.. dpnp.fft.config.set_cufft_gpus
64+
.. dpnp.fft.config.get_plan_cache
65+
.. dpnp.fft.config.show_plan_cache_info

doc/reference/ndarray.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,4 @@ For the basic concept of ``ndarray``\s, please refer to the `NumPy documentation
1111
:nosignatures:
1212

1313
dpnp.ndarray
14-
dpnp.dparray.dparray
14+
dpnp.dpnp_array.dpnp_array

doc/reference/polynomials.rst

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,9 @@ Polynomial Module
1313
:toctree: generated/
1414
:nosignatures:
1515

16-
dpnp.polynomial.polynomial.polyvander
17-
dpnp.polynomial.polynomial.polycompanion
16+
.. polynomial module is not implemented yet
17+
.. dpnp.polynomial.polynomial.polyvander
18+
.. dpnp.polynomial.polynomial.polycompanion
1819
1920
2021
Polyutils
@@ -24,9 +25,10 @@ Polyutils
2425
:toctree: generated/
2526
:nosignatures:
2627

27-
dpnp.polynomial.polyutils.as_series
28-
dpnp.polynomial.polyutils.trimseq
29-
dpnp.polynomial.polyutils.trimcoef
28+
.. polyutils module is not implemented yet
29+
.. dpnp.polynomial.polyutils.as_series
30+
.. dpnp.polynomial.polyutils.trimseq
31+
.. dpnp.polynomial.polyutils.trimcoef
3032
3133
3234
Poly1d

dpnp/backend/CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# *****************************************************************************
2-
# Copyright (c) 2016-2020, Intel Corporation
2+
# Copyright (c) 2016-2022, Intel Corporation
33
# All rights reserved.
44
#
55
# Redistribution and use in source and binary forms, with or without
@@ -27,7 +27,7 @@
2727

2828
cmake_minimum_required(VERSION 3.10 FATAL_ERROR)
2929

30-
# set(DPNP_VERSION 0.10.0)
30+
# set(DPNP_VERSION 0.10.2)
3131
# set(DPNP_API_VERSION 0.10)
3232

3333
# set directory where the custom finders live

dpnp/backend/doc/Doxyfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ PROJECT_NAME = "DPNP C++ backend kernel library"
3838
# could be handy for archiving the generated documentation or if some version
3939
# control system is used.
4040

41-
PROJECT_NUMBER = 0.10.1
41+
PROJECT_NUMBER = 0.10.2
4242

4343
# Using the PROJECT_BRIEF tag one can provide an optional one line description
4444
# for a project that appears at the top of each page and should give viewer a

dpnp/version.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/usr/bin/env python
22
# -*- coding: utf-8 -*-
33
# *****************************************************************************
4-
# Copyright (c) 2016-2020, Intel Corporation
4+
# Copyright (c) 2016-2022, Intel Corporation
55
# All rights reserved.
66
#
77
# Redistribution and use in source and binary forms, with or without
@@ -29,6 +29,6 @@
2929
DPNP version module
3030
"""
3131

32-
__version__: str = '0.10.1'
32+
__version__: str = '0.10.2'
3333

3434
version: str = __version__

tests/test_fft.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,7 @@
1010
def test_fft(type, norm):
1111
# 1 dim array
1212
data = numpy.arange(100, dtype=numpy.dtype(type))
13-
# It doesn't work properly without passing dtype explicitly:
14-
# DPCTL creates an array of 'float32' from numpy data of 'float64',
15-
# in case when device.has(sycl::aspect::fp64) is False on target host
16-
dpnp_data = dpnp.array(data, dtype=dpnp.dtype(type))
13+
dpnp_data = dpnp.array(data)
1714

1815
np_res = numpy.fft.fft(data, norm=norm)
1916
dpnp_res = dpnp.asnumpy(dpnp.fft.fft(dpnp_data, norm=norm))

0 commit comments

Comments
 (0)