Skip to content

Commit 013be2e

Browse files
authored
Merge pull request #1418 from IntelPython/docs/fixes-to-docstrings
[Documentation] fixes to docstrings
2 parents 5f7b488 + 34557b0 commit 013be2e

File tree

9 files changed

+81
-222
lines changed

9 files changed

+81
-222
lines changed

README.md

Lines changed: 30 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -12,27 +12,36 @@
1212

1313

1414

15-
Data-parallel Extension for Numba* (numba-dpex) is a standalone extension for
16-
the [Numba](http://numba.pydata.org) Python JIT compiler. Numba-dpex provides
17-
a generic kernel programming API and an offload feature that extends Numba's
18-
auto-parallelizer to generate data-parallel kernels for `parfor` nodes.
19-
20-
Numba-dpex's kernel API has a design and API similar to Numba's `cuda.jit`
21-
module, but is based on the [SYCL](https://sycl.tech/) language. The
22-
code-generation for the kernel API currently supports
23-
[SPIR-V](https://www.khronos.org/spir/)-based
24-
[OpenCL](https://www.khronos.org/opencl/) and
25-
[oneAPI Level Zero](https://spec.oneapi.io/level-zero/latest/index.html)
26-
devices that are supported by Intel® DPC++ SYCL compiler runtime. Supported
27-
devices include Intel® CPUs, integrated GPUs and discrete GPUs.
28-
29-
The offload functionality in numba-dpex is based on Numba's `parfor`
30-
loop-parallelizer. Our compiler extends Numba's `parfor` feature to generate
31-
kernels and offload them to devices supported by DPC++ SYCL compiler runtime.
32-
The offload functionality is supported via a new NumPy drop-in replacement
33-
library: [dpnp](https://github.com/IntelPython/dpnp). Note that `dpnp` and NumPy-based
34-
expressions can be used together in the same function, with `dpnp` expressions getting
35-
offloaded by `numba-dpex` and NumPy expressions getting parallelized by Numba.
15+
Data-parallel Extension for Numba* (numba-dpex) is an open-source standalone
16+
extension for the [Numba](http://numba.pydata.org) Python JIT compiler.
17+
Numba-dpex provides a [SYCL*](https://sycl.tech/)-like API for kernel
18+
programming Python. SYCL* is an open standard developed by the [Unified
19+
Acceleration Foundation](https://uxlfoundation.org/) as a vendor-agnostic way of
20+
programming different types of data-parallel hardware such as multi-core CPUs,
21+
GPUs, and FPGAs. Numba-dpex's kernel-programming API brings the same programming
22+
model and a similar API to Python. The API allows expressing portable
23+
data-parallel kernels in Python and then JIT compiling them for different
24+
hardware targets. JIT compilation is supported for hardware that use the
25+
[SPIR-V](https://www.khronos.org/spir/) intermediate representation format that
26+
includes [OpenCL](https://www.khronos.org/opencl/) CPU (Intel, AMD) devices,
27+
OpenCL GPU (Intel integrated and discrete GPUs) devices, and [oneAPI Level
28+
Zero](https://spec.oneapi.io/level-zero/latest/index.html) GPU (Intel integrated
29+
and discrete GPUs) devices.
30+
31+
The kernel programming API does not yet support every SYCL* feature. Refer to
32+
the [SYCL* and numba-dpex feature comparison](https://intelpython.github.io/numba-dpex/latest/supported_sycl_features.html)
33+
page to get a summary of supported features.
34+
Numba-dpex only implements SYCL*'s kernel programming API, all SYCL runtime
35+
Python bindings are provided by the [dpctl](https://github.com/IntelPython/dpctl)
36+
package.
37+
38+
Along with the kernel programming API, numba-dpex extends Numba's
39+
auto-parallelizer to bring device offload capabilities to `prange` loops and
40+
NumPy-like vector expressions. The offload functionality is supported via the
41+
NumPy drop-in replacement library: [dpnp](https://github.com/IntelPython/dpnp).
42+
Note that `dpnp` and NumPy-based expressions can be used together in the same
43+
function, with `dpnp` expressions getting offloaded by `numba-dpex` and NumPy
44+
expressions getting parallelized by Numba.
3645

3746
Refer the [documentation](https://intelpython.github.io/numba-dpex) and examples
3847
to learn more.

docs/source/conf.py

Lines changed: 15 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,12 @@
55
# coding: utf-8
66
# Configuration file for the Sphinx documentation builder.
77

8-
# -- Project information -----------------------------------------------------
8+
# -- Project information -------------------------------------------------------
99

1010
import sys
1111

12+
import numba_dpex
13+
1214
sys.path.append(".")
1315

1416
from sycl_spec_links import sycl_ext_links # noqa E402
@@ -18,23 +20,23 @@
1820
author = "Intel Corporation"
1921

2022
# The full version, including alpha/beta/rc tags
21-
# release = "main"
23+
release = numba_dpex.__version__
2224

23-
# -- General configuration ----------------------------------------------------
25+
# -- General configuration -----------------------------------------------------
2426

2527
# Add any Sphinx extension module names here, as strings. They can be
2628
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
2729
# ones.
2830
extensions = [
2931
"sphinx.ext.todo",
30-
"sphinx.ext.intersphinx",
3132
"sphinx.ext.extlinks",
3233
"sphinx.ext.githubpages",
3334
"sphinx.ext.napoleon",
3435
"sphinxcontrib.programoutput",
3536
"sphinxcontrib.googleanalytics",
3637
"myst_parser",
3738
"autoapi.extension",
39+
"sphinx.ext.intersphinx",
3840
"sphinxcontrib.bibtex",
3941
]
4042

@@ -52,12 +54,11 @@
5254
extlinks = {}
5355
extlinks.update(sycl_ext_links)
5456

55-
# -- Options for HTML output -------------------------------------------------
57+
# -- Options for HTML output ---------------------------------------------------
5658

5759
# The theme to use for HTML and HTML Help pages. See the documentation for
5860
# a list of builtin themes.
5961
#
60-
# html_theme = "pydata_sphinx_theme"
6162
html_theme = "furo"
6263

6364
html_theme_options = {
@@ -82,17 +83,23 @@
8283

8384
html_show_sourcelink = False
8485

85-
# -- Todo extension configuration ----------------------------------------------
86+
# -- Todo extension configuration ---------------------------------------------
8687
todo_include_todos = True
8788
todo_link_only = True
8889

8990
# -- InterSphinx configuration: looks for objects in external projects -----
9091
intersphinx_mapping = {}
9192

9293

93-
# -- Prepend module name to an object name or not -----------------------------------
94+
# -- Prepend module name to an object name or not ------------------------------
9495
add_module_names = False
9596

97+
98+
# -- autodoc configurations ----------------------------------------------------
99+
100+
autodoc_typehints_format = "short"
101+
python_use_unqualified_type_names = True
102+
96103
# -- Auto API configurations ---------------------------------------------------
97104

98105
autoapi_dirs = [

docs/source/contribution_guide.rst

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

docs/source/examples.rst

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

docs/source/index.rst

Lines changed: 7 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -1,43 +1,15 @@
11
.. _index:
22
.. include:: ./ext_links.txt
33

4-
.. Feedbacks:
5-
.. Use proper names (as provided by marketing)
6-
.. Do not use "we/I"
7-
.. Use correct acronym, expand acronym at the first instance
8-
9-
10-
.. Follow cupy docs.
11-
12-
.. Overview:
13-
.. Main Features
14-
.. Project Goal
15-
16-
.. Getting Started:
17-
.. Yevheni
18-
.. Docker page
19-
20-
.. User Guide:
21-
.. https://intelpython.github.io/oneAPI-for-SciPy/details/programming_model/
22-
.. Kernel Programming API --> Kernel Programming Basics
23-
.. Compiling and Offloading DPNP
24-
.. - Introduce @dpjit
25-
.. - Array constructor in dpjit
26-
.. - ufunc (refer to numba)
27-
.. - prange
28-
.. -
29-
.. Debugging using GDB
30-
.. # Performance Tips
31-
.. # Troubleshooting
32-
.. Useful Links
33-
.. # To-Do
34-
35-
.. API Reference:
36-
37-
384
Data Parallel Extension for Numba*
395
==================================
406

7+
Numba-dpex is an open-source kernel-programming API and JIT compiler for
8+
portable accelerator programming directly in Python. The API and the compiler is
9+
modeled after the C++ SYCL* language and brings a similar programming model and
10+
language design to Python. The page lists the relevant documentation to learn to
11+
program data-parallel kernels using numba-dpex.
12+
4113
.. module:: numba_dpex
4214

4315
.. toctree::
@@ -55,14 +27,7 @@ Data Parallel Extension for Numba*
5527

5628
.. toctree::
5729
:maxdepth: 1
58-
:caption: Development
59-
60-
contribution_guide
61-
62-
.. toctree::
63-
:maxdepth: 1
64-
:caption: Misc Notes
30+
:caption: Miscellaneous Notes
6531

66-
examples
6732
license
6833
release-notes

docs/source/user_guide/kernel_programming/math-functions.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
.. include:: ./../../ext_links.txt
2+
13

24
Scalar mathematical functions from the Python `math`_ module and the `dpnp`_
35
library can be used inside a kernel function. During compilation the

docs/source/user_guide/kernel_programming/reduction.rst

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

docs/source/user_guide/kernel_programming/synchronization.rst

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

0 commit comments

Comments
 (0)