Skip to content

Commit b86afa0

Browse files
committed
Updated Overview page
1 parent af1af29 commit b86afa0

File tree

6 files changed

+135
-38
lines changed

6 files changed

+135
-38
lines changed

.github/workflows/build-sphinx.yml

Lines changed: 52 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,21 @@ on:
44
branches:
55
- master
66
pull_request:
7+
types: [opened, synchronize, reopened, closed]
8+
9+
env:
10+
PUBLISH_DIR: doc/_build/html/
11+
RUN_ON_MACHINE: ubuntu-20.04
12+
13+
defaults:
14+
run:
15+
shell: bash -l {0}
716

817
jobs:
918
build-and-deploy:
1019
name: Build and Deploy Docs
1120

12-
runs-on: ubuntu-20.04
13-
14-
defaults:
15-
run:
16-
shell: bash -l {0}
21+
runs-on: ${{ env.RUN_ON_MACHINE }}
1722

1823
env:
1924
python-ver: '3.9'
@@ -116,4 +121,45 @@ jobs:
116121
uses: peaceiris/[email protected]
117122
with:
118123
github_token: ${{ secrets.GITHUB_TOKEN }}
119-
publish_dir: doc/_build/html/
124+
publish_dir: ${{ env.PUBLISH_DIR }}
125+
126+
- name: Deploy docs [PR]
127+
if: |
128+
!github.event.pull_request.head.repo.fork && github.event.pull_request && github.event.action != 'closed'
129+
uses: peaceiris/[email protected]
130+
with:
131+
github_token: ${{ secrets.GITHUB_TOKEN }}
132+
publish_dir: ${{ env.PUBLISH_DIR }}
133+
destination_dir: ./pull/${{ github.event.number }}
134+
allow_empty_commit : true
135+
commit_message: ${{ github.event.head_commit.message }}
136+
publish_branch: gh-pages
137+
user_name: 'github-actions[bot]'
138+
user_email: 'github-actions[bot]@users.noreply.github.com'
139+
140+
clean:
141+
if: |
142+
!github.event.pull_request.head.repo.fork && github.event.pull_request && github.event.action == 'closed'
143+
144+
needs: build-and-deploy
145+
146+
runs-on: ${{ env.RUN_ON_MACHINE }}
147+
148+
steps:
149+
- uses: actions/[email protected]
150+
with:
151+
fetch-depth: 0
152+
153+
- name: Remove docs [PR closed]
154+
env:
155+
PR_NUM: ${{ github.event.number }}
156+
run: |
157+
git remote add tokened_docs https://IntelPython:${{ secrets.GITHUB_TOKEN }}@github.com/IntelPython/dpnp.git
158+
git fetch tokened_docs
159+
git checkout --track tokened_docs/gh-pages
160+
echo `pwd`
161+
[ -d pull/${PR_NUM} ] && git rm -rf pull/${PR_NUM}
162+
git config --global user.name 'github-actions[bot]'
163+
git config --global user.email 'github-actions[bot]@users.noreply.github.com'
164+
git commit -m "Removing docs for closed pull request ${PR_NUM}"
165+
git push tokened_docs gh-pages

CHANGELOG.md

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,14 @@ All notable changes to this project will be documented in this file.
44
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
55
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
66

7+
## [0.12.2] - TBA
8+
9+
### Added
10+
11+
### Changed
12+
13+
### Fixed
14+
715
## [0.12.1] - 07/18/2023
816

917
### Added
@@ -23,11 +31,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
2331
* Added a specialized kernel for `dpnp.sum` with `axis=0` as a pybind11 extension [#1479](https://github.com/IntelPython/dpnp/pull/1479)
2432
* Redesigned `dpnp.square` function through pybind11 extension of OneMKL call where possible or Leveraging on `dpctl.tensor` implementation [#1473](https://github.com/IntelPython/dpnp/pull/1473)
2533
* Redesigned `dpnp.cos` and `dpnp.sin` functions through pybind11 extension of OneMKL calls where possible or Leveraging on `dpctl.tensor` implementation [#1471](https://github.com/IntelPython/dpnp/pull/1471)
26-
* Redesigned `dpnp.sqrt` function through pybind11 extension of OneMKL call where possible or Leveraging on `dpctl.tensor` implementation [#1470](https://github.com/IntelPython/dpnp/pull/1470)
27-
* Redesigned `dpnp.log` function through pybind11 extension of OneMKL call where possible or Leveraging on `dpctl.tensor` implementation [#1469](https://github.com/IntelPython/dpnp/pull/1469)
34+
* Redesigned `dpnp.sqrt` function through pybind11 extension of OneMKL call where possible or leveraging on `dpctl.tensor` implementation [#1470](https://github.com/IntelPython/dpnp/pull/1470)
35+
* Redesigned `dpnp.log` function through pybind11 extension of OneMKL call where possible or leveraging on `dpctl.tensor` implementation [#1469](https://github.com/IntelPython/dpnp/pull/1469)
2836
* Leveraged `dpctl.tensor` implementation for logical operations [#1464](https://github.com/IntelPython/dpnp/pull/1464)
2937
* Leveraged `dpctl.tensor` implementation for `dpnp.floor_divide` function [#1462](https://github.com/IntelPython/dpnp/pull/1462)
3038
* Leveraged `dpctl.tensor` implementation for comparison functions [#1458](https://github.com/IntelPython/dpnp/pull/1458)
39+
3140
### Fixed
3241

3342
* Improved `dpnp.dot` function to support OneMKL calls for input and output arrays with strides [#1477](https://github.com/IntelPython/dpnp/pull/1477)

doc/ext_links.txt

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
..
2+
**********************************************************
3+
THESE ARE EXTERNAL PROJECT LINKS USED IN THE DOCUMENTATION
4+
**********************************************************
5+
6+
.. _NumPy*: https://numpy.org/
7+
.. _Python* Array API Standard: https://data-apis.org/array-api/
8+
.. _OpenCl*: https://www.khronos.org/opencl/
9+
.. _oneAPI Level Zero: https://spec.oneapi.io/level-zero/latest/index.html
10+
.. _DPC++: https://www.apress.com/gp/book/9781484255735
11+
.. _SYCL*: https://www.khronos.org/sycl/
12+
.. _dpctl: https://intelpython.github.io/dpctl/latest/index.html
13+
.. _Data Parallel Control: https://intelpython.github.io/dpctl/latest/index.html
14+
.. _Intel oneAPI Base Toolkit: https://www.intel.com/content/www/us/en/developer/tools/oneapi/base-toolkit.html
15+
.. _Intel Distribution for Python*: https://www.intel.com/content/www/us/en/developer/tools/oneapi/distribution-for-python.html
16+
.. _Intel AI Analytics Toolkit: https://www.intel.com/content/www/us/en/developer/tools/oneapi/ai-analytics-toolkit.html

doc/install.rst renamed to doc/getting_started.rst

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
1-
Installation Guide
2-
==================
1+
.. _getting_started:
2+
.. include:: ./ext_links.txt
3+
4+
.. |copy| unicode:: U+000A9
5+
6+
.. |trade| unicode:: U+2122
7+
8+
Getting Started
9+
===============
310

411
Requirements
512
------------

doc/index.rst

Lines changed: 7 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,16 @@
1-
=========================================================
2-
DPNP -- A NumPy-compatible library for SYCL-based devices
3-
=========================================================
1+
.. _index:
2+
.. include:: ./ext_links.txt
43

5-
.. module:: dpnp
6-
7-
`DPNP <https://github.com/IntelPython/dpnp>`_ is a NumPy-like library accelerated with SYCL on Intel devices.
8-
It provides Python interfaces for many NumPy functions, and includes a subset of methods of :class:`dpnp.ndarray`.
9-
Under the hood it is based on native C++ and oneMKL based kernels.
10-
11-
Being drop-in replacement for Numpy its usage is very similar to Numpy:
12-
13-
>>> import dpnp as np
14-
15-
The :class:`dpnp.ndarray` class is a compatible alternative of :class:`numpy.ndarray`.
16-
17-
>>> x = np.array([1, 2, 3])
4+
Data Parallel Extension for Numpy*
5+
==================================
186

19-
``x`` in the above example is an instance of :class:`dpnp.ndarray` that is created identically to ``NumPy``'s one.
20-
The key difference of :class:`dpnp.ndarray` from :class:`numpy.ndarray` is
21-
that the memory is allocated on Intel GPU when setting up ``DPNP_QUEUE_GPU=1`` in the environment.
22-
23-
24-
Most of the array manipulations are also done in the way similar to NumPy such as:
25-
26-
>>> s = np.sum(x)
27-
28-
Please see the :ref:`API Reference <dpnp_reference>` for the complete list of supported NumPy APIs
29-
along with their limitations.
7+
.. module:: dpnp
308

319
.. toctree::
3210
:maxdepth: 2
3311

34-
install
12+
overview
13+
getting_started
3514
reference/index
3615
dpnp_backend_api
3716
dpctl

doc/overview.rst

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
.. _overview
2+
.. include:: ./ext_links.txt
3+
4+
Overview
5+
========
6+
7+
.. module:: dpnp
8+
9+
The Data Parallel Extensions for Numpy (dpnp package) - a library that
10+
implements a subset of `NumPy*`_ that can be executed on any
11+
data parallel device. The subset is a drop-in replacement of core `NumPy*`_
12+
functions and numerical data types.
13+
14+
The Data Parallel Extensions for Numpy is being developed as part of
15+
`Intel AI Analytics Toolkit`_ and is distributed with the
16+
`Intel Distribution for Python*`_. The dpnp package is also available
17+
on Anaconda cloud. Please refer the :doc:`getting_started` page to learn more.
18+
19+
Being drop-in replacement for `NumPy*`_ means that the usage is very similar:
20+
21+
>>> import dpnp as np
22+
23+
The :class:`dpnp.ndarray` class is a compatible alternative of
24+
:class:`numpy.ndarray`.
25+
26+
>>> x = np.array([1, 2, 3])
27+
28+
``x`` in the above example is an instance of :class:`dpnp.ndarray` that
29+
is created identically to ``NumPy``'s one. The key difference of
30+
:class:`dpnp.ndarray` from :class:`numpy.ndarray` is that the memory
31+
is allocated on the default `SYCL*`_ device, which is a ``"gpu"`` on systems
32+
with integrated or discrete GPU (otherwise it is the ``"host"`` device
33+
on systems that do not have GPU).
34+
35+
Most of the array manipulations are also done in the way similar to NumPy such as:
36+
37+
>>> s = np.sum(x)
38+
39+
Please see the :ref:`API Reference <dpnp_reference>` for the complete list of supported NumPy APIs
40+
along with their limitations.

0 commit comments

Comments
 (0)