Skip to content

Merge 0.13.1dev1 from master to gold #1653

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 52 commits into from
Jan 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
52 commits
Select commit Hold shift + click to select a range
a09549b
Update dpnp.geomspace and dpnp.logspace functions
npolina4 Oct 19, 2023
b82ba6c
Merge branch 'master' into logspace_geomspace
npolina4 Oct 19, 2023
1f559fb
Added more test for geomspace and logspace functions
npolina4 Oct 19, 2023
0b5f250
Merge branch 'logspace_geomspace' of https://github.com/IntelPython/d…
npolina4 Oct 19, 2023
008bc6b
Merge branch 'master' into logspace_geomspace
npolina4 Oct 19, 2023
e64576f
Added tests for geomspace zero error
npolina4 Oct 19, 2023
9491037
Merge branch 'logspace_geomspace' of https://github.com/IntelPython/d…
npolina4 Oct 19, 2023
3470248
address comments
npolina4 Oct 31, 2023
0ff2baf
Merge branch 'master' into logspace_geomspace
npolina4 Oct 31, 2023
ce2ccff
Added tests
npolina4 Oct 31, 2023
9a48b7d
Merge branch 'master' into logspace_geomspace
npolina4 Oct 31, 2023
61241cc
skip test logspace base
npolina4 Oct 31, 2023
440fe6a
Leverage dpctl.tensor.repeat() implementation
npolina4 Nov 2, 2023
3c2d330
clean up flatten function
npolina4 Nov 3, 2023
296102b
address comments
npolina4 Nov 6, 2023
71895f9
Merge branch 'master' into logspace_geomspace
npolina4 Nov 6, 2023
1f6ee26
Fix linspace docs
npolina4 Nov 7, 2023
db127d4
implement dpnp.prod and dpnp.nanprod (#1613)
vtavana Nov 7, 2023
6c94a9d
Update dpnp/dpnp_iface_arraycreation.py
npolina4 Nov 7, 2023
6e792b0
Merge branch 'master' into logspace_geomspace
npolina4 Nov 7, 2023
79cb518
implement dpnp.max and dpnp.min using dpctl.tensor functions (#1602)
vtavana Nov 8, 2023
ce12203
Merge branch 'master' into logspace_geomspace
npolina4 Nov 8, 2023
247a266
Merge pull request #1603 from IntelPython/logspace_geomspace
npolina4 Nov 8, 2023
c26870e
Merge branch 'master' into reuse_dpctl_repeat
npolina4 Nov 8, 2023
c31557c
in place divide and floor_divide (#1587)
vtavana Nov 13, 2023
237a5f1
address comments
npolina4 Nov 15, 2023
e14898b
Merge branch 'master' into reuse_dpctl_repeat
npolina4 Nov 15, 2023
b81bfb9
muted tests for diagflat for scalars
npolina4 Nov 16, 2023
96021f0
Merge pull request #1614 from IntelPython/reuse_dpctl_repeat
npolina4 Nov 16, 2023
630dae2
Pin DPC++ compiler to 2023.2.1 for coverage to work around a crash in…
antonwolfy Nov 20, 2023
5bcf910
rework implementation of diag, diagflat, vander, and ptp (#1579)
vtavana Nov 20, 2023
525116a
Require dpcpp compiler 2024.0 and runtime >=2024.0 (#1625)
npolina4 Nov 23, 2023
7d0815f
implement dpnp.argmin and dpnp.argmax using dpctl.tensor (#1610)
vtavana Nov 23, 2023
0604f18
remove skip test (#1629)
vtavana Nov 23, 2023
780d686
implement dpnp.cbrt, dpnp.exp2, dpnp.copysign, dpnp.rsqrt (#1624)
vtavana Nov 24, 2023
912bb77
Update deploy step of a job with building docs (#1631)
antonwolfy Nov 28, 2023
ad90f66
implement dpnp.mean (#1632)
vtavana Nov 29, 2023
2c8cbb5
Add type checking in `assert_dtype_allclose` for inexact dtypes (#1634)
vlad-perevezentsev Dec 5, 2023
a7add8e
Redesign `dpnp.put_along_axis` and `dpnp.take_along_axis` thorough ex…
antonwolfy Dec 6, 2023
9575363
Redesign `dpnp.diff` thorough existing calls (#1637)
antonwolfy Dec 7, 2023
d090de9
Add support of missing arguments in `dpnp.amax` and `dpnp.amin` (#1639)
antonwolfy Dec 11, 2023
4f3b2de
Stay away from 2024.0.1 compiler package (#1643)
antonwolfy Dec 12, 2023
28d3348
Retrying build coverage step on failure (#1640)
antonwolfy Dec 12, 2023
e2188ed
Align arguments of true_divide with divide (#1641)
antonwolfy Dec 12, 2023
74609d6
Add dpnp.linalg.solve() function (#1598)
vlad-perevezentsev Dec 13, 2023
996cf54
impelment dpnp.std, dpnp.var and dpnp.nanvar (#1635)
vtavana Dec 16, 2023
d9c1ca1
Implement of dpnp.clip() (#1645)
npolina4 Dec 16, 2023
680d903
implement `dpnp.nanargmax`, `dpnp.nanargmin`, `dpnp.nanmax`, and `dpn…
vtavana Dec 20, 2023
9e8323e
Added missing `dpnp.column_stack`, `dpnp.dstack` and `dpnp.row_stack`…
antonwolfy Dec 22, 2023
20513fb
implement `dpnp.logsumexp` and `dpnp.reduce_hypot` (#1648)
vtavana Dec 22, 2023
5b25163
Resolve compilation warnings (#1651)
antonwolfy Jan 9, 2024
9c63896
Merge branch 'master' into merge_to_gold
antonwolfy Jan 9, 2024
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
42 changes: 27 additions & 15 deletions .github/workflows/build-sphinx.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,12 @@ on:
types: [opened, synchronize, reopened, closed]

env:
GH_BOT_NAME: 'github-actions[bot]'
GH_BOT_EMAIL: 'github-actions[bot]@users.noreply.github.com'
GH_EVENT_OPEN_PR_UPSTREAM: ${{ github.event_name == 'pull_request' && github.event.action != 'closed' &&
github.event.pull_request && !github.event.pull_request.head.repo.fork }}
GH_EVENT_PUSH_UPSTREAM: ${{ github.ref == 'refs/heads/master' && github.event_name == 'push' &&
github.event.ref == 'refs/heads/master' && github.event.repository && !github.event.repository.fork }}
PUBLISH_DIR: doc/_build/html/

defaults:
Expand Down Expand Up @@ -91,7 +97,7 @@ jobs:

- name: Install dpnp dependencies
run: |
conda install numpy"<1.24" dpctl">=0.15.1dev1" mkl-devel-dpcpp onedpl-devel tbb-devel dpcpp_linux-64 \
conda install numpy"<1.24" dpctl">=0.15.1dev2" mkl-devel-dpcpp onedpl-devel tbb-devel dpcpp_linux-64"<2024.0.1" \
cmake cython pytest ninja scikit-build sysroot_linux-64">=2.28" ${{ env.CHANNELS }}

- name: Install cuPy dependencies
Expand Down Expand Up @@ -125,36 +131,40 @@ jobs:
working-directory: 'dpnp/backend/doc'

- name: Copy backend docs
run: cp -r dpnp/backend/doc/html doc/_build/html/backend_doc
run: cp -r dpnp/backend/doc/html ${{ env.PUBLISH_DIR }}/backend_doc

# https://github.com/marketplace/actions/github-pages-action
# The step is only used to build docs while pushing a PR to "master"
- name: Deploy docs
if: |
github.event.pull_request && !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/'))
if: env.GH_EVENT_PUSH_UPSTREAM
uses: peaceiris/actions-gh-pages@v3.9.3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ${{ env.PUBLISH_DIR }}
keep_files: true
commit_message: ${{ github.event.head_commit.message }}
publish_branch: gh-pages
user_name: ${{ env.GH_BOT_NAME }}
user_email: ${{ env.GH_BOT_EMAIL }}

# The step is only used to build docs while pushing to PR branch
- name: Publish pull-request docs
if: |
github.event.pull_request && !github.event.pull_request.head.repo.fork && github.event.action != 'closed'
if: env.GH_EVENT_OPEN_PR_UPSTREAM
uses: peaceiris/actions-gh-pages@v3.9.3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ${{ env.PUBLISH_DIR }}
destination_dir: ./pull/${{ github.event.number }}
allow_empty_commit : true
keep_files: true
commit_message: ${{ github.event.head_commit.message }}
commit_message: ${{ github.event.pull_request.title }}
publish_branch: gh-pages
user_name: 'github-actions[bot]'
user_email: 'github-actions[bot]@users.noreply.github.com'
user_name: ${{ env.GH_BOT_NAME }}
user_email: ${{ env.GH_BOT_EMAIL }}

# The step is only used to build docs while pushing to PR branch
- name: Comment with URL to published pull-request docs
if: |
github.event.pull_request && !github.event.pull_request.head.repo.fork && github.event.action != 'closed'
if: env.GH_EVENT_OPEN_PR_UPSTREAM
env:
PR_NUM: ${{ github.event.number }}
uses: mshick/add-pr-comment@v2.8.1
Expand All @@ -163,9 +173,11 @@ jobs:
View rendered docs @ https://intelpython.github.io/dpnp/pull/${{ env.PR_NUM }}/index.html
allow-repeats: false

# The job is only used to build docs when PR is closed (action from PR branch)
clean:
if: |
github.event.pull_request && !github.event.pull_request.head.repo.fork && github.event.action == 'closed'
github.event_name == 'pull_request' && github.event.action == 'closed' &&
github.event.pull_request && !github.event.pull_request.head.repo.fork

needs: build-and-deploy

Expand All @@ -185,8 +197,8 @@ jobs:
git checkout --track tokened_docs/gh-pages
echo `pwd`
[ -d pull/${PR_NUM} ] && git rm -rf pull/${PR_NUM}
git config --global user.name 'github-actions[bot]'
git config --global user.email 'github-actions[bot]@users.noreply.github.com'
git config --global user.name ${{ env.GH_BOT_NAME }}
git config --global user.email ${{ env.GH_BOT_EMAIL }}
git commit -m "Removing docs for closed pull request ${PR_NUM}"
git push tokened_docs gh-pages

Expand Down
15 changes: 6 additions & 9 deletions .github/workflows/conda-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ env:
# TODO: to add test_arraymanipulation.py back to the scope once crash on Windows is gone
TEST_SCOPE: >-
test_arraycreation.py
test_amin_amax.py
test_dot.py
test_dparray.py
test_copy.py
Expand All @@ -24,28 +25,24 @@ env:
test_random_state.py
test_sort.py
test_special.py
test_statistics.py
test_sycl_queue.py
test_umath.py
test_usm_type.py
third_party/cupy/core_tests
third_party/cupy/linalg_tests/test_product.py
third_party/cupy/linalg_tests/test_solve.py
third_party/cupy/logic_tests/test_comparison.py
third_party/cupy/logic_tests/test_truth.py
third_party/cupy/manipulation_tests/test_basic.py
third_party/cupy/manipulation_tests/test_dims.py
third_party/cupy/manipulation_tests/test_join.py
third_party/cupy/manipulation_tests/test_rearrange.py
third_party/cupy/manipulation_tests/test_transpose.py
third_party/cupy/math_tests/test_arithmetic.py
third_party/cupy/math_tests/test_explog.py
third_party/cupy/math_tests/test_floating.py
third_party/cupy/math_tests/test_hyperbolic.py
third_party/cupy/math_tests/test_matmul.py
third_party/cupy/math_tests/test_misc.py
third_party/cupy/math_tests/test_rounding.py
third_party/cupy/math_tests/test_trigonometric.py
third_party/cupy/math_tests
third_party/cupy/sorting_tests/test_sort.py
third_party/cupy/sorting_tests/test_count.py
third_party/cupy/statistics_tests/test_meanvar.py
VER_JSON_NAME: 'version.json'
VER_SCRIPT1: "import json; f = open('version.json', 'r'); j = json.load(f); f.close(); "
VER_SCRIPT2: "d = j['dpnp'][0]; print('='.join((d[s] for s in ('version', 'build'))))"
Expand Down Expand Up @@ -422,7 +419,7 @@ jobs:
run: conda install anaconda-client

- name: Checkout repo
uses: actions/checkout@v2
uses: actions/checkout@v3.5.2
with:
repository: IntelPython/devops-tools
fetch-depth: 0
Expand Down
22 changes: 19 additions & 3 deletions .github/workflows/generate_coverage.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:

env:
python-ver: '3.10'
CHANNELS: '-c dppy/label/dev -c intel -c conda-forge --override-channels'
CHANNELS: '-c dppy/label/coverage -c intel -c conda-forge --override-channels'

steps:
- name: Cancel Previous Runs
Expand All @@ -42,17 +42,33 @@ jobs:

- name: Install dpnp dependencies
run: |
# use DPC++ compiler 2023.2 to work around an issue with crash
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 }}
dpctl">=0.15.1dev2" dpcpp_linux-64"=2023.2" sysroot_linux-64">=2.28" mkl-devel-dpcpp tbb-devel"=2021.10" \
onedpl-devel ${{ env.CHANNELS }}

- name: Conda info
run: |
conda info
conda list

- name: Build dpnp with coverage
id: build_coverage
uses: nick-fields/retry@v2.9.0
with:
shell: bash
timeout_minutes: 60
max_attempts: 5
retry_on: error
command: |
. $CONDA/etc/profile.d/conda.sh
conda activate coverage
git clean -fxd
python scripts/gen_coverage.py --pytest-opts="--ignore tests/test_random.py"

- name: Total number of coverage attempts
run: |
python scripts/gen_coverage.py --pytest-opts="--ignore tests/test_random.py"
echo "Total number of coverage attempts made: ${{ steps.build_coverage.outputs.total_attempts }}"

- name: Install coverall dependencies
run: |
Expand Down
11 changes: 7 additions & 4 deletions conda-recipe/meta.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
{% set required_compiler_and_mkl_version = "2024.0" %}
{% set required_dpctl_version = "0.15.1dev2" %}

package:
name: dpnp
version: {{ GIT_DESCRIBE_TAG }}
Expand All @@ -13,19 +16,19 @@ requirements:
- cmake >=3.21
- ninja
- git
- dpctl >=0.15.1dev1
- mkl-devel-dpcpp {{ environ.get('MKL_VER', '>=2024.0.0') }}
- dpctl >={{ required_dpctl_version }}
- mkl-devel-dpcpp >={{ required_compiler_and_mkl_version }}
- onedpl-devel
- tbb-devel
- wheel
- scikit-build
build:
- {{ compiler('cxx') }}
- {{ compiler('dpcpp') }} >=2024.0.0 # [not osx]
- {{ compiler('dpcpp') }} >={{ required_compiler_and_mkl_version }} # [not osx]
- sysroot_linux-64 >=2.28 # [linux]
run:
- python
- dpctl >=0.15.1dev1
- {{ pin_compatible('dpctl', min_pin='x.x.x', max_pin=None) }}
- {{ pin_compatible('dpcpp-cpp-rt', min_pin='x.x', max_pin='x') }}
- {{ pin_compatible('mkl-dpcpp', min_pin='x.x', max_pin='x') }}
- {{ pin_compatible('numpy', min_pin='x.x', max_pin='x') }}
Expand Down
2 changes: 2 additions & 0 deletions doc/reference/math.rst
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ Trigonometric functions
dpnp.unwrap
dpnp.deg2rad
dpnp.rad2deg
dpnp.reduce_hypot


Hyperbolic functions
Expand Down Expand Up @@ -94,6 +95,7 @@ Exponents and logarithms
dpnp.log1p
dpnp.logaddexp
dpnp.logaddexp2
dpnp.logsumexp


Other special functions
Expand Down
1 change: 1 addition & 0 deletions dpnp/backend/extensions/lapack/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
set(python_module_name _lapack_impl)
set(_module_src
${CMAKE_CURRENT_SOURCE_DIR}/lapack_py.cpp
${CMAKE_CURRENT_SOURCE_DIR}/gesv.cpp
${CMAKE_CURRENT_SOURCE_DIR}/heevd.cpp
${CMAKE_CURRENT_SOURCE_DIR}/syevd.cpp
)
Expand Down
55 changes: 55 additions & 0 deletions dpnp/backend/extensions/lapack/common_helpers.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
//*****************************************************************************
// 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.
//*****************************************************************************

#pragma once
#include <cstring>
#include <stdexcept>

namespace dpnp
{
namespace backend
{
namespace ext
{
namespace lapack
{
namespace helper
{
template <typename T>
struct value_type_of
{
using type = T;
};

template <typename T>
struct value_type_of<std::complex<T>>
{
using type = T;
};
} // namespace helper
} // namespace lapack
} // namespace ext
} // namespace backend
} // namespace dpnp
Loading