Skip to content

Commit

Permalink
More API docs
Browse files Browse the repository at this point in the history
  • Loading branch information
Diptorup Deb committed Feb 24, 2024
1 parent 8309ac1 commit 5612e1a
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 18 deletions.
28 changes: 15 additions & 13 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,19 +113,10 @@

# -- Auto API configurations ---------------------------------------------------


# def skip_util_classes(app, what, name, obj, skip, options):
# if what == "module" and "experimental" in name:
# if what == "module" and "decorators" not in name:
# skip = True
# return skip


# def setup(sphinx):
# sphinx.connect("autoapi-skip-member", skip_util_classes)


autoapi_dirs = ["../../numba_dpex/kernel_api"]
autoapi_dirs = [
"../../numba_dpex/kernel_api",
"../../numba_dpex/experimental",
]
autoapi_type = "python"

autoapi_template_dir = "_templates/autoapi"
Expand Down Expand Up @@ -159,3 +150,14 @@ def prepare_jinja_env(jinja_env) -> None:


autoapi_prepare_jinja_env = prepare_jinja_env


def skip_member(app, what, name, obj, skip, options):
# skip submodules
if what == "module":
skip = True
return skip


def setup(sphinx):
sphinx.connect("autoapi-skip-member", skip_member)
6 changes: 1 addition & 5 deletions docs/source/programming_model.rst
Original file line number Diff line number Diff line change
Expand Up @@ -228,11 +228,7 @@ For example, consider

.. code:: python
# Use usm_type = 'device' to get USM-device allocation (default),
# usm_type = 'shared' to get USM-shared allocation,
# usm_type = 'host' to get USM-host allocation
def dpt.empty(..., device=None, usm_type=None, sycl_queue=None) -> dpctl.tensor.usm_ndarray:
...
# TODO
The keyword ``device`` is `mandated by the array API
<https://data-apis.org/array-api/latest/design_topics/device_support.html#syntax-for-device-assignment>`__.
Expand Down

0 comments on commit 5612e1a

Please sign in to comment.