Skip to content

Commit cc34fa3

Browse files
resolved the conflict during merge from master branch
2 parents 8632ce4 + 61ae592 commit cc34fa3

File tree

86 files changed

+3359
-946
lines changed

Some content is hidden

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

86 files changed

+3359
-946
lines changed

.github/workflows/conda-package.yml

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,11 @@ env:
88
jobs:
99
build:
1010
runs-on: ubuntu-20.04
11+
12+
strategy:
13+
matrix:
14+
python: [3.8, 3.9]
15+
1116
steps:
1217
- name: Install Intel repository
1318
run: |
@@ -24,9 +29,9 @@ jobs:
2429
sudo apt install --reinstall -y gcc-9 g++-9 libstdc++-9-dev
2530
- name: Install Intel OneAPI
2631
run: |
27-
sudo apt-get install intel-oneapi-mkl \
28-
intel-oneapi-mkl-devel \
29-
intel-oneapi-dpcpp-cpp-compiler
32+
sudo apt-get install intel-oneapi-mkl=2021.3.0-520 \
33+
intel-oneapi-mkl-devel=2021.3.0-520 \
34+
intel-oneapi-compiler-dpcpp-cpp=2021.3.0-3350
3035
- name: Checkout repo
3136
uses: actions/checkout@v2
3237
with:
@@ -41,7 +46,7 @@ jobs:
4146
. /opt/intel/oneapi/setvars.sh
4247
. ./scripts/install_cmake_lin.sh
4348
CHANNELS="-c dppy/label/dev -c intel -c defaults --override-channels"
44-
VERSIONS="--python 3.8"
49+
VERSIONS="--python ${{ matrix.python }}"
4550
TEST="--no-test"
4651
conda build \
4752
$TEST \
@@ -52,18 +57,23 @@ jobs:
5257
- name: Upload artifact
5358
uses: actions/upload-artifact@v2
5459
with:
55-
name: dpnp ${{ runner.os }}
60+
name: dpnp ${{ runner.os }} ${{ matrix.python }}
5661
path: /usr/share/miniconda/conda-bld/linux-64/dpnp-*.tar.bz2
5762

5863
upload:
5964
needs: build
6065
if: ${{ github.ref == 'refs/heads/master' }}
6166
runs-on: ubuntu-latest
67+
68+
strategy:
69+
matrix:
70+
python: [3.8, 3.9]
71+
6272
steps:
6373
- name: Download artifact
6474
uses: actions/download-artifact@v2
6575
with:
66-
name: dpnp ${{ runner.os }}
76+
name: dpnp ${{ runner.os }} ${{ matrix.python }}
6777

6878
- name: Install anaconda-client
6979
run: conda install anaconda-client

0.build.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
#!/bin/bash
22
THEDIR=$(dirname $(readlink -e ${BASH_SOURCE[0]}))
33

4-
. ${THEDIR}/0.env.sh
4+
# . ${THEDIR}/0.env.sh
55
cd ${THEDIR}
66

77
export DPNP_DEBUG=1
88

99
python setup.py clean
10-
python setup.py build_clib
10+
DPLROOT=/opt/intel/oneapi/dpl/latest python setup.py build_clib
1111

1212
# inplace build
13-
python setup.py build_ext --inplace
13+
CC=dpcpp python setup.py build_ext --inplace
1414

1515
# development build. Root privileges needed
1616
# python setup.py develop

conda-recipe/activate_env.sh

Lines changed: 0 additions & 7 deletions
This file was deleted.

conda-recipe/build.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
33
# if ONEAPI_ROOT is specified (use all from it)
44
if [ -n "${ONEAPI_ROOT}" ]; then
55
export DPCPPROOT=${ONEAPI_ROOT}/compiler/latest
6-
# TODO uncomment when CI will be changed
7-
# export MKLROOT=${ONEAPI_ROOT}/mkl/latest
6+
export MKLROOT=${ONEAPI_ROOT}/mkl/latest
87
export TBBROOT=${ONEAPI_ROOT}/tbb/latest
8+
export DPLROOT=${ONEAPI_ROOT}/dpl/latest
99
fi
1010

1111
# if DPCPPROOT is specified (work with custom DPCPP)

conda-recipe/meta.yaml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,16 @@ requirements:
88
host:
99
- python
1010
- setuptools
11-
- numpy >=1.15 # [win or osx or py==38]
11+
- numpy >=1.15 # [win or osx or py>=38]
1212
- numpy 1.17 # [linux and py==37]
1313
- cython
1414
- cmake >=3.16.5
1515
- dpctl >=0.5.0a0
16-
- mkl-devel >=2021.1.1
16+
- mkl-devel-dpcpp
17+
- tbb-devel
1718
- wheel
1819
build:
19-
- {{ compiler('cxx') }}
20+
- {{ compiler('dpcpp') }}
2021
run:
2122
- python
2223
- dpctl >=0.5.0a0
@@ -33,6 +34,7 @@ build:
3334
- DPCPPROOT
3435
- MKLROOT
3536
- TBBROOT
37+
- DPLROOT
3638
- WHEELS_OUTPUT_FOLDER
3739

3840
test:

conda-recipe/run_test.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
33
# if ONEAPI_ROOT is specified (use all from it)
44
if [ -n "${ONEAPI_ROOT}" ]; then
55
export DPCPPROOT=${ONEAPI_ROOT}/compiler/latest
6-
# TODO uncomment when CI will be changed
7-
# export MKLROOT=${ONEAPI_ROOT}/mkl/latest
6+
export MKLROOT=${ONEAPI_ROOT}/mkl/latest
87
export TBBROOT=${ONEAPI_ROOT}/tbb/latest
8+
export DPLROOT=${ONEAPI_ROOT}/dpl/latest
99
fi
1010

1111
# if DPCPPROOT is specified (work with custom DPCPP)

doc/conf.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,9 @@
3131
author = 'Intel'
3232

3333
# The short X.Y version
34-
version = '0.6'
34+
version = '0.8'
3535
# The full version, including alpha/beta/rc tags
36-
release = '0.6.2'
36+
release = '0.8.0'
3737

3838

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

dpnp/backend/CMakeLists.txt

Lines changed: 5 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@
2727

2828
cmake_minimum_required(VERSION 3.10 FATAL_ERROR)
2929

30-
# set(DPNP_VERSION 0.6.2)
31-
# set(DPNP_API_VERSION 0.6)
30+
# set(DPNP_VERSION 0.8.0)
31+
# set(DPNP_API_VERSION 0.8)
3232

3333
# set directory where the custom finders live
3434
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/Modules")
@@ -38,14 +38,6 @@ set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/Modules")
3838
# -----------------------------------------------------------------------------------------------
3939
if(DEFINED ENV{ONEAPI_ROOT})
4040
set(DPNP_ONEAPI_ROOT "$ENV{ONEAPI_ROOT}" CACHE PATH "Folder contains oneapi tool set")
41-
else()
42-
if(UNIX)
43-
set(DPNP_ONEAPI_ROOT "/opt/intel/oneapi" CACHE PATH "Folder contains oneapi tool set")
44-
elseif(WIN32)
45-
set(DPNP_ONEAPI_ROOT "C:/Program Files (x86)/Intel/oneAPI" CACHE PATH "Folder contains oneapi tool set")
46-
else()
47-
message(FATAL_ERROR "Unsupported system ${CMAKE_SYSTEM}")
48-
endif()
4941
endif()
5042

5143
option(DPNP_STATIC_LIB_ENABLE "Enable build DPNP static library" FALSE)
@@ -184,6 +176,7 @@ set(DPNP_SRC
184176
kernels/dpnp_krnl_searching.cpp
185177
kernels/dpnp_krnl_sorting.cpp
186178
kernels/dpnp_krnl_statistics.cpp
179+
src/constants.cpp
187180
src/dpnp_iface_fptr.cpp
188181
src/memory_sycl.cpp
189182
src/queue_sycl.cpp
@@ -252,8 +245,8 @@ target_link_libraries(dpnp_backend_c PUBLIC ${DPNP_MATHLIB_DEP_LIBS})
252245

253246
# Parallel STL from DPC++
254247
if(NOT WIN32)
255-
find_package(PSTL REQUIRED)
256-
target_include_directories(dpnp_backend_c PUBLIC ${PSTL_INCLUDE_DIR})
248+
find_package(DPL REQUIRED)
249+
target_include_directories(dpnp_backend_c PUBLIC ${DPL_INCLUDE_DIR})
257250
endif()
258251

259252
# SYCL queue manager

dpnp/backend/cmake/Modules/FindPSTL.cmake renamed to dpnp/backend/cmake/Modules/FindDPL.cmake

Lines changed: 17 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -24,27 +24,30 @@
2424
# *****************************************************************************
2525

2626
# The following variables are optionally searched for defaults
27-
# PSTL_ROOT_DIR: Base directory where all components are found
27+
# DPLROOT: Environment variable to specify custom search place
28+
# ONEAPI_ROOT: Environment variable to specify search place from oneAPI
2829
#
2930
# The following are set after configuration is done:
30-
# PSTL_FOUND
31-
# PSTL_INCLUDE_DIR
31+
# DPL_FOUND
32+
# DPL_INCLUDE_DIR
3233

3334
include(FindPackageHandleStandardArgs)
3435

35-
set(PSTL_ROOT_DIR
36-
"${DPNP_ONEAPI_ROOT}/dpl"
37-
CACHE PATH "Folder contains PSTL headers")
36+
set(DPNP_ONEAPI_DPL "$ENV{DPNP_ONEAPI_ROOT}/dpl/latest" CACHE PATH "Folder contains DPL files from ONEAPI_ROOT")
37+
38+
if(DEFINED ENV{DPLROOT})
39+
set(DPNP_DPLROOT "$ENV{DPLROOT}" CACHE PATH "Folder contains DPL files from DPLROOT")
40+
endif()
3841

3942
find_path(
40-
PSTL_INCLUDE_DIR oneapi/dpl/algorithm
41-
HINTS ENV CONDA_PREFIX ${PSTL_ROOT_DIR} # search order is important
42-
PATH_SUFFIXES include latest/linux/include
43-
DOC "Path to PSTL include files")
43+
DPL_INCLUDE_DIR oneapi/dpl/algorithm
44+
HINTS ${DPNP_DPLROOT} ${DPNP_ONEAPI_DPL} ENV CONDA_PREFIX ENV PREFIX # search order is important
45+
PATH_SUFFIXES include linux/include
46+
DOC "Path to DPL include files")
4447

45-
find_package_handle_standard_args(PSTL DEFAULT_MSG PSTL_INCLUDE_DIR)
48+
find_package_handle_standard_args(DPL DEFAULT_MSG DPL_INCLUDE_DIR)
4649

47-
if(PSTL_FOUND)
48-
message(STATUS "Found PSTL: (include: ${PSTL_INCLUDE_DIR})")
49-
# mark_as_advanced(PSTL_ROOT_DIR PSTL_INCLUDE_DIR)
50+
if(DPL_FOUND)
51+
message(STATUS "Found DPL: (include: ${DPL_INCLUDE_DIR})")
52+
# mark_as_advanced(DPNP_DPLROOT DPL_INCLUDE_DIR)
5053
endif()

dpnp/backend/cmake/Modules/FindMathLib.cmake

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,8 @@
2424
# *****************************************************************************
2525

2626
# The following variables are optionally searched for defaults
27-
# MATHLIB_ROOT_DIR: Base directory where all components are found
27+
# MKLROOT: Environment variable to specify custom search place
28+
# ONEAPI_ROOT: Environment variable to specify search place from oneAPI
2829
#
2930
# The following are set after configuration is done:
3031
# MATHLIB_FOUND
@@ -33,9 +34,11 @@
3334

3435
include(FindPackageHandleStandardArgs)
3536

36-
set(MATHLIB_ROOT_DIR
37-
"${DPNP_ONEAPI_ROOT}/mkl"
38-
CACHE PATH "Folder contains mathlib")
37+
set(DPNP_ONEAPI_MKL "$ENV{DPNP_ONEAPI_ROOT}/mkl/latest" CACHE PATH "Folder contains Math Lib files from ONEAPI_ROOT")
38+
39+
if(DEFINED ENV{MKLROOT})
40+
set(DPNP_MKLROOT "$ENV{MKLROOT}" CACHE PATH "Folder contains Math Lib files from MKLROOT")
41+
endif()
3942

4043
if(UNIX)
4144
set(MATHLIB_SYCL_LIB
@@ -51,14 +54,14 @@ endif()
5154

5255
find_path(
5356
MATHLIB_INCLUDE_DIR oneapi/mkl.hpp
54-
HINTS ENV CONDA_PREFIX ${MATHLIB_ROOT_DIR} # search order is important
55-
PATH_SUFFIXES include latest/include
57+
HINTS ${DPNP_MKLROOT} ${DPNP_ONEAPI_MKL} ENV CONDA_PREFIX ENV PREFIX # search order is important
58+
PATH_SUFFIXES include include
5659
DOC "Path to mathlib include files")
5760

5861
find_path(
5962
MATHLIB_LIBRARY_DIR ${MATHLIB_SYCL_LIB}
60-
HINTS ENV CONDA_PREFIX ${MATHLIB_ROOT_DIR} # search order is important
61-
PATH_SUFFIXES lib latest/lib/intel64
63+
HINTS ${DPNP_MKLROOT} ${DPNP_ONEAPI_MKL} ENV CONDA_PREFIX ENV PREFIX # search order is important
64+
PATH_SUFFIXES lib lib/intel64
6265
DOC "Path to mathlib library files")
6366

6467
# TODO implement recurcive searching file (GLOB_RECURSE MY_PATH "/opt/intel/*/mkl.hpp")
@@ -68,5 +71,5 @@ find_package_handle_standard_args(MathLib DEFAULT_MSG MATHLIB_INCLUDE_DIR MATHLI
6871

6972
if(MathLib_FOUND)
7073
message(STATUS "Found MathLib: (include: ${MATHLIB_INCLUDE_DIR}, library: ${MATHLIB_LIBRARY_DIR})")
71-
mark_as_advanced(MATHLIB_ROOT_DIR MATHLIB_INCLUDE_DIR MATHLIB_LIBRARY_DIR)
74+
# mark_as_advanced(DPNP_MKLROOT MATHLIB_INCLUDE_DIR MATHLIB_LIBRARY_DIR)
7275
endif()

0 commit comments

Comments
 (0)