Skip to content

Merge master to gold #1425

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 151 commits into from
Jun 12, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
151 commits
Select commit Hold shift + click to select a range
684f393
Add dpnp.broadcast_to() function (#1333)
antonwolfy Mar 7, 2023
29a2063
Add support of bool type in bitwise operations (#1334)
antonwolfy Mar 7, 2023
464e140
Tweaked compiler options used.
oleksandr-pavlyk Mar 13, 2023
d653acf
Specify dependencies on dpnp_algo on other included pyx files
oleksandr-pavlyk Mar 13, 2023
5242cff
Inplace out parameter in elementwise functions
antonwolfy Mar 16, 2023
64093b2
Add support of dpnp.extract() (#1340)
vlad-perevezentsev Mar 17, 2023
75f7da1
Merge branch 'master' into set-dependencies
oleksandr-pavlyk Mar 17, 2023
e4b900b
Merge pull request #1338 from IntelPython/set-dependencies
oleksandr-pavlyk Mar 17, 2023
4de4ef9
Reuse dpctl.tensor.place for dpnp.place (#1337)
vlad-perevezentsev Mar 20, 2023
098e698
Add tests and use dpctl overlap function
antonwolfy Mar 20, 2023
6a2cac6
Merge branch 'master' into fix_inplace
antonwolfy Mar 20, 2023
921893e
Transitioned dpnp build system to use scikit-build
oleksandr-pavlyk Mar 22, 2023
68683d9
Added docs and defaults for supported options
oleksandr-pavlyk Mar 22, 2023
e12576c
Include dpnp/backend/tests if DPNP_BACKEND_TESTS is set
oleksandr-pavlyk Mar 22, 2023
9626bb8
Ignore _skbuild/ folder
oleksandr-pavlyk Mar 22, 2023
9796c48
Use interface library dpnp_backend_library instead of library target …
oleksandr-pavlyk Mar 22, 2023
bb6d2b0
Need scikit-build in host environment
oleksandr-pavlyk Mar 22, 2023
9866674
Removing old CMakeLists.txt
oleksandr-pavlyk Mar 22, 2023
69a54b1
Updated conda-recipe build scipts per changes in build system
oleksandr-pavlyk Mar 22, 2023
18d8d39
Vendored oneDPLConfig.cmake, provide HINTS in find_packages(oneDPL)
oleksandr-pavlyk Mar 22, 2023
327e861
Fixed build.sh to specify install command
oleksandr-pavlyk Mar 22, 2023
84efe0f
Remember to set MKL_DIR and TBB_DIR
oleksandr-pavlyk Mar 22, 2023
840e3ff
Vendor TBBConfig.cmake since it has only been added to tbb-devel in 2…
oleksandr-pavlyk Mar 22, 2023
4e86577
Tweaked TBBConfig to use find_library instead of find_filename_component
oleksandr-pavlyk Mar 23, 2023
bac4c4b
Use find_path in oneDPLConfig.cmake
oleksandr-pavlyk Mar 23, 2023
8a85303
Merge branch 'master' into use-skbuild-and-cmake
oleksandr-pavlyk Mar 23, 2023
9ec7643
Use . as possible suffix instead of empty string
oleksandr-pavlyk Mar 23, 2023
0fd3859
Merge branch 'use-skbuild-and-cmake' of http://github.com/IntelPython…
oleksandr-pavlyk Mar 23, 2023
a118769
Set DPL_ROOT_HINT, MKL_ROOT_HINT, TBB_ROOT_HINT
oleksandr-pavlyk Mar 23, 2023
2e44586
Adding HINTS to find_library/find_path calls, fixed typo
oleksandr-pavlyk Mar 23, 2023
a96f6a0
Add logic to set DPCTL_MODULE_PATH in bld.bat
oleksandr-pavlyk Mar 23, 2023
e04c081
Install scikit-build in build-sphinx.yaml
oleksandr-pavlyk Mar 23, 2023
43d07e6
Corrected build command in build-sphinx, also install ninja
oleksandr-pavlyk Mar 23, 2023
d56b0b6
Replaced stray get_filename_component with find_path
oleksandr-pavlyk Mar 23, 2023
45c6c11
Ensure to use vendored TBBConfig.cmake and oneDPLConfig.cmake
oleksandr-pavlyk Mar 24, 2023
d9b0a2d
HINTs should point to %CONDA_PREFIX%/Library
oleksandr-pavlyk Mar 24, 2023
5257e0f
Fixed typos HITNS->HINTS, improved find_path call for _dpl_headers
oleksandr-pavlyk Mar 24, 2023
a9a5b4b
Vendor MKLConfig.cmake too to fix issue with MKL_DLL_FILE search paths
oleksandr-pavlyk Mar 24, 2023
3330e9c
Completed support for DPNP_GENERATE_COVERAGE
oleksandr-pavlyk Mar 24, 2023
83fa049
Use PREFIX rather than CONDA_PREFIX in build scripts
oleksandr-pavlyk Mar 24, 2023
3f9773b
Fixed cmake scripts to work on Windows with conda build
oleksandr-pavlyk Mar 24, 2023
1dd0589
Removed debugging message(STATUS msg_txt)
oleksandr-pavlyk Mar 25, 2023
bab5fdf
Use no-approx-func and no-finite-math-only to build backend
oleksandr-pavlyk Mar 25, 2023
cc32075
Request TBB backend for oneDPL
oleksandr-pavlyk Mar 26, 2023
e23ecd7
Vendored oneDPLConfig.cmake should ensure calling vendored TBBConfig.…
oleksandr-pavlyk Mar 26, 2023
b14555e
Ensure library is installed in dpnp on Win
oleksandr-pavlyk Mar 26, 2023
4cc9492
Work around lack of support for -fno-approx-func in icx.exe
oleksandr-pavlyk Mar 27, 2023
52e5ee0
rename dpctl to dpnp in bld.bat for wheels copying
ekomarova Mar 27, 2023
3c870f6
Allow asarray to work on sequences of dpnp_array with support compute…
npolina4 Mar 29, 2023
0568397
Added tests for asarray function.
npolina4 Mar 29, 2023
530f94f
Only set GXX-specific defined on Unix
oleksandr-pavlyk Mar 31, 2023
01a11e4
sycl_queue check returned for dpnp.asarray() function.
npolina4 Mar 31, 2023
c1c40e3
Merge pull request #1341 from antonwolfy/fix_inplace
npolina4 Mar 31, 2023
c7858af
Update tests/test_sycl_queue.py
antonwolfy Mar 31, 2023
c7ae46e
Merge branch 'master' into fix_asarray_sequences
npolina4 Mar 31, 2023
c88ded7
Renamed included dpnp_algo_*.pyx files to *.pxi
oleksandr-pavlyk Mar 31, 2023
ee8f15a
Merge pull request #1355 from IntelPython/fix_asarray_sequences
npolina4 Apr 1, 2023
d41ed51
Support parameter out in dpnp.add() (#1329)
antonwolfy Apr 3, 2023
b536ae9
Merge pull request #1356 from IntelPython/rename-included-pyx-to-pxi
oleksandr-pavlyk Apr 3, 2023
20c262e
PR template: memento perficientur
antonwolfy Apr 3, 2023
1f6619a
Support parameter out in dpnp.multiply()
antonwolfy Apr 3, 2023
2168093
Implement support of tuple key in __getitem__ and __setitem__ (#1362)
antonwolfy Apr 4, 2023
6748b93
Implement 'nbytes' property of dpnp array
antonwolfy Apr 3, 2023
1b4f398
Update dpnp/dpnp_array.py
antonwolfy Apr 3, 2023
8e45a67
Enable profiling for .pxi and .pyx files
vlad-perevezentsev Apr 4, 2023
88f9f82
Add gen_coverage script
vlad-perevezentsev Apr 4, 2023
2a9a9c7
Adding a script to drive build of dpnp
oleksandr-pavlyk Apr 4, 2023
22880e6
Removed uses of 0.build.sh and 1.build.bat
oleksandr-pavlyk Apr 4, 2023
0416c41
Corrected documentation for option cmake-opts
oleksandr-pavlyk Apr 4, 2023
25e0f19
Fix gh-1352 dpnp.sum() for empty array crashes.
npolina4 Apr 5, 2023
15babb0
Fixed dpnp.sum() function with output argument.
npolina4 Apr 5, 2023
d122322
Fixed erroneous call.
npolina4 Apr 5, 2023
26f73d5
Merge pull request #1368 from vlad-perevezentsev/cython_profiling
oleksandr-pavlyk Apr 5, 2023
b6ce69a
Add generate_coverage.yaml
vlad-perevezentsev Apr 5, 2023
9bf1cc4
set env
vlad-perevezentsev Apr 5, 2023
15f2855
Set OSL_ICD_FILENAMES env
vlad-perevezentsev Apr 5, 2023
c389b9d
Support `out` parameter in dpnp.sqrt() (#1332)
vlad-perevezentsev Apr 5, 2023
bc628d0
Added tests for function sum() with diffent data types of output and …
npolina4 Apr 5, 2023
17f9977
Merge branch 'master' into fix-gh-1352
npolina4 Apr 5, 2023
e39f7a9
Merge pull request #1366 from IntelPython/add-scripts-build-locally
oleksandr-pavlyk Apr 5, 2023
9800998
Merge remote-tracking branch 'origin/master' into use-skbuild-and-cmake
oleksandr-pavlyk Apr 5, 2023
1aec74d
Add dummy use of SKBUILD cmake variable to avoid warning
oleksandr-pavlyk Apr 5, 2023
bc60d08
add coveralls support
vlad-perevezentsev Apr 5, 2023
58135be
Update generage_coverage.yaml
vlad-perevezentsev Apr 5, 2023
b9dd88e
Enable running all tests for coverage
vlad-perevezentsev Apr 5, 2023
63b2571
ignore test_random.py
vlad-perevezentsev Apr 5, 2023
e71d9dc
Fix OCL CPU RT activation in test_windows step
oleksandr-pavlyk Apr 6, 2023
d65a635
Merge pull request #1369 from IntelPython/fix-gh-1352
npolina4 Apr 6, 2023
95232dc
No need to set OCL_ICD_FILENAMES on Linux either with intel-opencl-rt…
oleksandr-pavlyk Apr 6, 2023
f771699
Merge branch 'master' into fix-test-windows-ocl-activation
oleksandr-pavlyk Apr 6, 2023
ee17454
Skip falling tests on cpu
vlad-perevezentsev Apr 6, 2023
b419bce
Skip falling tests in test_random and remove --ignore flag in pytest
vlad-perevezentsev Apr 6, 2023
e9cfc00
Add parser for command-line options
vlad-perevezentsev Apr 6, 2023
ee6d2e4
Fix a mistake
vlad-perevezentsev Apr 6, 2023
a53fd6b
Merge use-skbuild-and-cmake into add_gen_coverage
vlad-perevezentsev Apr 6, 2023
67b488c
Change branch name in generate_coverage.yaml
vlad-perevezentsev Apr 6, 2023
650b38a
Merge pull request #1372 from IntelPython/fix-test-windows-ocl-activa…
oleksandr-pavlyk Apr 6, 2023
5adbab0
Merge remote-tracking branch 'origin/master' into use-skbuild-and-cmake
oleksandr-pavlyk Apr 6, 2023
554e978
Merge use-skbuild-and-cmake into add_gen_coverage
vlad-perevezentsev Apr 6, 2023
a8950c5
Fix remarks in CMakeLists
vlad-perevezentsev Apr 6, 2023
a9d7906
Add --ignore test_strides.py in yaml
vlad-perevezentsev Apr 6, 2023
9543c23
Unset OCL_ICD_FILENAMES
vlad-perevezentsev Apr 6, 2023
d2c3fbc
Update scripts/gen_coverage.py
oleksandr-pavlyk Apr 7, 2023
10018ba
Merge pull request #1373 from vlad-perevezentsev/add_gen_coverage
oleksandr-pavlyk Apr 7, 2023
12e791e
Merge pull request #1349 from IntelPython/use-skbuild-and-cmake
oleksandr-pavlyk Apr 8, 2023
2dfa804
using rowvar flag in dpnp.cov
vtavana Apr 5, 2023
1ec95dd
OneMKL 2023.1 includes fix gaussian() with box_muller2 method
antonwolfy Feb 15, 2023
9cb5848
Rename a variable with numpy array to 'expected' in tests
antonwolfy Apr 26, 2023
1a3864e
fix_cov_for_no_fp64
vtavana Apr 19, 2023
13575a3
Use internal dpnp kernel instead of MKL if no FP64 support
antonwolfy Apr 20, 2023
69eae31
Get rid of default casting to double while invoking sycl::efr() and s…
antonwolfy Apr 25, 2023
84b9f99
Update test for dpnp.erf() with strides
antonwolfy Apr 26, 2023
153f1ca
Add dpnp.linalg.eigh() function
antonwolfy Apr 19, 2023
5859aec
Applying the review comments
antonwolfy Apr 20, 2023
4d27b4c
Added array type check in dpnp.get_usm_ndarray()
antonwolfy Apr 29, 2023
25e6b9a
Fix compilation error with sycl::abs()
antonwolfy May 5, 2023
02d86b5
Change branches for generate coverage push event (#1384)
vlad-perevezentsev May 23, 2023
2e4a389
Update scripts for conda recipe (#1394)
vlad-perevezentsev May 24, 2023
de9a7b1
Pin to sysroot 2.28 or above
antonwolfy May 23, 2023
04bd709
Extending workaround of ignoring per_kernel option to cmake 2.26
antonwolfy May 24, 2023
3a03847
Modify the code to patch Windows-IntelLLVM.cmake for different cmake
antonwolfy May 24, 2023
4674624
Reuse OneDPL implementation of std::nth_element() for partition of 1D…
antonwolfy May 22, 2023
f4c8986
Add complex type in dpnp.copy() and tune tests
antonwolfy May 22, 2023
5c67ba3
Added dpnp.ndarray.partition() & unmuted cupy tests
antonwolfy May 23, 2023
340ec40
Fix generation of coverage in GitHub Action (#1397)
vlad-perevezentsev May 31, 2023
30dedf5
Add type dispatching to pybind11 extension of dpnp.linalg.eigh()
antonwolfy May 2, 2023
b90e391
Added dep on dpctl tensor headers and removed todo
antonwolfy May 31, 2023
675fbc3
Resolved compilation errors
antonwolfy May 31, 2023
dfca733
Fix coverage action
antonwolfy May 31, 2023
74153fb
Fix sphinix build
antonwolfy May 31, 2023
8e2c5f7
Added print of dpctl includes
antonwolfy May 31, 2023
4e4d231
reuse dpctl.tensor.moveaxis for dpnp.moveaxis
vlad-perevezentsev Apr 19, 2023
ac5d887
Fix remark
vlad-perevezentsev Apr 27, 2023
2cd7600
Reuse dpctl.tensor.squeeze for dpnp.squeeze
vlad-perevezentsev Apr 17, 2023
67e5ce1
Fix remarks
vlad-perevezentsev Apr 27, 2023
3b3fecf
Remove dpnp.where implementation
vlad-perevezentsev Apr 14, 2023
40aa693
Reuse dpctl.tensor.where in dpnp.where
vlad-perevezentsev Apr 17, 2023
b69ab1e
Fix small remark
vlad-perevezentsev Apr 17, 2023
85f0b2c
Remove debug empty print from test_eigenvalue.py
antonwolfy Jun 6, 2023
c088ee9
Pin minimum version of cmake >=3.21 for generate_coverage
vlad-perevezentsev Jun 7, 2023
bea6107
Set a new coverage badge
vlad-perevezentsev Jun 7, 2023
d4bd63a
Improve dpnp.div() implementation:
antonwolfy Jun 1, 2023
be8c671
Add support of order=None
antonwolfy Jun 6, 2023
cd4f0d4
add docstrings for out and order
antonwolfy Jun 7, 2023
fc7e959
Fix hanging in tril
antonwolfy Jun 9, 2023
d9d358e
Remove w/a in divide tests for type aligning with numpy
antonwolfy Jun 9, 2023
aa09ab5
only events from host task has to be passed in keep_args_alive()
antonwolfy Jun 9, 2023
1b4b671
exclude call of div() with MKL 2023.1.0
antonwolfy Jun 12, 2023
2e9b9e3
w/a for MKL calls
antonwolfy Jun 12, 2023
a7aa9af
Update versions
antonwolfy Jun 7, 2023
255702a
Merge branch 'master' into merge_to_gold
antonwolfy Jun 12, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/build-sphinx.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ jobs:
sudo apt-get install -y nvidia-cuda-toolkit clinfo

- name: Checkout repo
uses: actions/checkout@v3.3.0
uses: actions/checkout@v3.5.2

# https://github.com/marketplace/actions/setup-miniconda
- name: Setup miniconda
Expand Down Expand Up @@ -108,7 +108,7 @@ jobs:
if: |
!github.event.pull_request.head.repo.fork &&
(github.ref == 'refs/heads/master' || (startsWith(github.ref, 'refs/heads/release') == true) || github.event_name == 'push' && contains(github.ref, 'refs/tags/'))
uses: peaceiris/[email protected].2
uses: peaceiris/[email protected].3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: doc/_build/html/
12 changes: 8 additions & 4 deletions .github/workflows/conda-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ jobs:
access_token: ${{ github.token }}

- name: Checkout DPNP repo
uses: actions/checkout@v3.3.0
uses: actions/checkout@v3.5.2
with:
fetch-depth: 0

Expand All @@ -76,7 +76,7 @@ jobs:
run: conda install conda-build

- name: Cache conda packages
uses: actions/cache@v3.2.6
uses: actions/cache@v3.3.0
env:
CACHE_NUMBER: 1 # Increase to reset cache
with:
Expand Down Expand Up @@ -169,7 +169,7 @@ jobs:
TEST_CHANNELS: '-c ${{ env.channel-path }} ${{ env.CHANNELS }}'

- name: Cache conda packages
uses: actions/cache@v3.2.6
uses: actions/cache@v3.3.0
env:
CACHE_NUMBER: 1 # Increase to reset cache
with:
Expand All @@ -196,6 +196,8 @@ jobs:
run: |
python -m pytest -q -ra --disable-warnings -vv ${{ env.TEST_SCOPE }}
working-directory: ${{ env.tests-path }}
env:
SYCL_QUEUE_THREAD_POOL_SIZE: 6

test_windows:
name: Test ['windows-latest', python='${{ matrix.python }}']
Expand Down Expand Up @@ -292,7 +294,7 @@ jobs:
run: more lockfile

- name: Cache conda packages
uses: actions/cache@v3.2.6
uses: actions/cache@v3.3.0
env:
CACHE_NUMBER: 1 # Increase to reset cache
with:
Expand Down Expand Up @@ -333,6 +335,8 @@ jobs:
run: |
python -m pytest -q -ra --disable-warnings -vv ${{ env.TEST_SCOPE }}
working-directory: ${{ env.tests-path }}
env:
SYCL_QUEUE_THREAD_POOL_SIZE: 6

upload:
name: Upload ['${{ matrix.os }}', python='${{ matrix.python }}']
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/generate_coverage.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
access_token: ${{ github.token }}

- name: Checkout repo
uses: actions/checkout@v3
uses: actions/checkout@v3.5.2
with:
fetch-depth: 0

Expand All @@ -41,7 +41,7 @@ jobs:
sudo apt-get install lcov
- name: Install dpnp dependencies
run: |
conda install cython llvm cmake scikit-build ninja pytest pytest-cov coverage[toml] \
conda install cython llvm cmake">=3.21" scikit-build ninja pytest pytest-cov coverage[toml] \
dpctl dpcpp_linux-64 sysroot_linux-64">=2.28" mkl-devel-dpcpp tbb-devel onedpl-devel ${{ env.CHANNELS }}
- name: Conda info
run: |
Expand All @@ -66,6 +66,7 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
COVERALLS_PARALLEL: true
SYCL_QUEUE_THREAD_POOL_SIZE: 6

coveralls:
name: Indicate completion to coveralls.io
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/pre-commit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ jobs:
pre-commit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3.3.0
- uses: actions/setup-python@v4.5.0
- uses: actions/checkout@v3.5.2
- uses: actions/setup-python@v4.6.1
with:
python-version: '3.10'
- uses: pre-commit/[email protected]
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[![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)
[![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)
[![codecov](https://codecov.io/gh/IntelPython/dpnp/branch/master/graph/badge.svg)](https://codecov.io/gh/IntelPython/dpnp)
[![Coverage Status](https://coveralls.io/repos/github/IntelPython/dpnp/badge.svg?branch=master)](https://coveralls.io/github/IntelPython/dpnp?branch=master)
[![Build Sphinx](https://github.com/IntelPython/dpnp/workflows/Build%20Sphinx/badge.svg)](https://intelpython.github.io/dpnp)

# DPNP - Data Parallel Extension for NumPy*
Expand Down
2 changes: 1 addition & 1 deletion doc/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
# The short X.Y version
version = '0.11'
# The full version, including alpha/beta/rc tags
release = '0.11.1'
release = '0.11.2dev1'


# -- General configuration ---------------------------------------------------
Expand Down
1 change: 1 addition & 0 deletions dpnp/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ endfunction()
build_dpnp_cython_ext_with_backend(dparray ${CMAKE_CURRENT_SOURCE_DIR}/dparray.pyx dpnp)
add_subdirectory(backend)
add_subdirectory(backend/extensions/lapack)
add_subdirectory(backend/extensions/vm)

add_subdirectory(dpnp_algo)
add_subdirectory(dpnp_utils)
Expand Down
2 changes: 2 additions & 0 deletions dpnp/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@
os.add_dll_directory(dpctlpath)
os.environ["PATH"] = os.pathsep.join([os.getenv("PATH", ""), mypath, dpctlpath])

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

from dpnp.dpnp_array import dpnp_array as ndarray
from dpnp.dpnp_flatiter import flatiter as flatiter
Expand Down
2 changes: 1 addition & 1 deletion dpnp/backend/doc/Doxyfile
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ PROJECT_NAME = "DPNP C++ backend kernel library"
# could be handy for archiving the generated documentation or if some version
# control system is used.

PROJECT_NUMBER = 0.11.1
PROJECT_NUMBER = 0.11.2dev1

# Using the PROJECT_BRIEF tag one can provide an optional one line description
# for a project that appears at the top of each page and should give viewer a
Expand Down
75 changes: 75 additions & 0 deletions dpnp/backend/extensions/vm/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
# *****************************************************************************
# Copyright (c) 2023, Intel Corporation
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
# - Redistributions of source code must retain the above copyright notice,
# this list of conditions and the following disclaimer.
# - Redistributions in binary form must reproduce the above copyright notice,
# this list of conditions and the following disclaimer in the documentation
# and/or other materials provided with the distribution.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
# THE POSSIBILITY OF SUCH DAMAGE.
# *****************************************************************************


set(python_module_name _vm_impl)
pybind11_add_module(${python_module_name} MODULE
vm_py.cpp
div.cpp
)

if (WIN32)
if (${CMAKE_VERSION} VERSION_LESS "3.27")
# this is a work-around for target_link_options inserting option after -link option, cause
# linker to ignore it.
set(CMAKE_CXX_LINK_FLAGS "${CMAKE_CXX_LINK_FLAGS} -fsycl-device-code-split=per_kernel")
endif()
endif()

set_target_properties(${python_module_name} PROPERTIES CMAKE_POSITION_INDEPENDENT_CODE ON)

target_include_directories(${python_module_name} PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/../../include)
target_include_directories(${python_module_name} PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/../../src)

target_include_directories(${python_module_name} PUBLIC ${Dpctl_INCLUDE_DIRS})
target_include_directories(${python_module_name} PUBLIC ${Dpctl_TENSOR_INCLUDE_DIR})

if (WIN32)
target_compile_options(${python_module_name} PRIVATE
/clang:-fno-approx-func
/clang:-fno-finite-math-only
)
else()
target_compile_options(${python_module_name} PRIVATE
-fno-approx-func
-fno-finite-math-only
)
endif()

target_link_options(${python_module_name} PUBLIC -fsycl-device-code-split=per_kernel)
if (UNIX)
# this option is support on Linux only
target_link_options(${python_module_name} PUBLIC -fsycl-link-huge-device-code)
endif()

if (DPNP_GENERATE_COVERAGE)
target_link_options(${python_module_name} PRIVATE -fprofile-instr-generate -fcoverage-mapping)
endif()

target_link_libraries(${python_module_name} PUBLIC MKL::MKL_DPCPP)

install(TARGETS ${python_module_name}
DESTINATION "dpnp/backend/extensions/vm"
)
Loading