Skip to content

Commit 67bead1

Browse files
authored
Merge pull request #1425 from IntelPython/merge_to_gold
Merge master to gold
2 parents 7ea54d4 + 255702a commit 67bead1

25 files changed

+755
-51
lines changed

.github/workflows/build-sphinx.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ jobs:
5555
sudo apt-get install -y nvidia-cuda-toolkit clinfo
5656
5757
- name: Checkout repo
58-
uses: actions/checkout@v3.3.0
58+
uses: actions/checkout@v3.5.2
5959

6060
# https://github.com/marketplace/actions/setup-miniconda
6161
- name: Setup miniconda
@@ -108,7 +108,7 @@ jobs:
108108
if: |
109109
!github.event.pull_request.head.repo.fork &&
110110
(github.ref == 'refs/heads/master' || (startsWith(github.ref, 'refs/heads/release') == true) || github.event_name == 'push' && contains(github.ref, 'refs/tags/'))
111-
uses: peaceiris/[email protected].2
111+
uses: peaceiris/[email protected].3
112112
with:
113113
github_token: ${{ secrets.GITHUB_TOKEN }}
114114
publish_dir: doc/_build/html/

.github/workflows/conda-package.yml

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ jobs:
5050
access_token: ${{ github.token }}
5151

5252
- name: Checkout DPNP repo
53-
uses: actions/checkout@v3.3.0
53+
uses: actions/checkout@v3.5.2
5454
with:
5555
fetch-depth: 0
5656

@@ -76,7 +76,7 @@ jobs:
7676
run: conda install conda-build
7777

7878
- name: Cache conda packages
79-
uses: actions/cache@v3.2.6
79+
uses: actions/cache@v3.3.0
8080
env:
8181
CACHE_NUMBER: 1 # Increase to reset cache
8282
with:
@@ -169,7 +169,7 @@ jobs:
169169
TEST_CHANNELS: '-c ${{ env.channel-path }} ${{ env.CHANNELS }}'
170170

171171
- name: Cache conda packages
172-
uses: actions/cache@v3.2.6
172+
uses: actions/cache@v3.3.0
173173
env:
174174
CACHE_NUMBER: 1 # Increase to reset cache
175175
with:
@@ -196,6 +196,8 @@ jobs:
196196
run: |
197197
python -m pytest -q -ra --disable-warnings -vv ${{ env.TEST_SCOPE }}
198198
working-directory: ${{ env.tests-path }}
199+
env:
200+
SYCL_QUEUE_THREAD_POOL_SIZE: 6
199201

200202
test_windows:
201203
name: Test ['windows-latest', python='${{ matrix.python }}']
@@ -292,7 +294,7 @@ jobs:
292294
run: more lockfile
293295

294296
- name: Cache conda packages
295-
uses: actions/cache@v3.2.6
297+
uses: actions/cache@v3.3.0
296298
env:
297299
CACHE_NUMBER: 1 # Increase to reset cache
298300
with:
@@ -333,6 +335,8 @@ jobs:
333335
run: |
334336
python -m pytest -q -ra --disable-warnings -vv ${{ env.TEST_SCOPE }}
335337
working-directory: ${{ env.tests-path }}
338+
env:
339+
SYCL_QUEUE_THREAD_POOL_SIZE: 6
336340

337341
upload:
338342
name: Upload ['${{ matrix.os }}', python='${{ matrix.python }}']

.github/workflows/generate_coverage.yaml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ jobs:
2424
access_token: ${{ github.token }}
2525

2626
- name: Checkout repo
27-
uses: actions/checkout@v3
27+
uses: actions/checkout@v3.5.2
2828
with:
2929
fetch-depth: 0
3030

@@ -41,7 +41,7 @@ jobs:
4141
sudo apt-get install lcov
4242
- name: Install dpnp dependencies
4343
run: |
44-
conda install cython llvm cmake 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: |
@@ -66,6 +66,7 @@ jobs:
6666
env:
6767
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
6868
COVERALLS_PARALLEL: true
69+
SYCL_QUEUE_THREAD_POOL_SIZE: 6
6970

7071
coveralls:
7172
name: Indicate completion to coveralls.io

.github/workflows/pre-commit.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ jobs:
99
pre-commit:
1010
runs-on: ubuntu-latest
1111
steps:
12-
- uses: actions/checkout@v3.3.0
13-
- uses: actions/setup-python@v4.5.0
12+
- uses: actions/checkout@v3.5.2
13+
- uses: actions/setup-python@v4.6.1
1414
with:
1515
python-version: '3.10'
1616
- uses: pre-commit/[email protected]

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[![Pre-commit](https://github.com/IntelPython/dpnp/actions/workflows/pre-commit.yml/badge.svg?branch=master&event=push)](https://github.com/IntelPython/dpnp/actions/workflows/pre-commit.yml)
22
[![Conda package](https://github.com/IntelPython/dpnp/actions/workflows/conda-package.yml/badge.svg?branch=master&event=push)](https://github.com/IntelPython/dpnp/actions/workflows/conda-package.yml)
3-
[![codecov](https://codecov.io/gh/IntelPython/dpnp/branch/master/graph/badge.svg)](https://codecov.io/gh/IntelPython/dpnp)
3+
[![Coverage Status](https://coveralls.io/repos/github/IntelPython/dpnp/badge.svg?branch=master)](https://coveralls.io/github/IntelPython/dpnp?branch=master)
44
[![Build Sphinx](https://github.com/IntelPython/dpnp/workflows/Build%20Sphinx/badge.svg)](https://intelpython.github.io/dpnp)
55

66
# DPNP - Data Parallel Extension for NumPy*

doc/conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
# The short X.Y version
3434
version = '0.11'
3535
# The full version, including alpha/beta/rc tags
36-
release = '0.11.1'
36+
release = '0.11.2dev1'
3737

3838

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

dpnp/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ endfunction()
4848
build_dpnp_cython_ext_with_backend(dparray ${CMAKE_CURRENT_SOURCE_DIR}/dparray.pyx dpnp)
4949
add_subdirectory(backend)
5050
add_subdirectory(backend/extensions/lapack)
51+
add_subdirectory(backend/extensions/vm)
5152

5253
add_subdirectory(dpnp_algo)
5354
add_subdirectory(dpnp_utils)

dpnp/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,8 @@
4141
os.add_dll_directory(dpctlpath)
4242
os.environ["PATH"] = os.pathsep.join([os.getenv("PATH", ""), mypath, dpctlpath])
4343

44+
# workaround against hanging in OneMKL calls
45+
os.environ.setdefault('SYCL_QUEUE_THREAD_POOL_SIZE', '6')
4446

4547
from dpnp.dpnp_array import dpnp_array as ndarray
4648
from dpnp.dpnp_flatiter import flatiter as flatiter

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.11.1
41+
PROJECT_NUMBER = 0.11.2dev1
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
Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
# *****************************************************************************
2+
# Copyright (c) 2023, Intel Corporation
3+
# All rights reserved.
4+
#
5+
# Redistribution and use in source and binary forms, with or without
6+
# modification, are permitted provided that the following conditions are met:
7+
# - Redistributions of source code must retain the above copyright notice,
8+
# this list of conditions and the following disclaimer.
9+
# - Redistributions in binary form must reproduce the above copyright notice,
10+
# this list of conditions and the following disclaimer in the documentation
11+
# and/or other materials provided with the distribution.
12+
#
13+
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
14+
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
15+
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
16+
# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
17+
# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
18+
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
19+
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
20+
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
21+
# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
22+
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
23+
# THE POSSIBILITY OF SUCH DAMAGE.
24+
# *****************************************************************************
25+
26+
27+
set(python_module_name _vm_impl)
28+
pybind11_add_module(${python_module_name} MODULE
29+
vm_py.cpp
30+
div.cpp
31+
)
32+
33+
if (WIN32)
34+
if (${CMAKE_VERSION} VERSION_LESS "3.27")
35+
# this is a work-around for target_link_options inserting option after -link option, cause
36+
# linker to ignore it.
37+
set(CMAKE_CXX_LINK_FLAGS "${CMAKE_CXX_LINK_FLAGS} -fsycl-device-code-split=per_kernel")
38+
endif()
39+
endif()
40+
41+
set_target_properties(${python_module_name} PROPERTIES CMAKE_POSITION_INDEPENDENT_CODE ON)
42+
43+
target_include_directories(${python_module_name} PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/../../include)
44+
target_include_directories(${python_module_name} PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/../../src)
45+
46+
target_include_directories(${python_module_name} PUBLIC ${Dpctl_INCLUDE_DIRS})
47+
target_include_directories(${python_module_name} PUBLIC ${Dpctl_TENSOR_INCLUDE_DIR})
48+
49+
if (WIN32)
50+
target_compile_options(${python_module_name} PRIVATE
51+
/clang:-fno-approx-func
52+
/clang:-fno-finite-math-only
53+
)
54+
else()
55+
target_compile_options(${python_module_name} PRIVATE
56+
-fno-approx-func
57+
-fno-finite-math-only
58+
)
59+
endif()
60+
61+
target_link_options(${python_module_name} PUBLIC -fsycl-device-code-split=per_kernel)
62+
if (UNIX)
63+
# this option is support on Linux only
64+
target_link_options(${python_module_name} PUBLIC -fsycl-link-huge-device-code)
65+
endif()
66+
67+
if (DPNP_GENERATE_COVERAGE)
68+
target_link_options(${python_module_name} PRIVATE -fprofile-instr-generate -fcoverage-mapping)
69+
endif()
70+
71+
target_link_libraries(${python_module_name} PUBLIC MKL::MKL_DPCPP)
72+
73+
install(TARGETS ${python_module_name}
74+
DESTINATION "dpnp/backend/extensions/vm"
75+
)

0 commit comments

Comments
 (0)