Skip to content

Commit b8d7de6

Browse files
committed
merge from master
2 parents d6e3e98 + fb31f0d commit b8d7de6

File tree

196 files changed

+17864
-6775
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

196 files changed

+17864
-6775
lines changed

README.rst

Lines changed: 17 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ The simplest and quickest way to edit is directly in the GitHub web
2828
interface. It has an editor, previewer, and lets you commit
2929
changes. You won't need to install any local tools. The previewer
3030
knows how to render RST, but not the sphinx directives so it will not
31-
display exactly as the real manual.
31+
display exactly as the real document.
3232

3333
-------------------------
3434
Working with a Local Copy
@@ -42,7 +42,7 @@ to do the same task manually.
4242
Setup
4343
-----
4444

45-
Install Python 3 and doxygen (>= 1.8.17). To install on **Ubuntu**::
45+
Install Python 3, doxygen (>= 1.8.17), latex, etc. To install on **Ubuntu**::
4646

4747
sudo scripts/install.sh
4848

@@ -60,9 +60,6 @@ On Windows::
6060
python scripts\oneapi.py spec-venv
6161
spec-venv\Scripts\activate
6262
63-
MKL and Level Zero are temporarily in separate private repos. If you have access to the repos, you can clone them::
64-
65-
python scripts/oneapi.py clones
6663

6764
Building the docs
6865
-----------------
@@ -71,10 +68,6 @@ To build the html document::
7168

7269
python scripts/oneapi.py html
7370

74-
This will not work on Windows because we are using symbolic links for
75-
the elements that are in separate repos. However, Windows can build
76-
individual specs for individual elements.
77-
7871
The document is organized as a book with chapters. Each element of
7972
oneAPI is its own chapter and can be built separately. For example, to
8073
build the oneVPL chapter, do::
@@ -116,6 +109,18 @@ size of the text. Probably a lot more.
116109
linting. I could not find any support for rejustifying paragraphs to
117110
80 characters, which makes it difficult to use.
118111

112+
------------------
113+
Submitting changes
114+
------------------
115+
116+
Changes are submitted as PR's to this repo. It's up to you how you get
117+
to the point of making the PR. If you have write access to this repo, you
118+
can push a feature branch to this repo, and then do the PR from the feature
119+
branch. If you work this way, the CI will publish HTML, PDF to the staging
120+
server. You can also fork this repo and do the PR from your fork. CI will
121+
build the document and save the results as an artifact, but will not
122+
publish to staging server.
123+
119124
------
120125
Docker
121126
------
@@ -137,11 +142,11 @@ CI
137142

138143
We use GitHub actions. See `<.github/workflows/main.yml>`_
139144

140-
On every commit, the CI system builds and publishes the document to
145+
On every commit to every branch, the CI system builds and publishes the document to
141146
the staging server. To see the URL, look at the end of the log for the
142147
build step in the CI system. The staging server is an s3 bucket, and
143148
the access keys are managed as GitHub action secrets. PR's based on
144-
forks do not have access to the keys and will not publish on the
149+
forks do not have access to the keys and will build, but not publish on the
145150
staging server.
146151

147152
For commits to the publish branch, the document is staged inside a
@@ -164,9 +169,7 @@ production with::
164169

165170
python scripts/oneapi.py prod-publish
166171

167-
Then purge the CDN. Generate a list of URLs with::
168-
169-
python scripts/oneapi.py purge
172+
Then purge the CDN.
170173

171174
------------
172175
More Reading

roadmap.rst

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -254,6 +254,13 @@ Summary
254254
- oneVPL
255255

256256
- Breaking changes introduced.
257+
258+
========= ==========
259+
Date Milestone
260+
========= ==========
261+
6/25/2020 All components have merged to master
262+
6/26/2020 Release
263+
========= ==========
257264

258265
0.9.0
259266
-----

source/_static/custom.css

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,16 @@
1616
margin-right: -0.7em;
1717
}
1818

19+
/* A workaround for https://github.com/readthedocs/sphinx_rtd_theme/issues/647
20+
* Override display for function signatures so that there is spacing between
21+
* types and arguments */
22+
.rst-content dl:not(.docutils) dt {
23+
display: table-cell !important;
24+
}
25+
.rst-content dl:not(.docutils) dd {
26+
margin-top: 6px;
27+
}
28+
1929
/* override table width restrictions
2030
* https://rackerlabs.github.io/docs-rackspace/tools/rtd-tables.html */
2131
@media screen and (min-width: 767px) {

source/conf.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,8 @@
8888
# documentation.
8989
#
9090
html_theme_options = {
91-
'includehidden': False
91+
'includehidden': False,
92+
'collapse_navigation': False
9293
}
9394

9495
html_context = {

source/conf/common_conf.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
import sys
33
import string
44

5+
import docutils
6+
57
def path_relative_to_repo_root(relative_path):
68
this_dir = os.path.dirname(os.path.realpath(__file__))
79
root_dir = os.path.abspath(os.path.join(this_dir, '../..'))
@@ -57,6 +59,10 @@ def path_relative_to_repo_root(relative_path):
5759
.. |mkl_full_name| replace:: oneAPI Math Kernel Library
5860
.. |mkl_version| replace:: $oneapi_version
5961
.. _`Level Zero Specification`: https://spec.oneapi.com/level-zero/latest/index.html
62+
.. include:: <isonum.txt>
63+
.. |regsup| replace:: :supsub:`reg`
64+
.. |intel_r| replace:: Intel\ :supsub:`reg`
65+
.. |msdk_full_name| replace:: Intel\ :supsub:`reg` Media Software Development Kit
6066
""")
6167

6268
rst_prolog = prolog_template.substitute(env)
@@ -90,6 +96,13 @@ def path_relative_to_repo_root(relative_path):
9096
'extraclassoptions': 'openany,oneside'
9197
}
9298

99+
def supsub_role(name, rawtext, text, lineno, inliner, options={}, content=[]):
100+
node = docutils.nodes.superscript()
101+
node2 = docutils.nodes.substitution_reference(refname=text)
102+
node += [node2]
103+
return [node],[]
104+
93105
def setup(app):
106+
app.add_role('supsub', supsub_role)
94107
add_custom_css = getattr(app,'add_css_file',getattr(app,'add_stylesheet'))
95108
add_custom_css('custom.css')

source/elements/oneDAL/Makefile

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
GH_PAGES = build/gh-pages
22

3-
.PHONY: build doxygen parse-doxygen clean gh-pages
3+
.PHONY: html pdf doxygen parse-doxygen clean gh-pages
44

55
html:
66
sphinx-build -M html source build -q
@@ -16,9 +16,11 @@ parse-doxygen: doxygen
1616
python -m dalapi.doxypy.cli doxygen/xml --compact > build/tree.yaml
1717

1818
clean:
19+
rm -rf build/doctrees
1920
rm -rf build/html
21+
rm -rf build/latex
2022

21-
gh-pages: build
23+
gh-pages: html
2224
cp -r build/html/* $(GH_PAGES)
2325
cd $(GH_PAGES) && \
2426
git checkout gh-pages && \

source/elements/oneDAL/dalapi/extension.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
from typing import (Dict, Tuple, Text)
55
from collections import OrderedDict, namedtuple
66
from . import directives
7+
from . import roles
78
from . import doxypy
89
from . import utils
910

@@ -278,6 +279,9 @@ def get_config_values(self, app):
278279
def setup(app):
279280
ctx = Context(app)
280281

282+
app.add_role('capterm', roles.capterm_role)
283+
app.add_role('txtref', roles.txtref_role)
284+
281285
app.add_directive('onedal_class', directives.ClassDirective(ctx))
282286
app.add_directive('onedal_func', directives.FunctionDirective(ctx))
283287
app.add_directive('onedal_code', directives.ListingDirective(ctx))
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
import re
2+
from docutils import nodes
3+
from sphinx import roles
4+
5+
_term_ref_re = re.compile(r'(.+)<(.+)>', flags=re.DOTALL)
6+
def capterm_role(name, rawtext, text, lineno, inliner, options={}, content=[]):
7+
xref_role = roles.XRefRole(innernodeclass=nodes.inline,
8+
warn_dangling=True)
9+
term_match = _term_ref_re.match(text)
10+
if term_match:
11+
txt, ref = term_match.group(1), term_match.group(2)
12+
else:
13+
txt, ref = text, text
14+
fixed_term = f'{txt.strip()} <{ref.strip().capitalize()}>'
15+
return xref_role('std:term', rawtext, fixed_term, lineno, inliner, options, content)
16+
17+
18+
_term_txt_ref_re = re.compile(r'(.*)<(.+)>(.*)', flags=re.DOTALL)
19+
def txtref_role(name, rawtext, text, lineno, inliner, options={}, content=[]):
20+
xref_role = roles.XRefRole(lowercase=True,
21+
innernodeclass=nodes.inline,
22+
warn_dangling=True)
23+
def extract_ref_words(ref):
24+
return [item for sub in ref.split('-') for item in sub.split('_')]
25+
26+
def make_term_text(words, ref, suffix=''):
27+
txt = ' '.join(words).strip()
28+
txt = txt[0].lower() + txt[1:]
29+
return f"{txt}{suffix} <{ref.strip()}>"
30+
31+
term_match = _term_txt_ref_re.match(text)
32+
if term_match:
33+
alias, ref, suffix = term_match.group(1), term_match.group(2), term_match.group(3)
34+
if len(alias) > 0 and len(suffix) == 0:
35+
fixed_term = text
36+
elif len(alias) == 0 and len(suffix) > 0:
37+
words = extract_ref_words(ref)
38+
fixed_term = make_term_text(words, ref, suffix)
39+
else:
40+
raise RuntimeError('Unexpected role syntax: ' + rawtext)
41+
else:
42+
ref, words = text, extract_ref_words(text)
43+
fixed_term = make_term_text(words, ref)
44+
45+
return xref_role('std:ref', rawtext, fixed_term, lineno, inliner, options, content)

source/elements/oneDAL/source/algorithms/nearest_neighbors/knn_classification.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ from the initial training set :math:`X`.
6262
Training method: *k-d tree*
6363
~~~~~~~~~~~~~~~~~~~~~~~~~~~
6464
The training operation builds a :math:`k`-:math:`d` tree that partitions the
65-
training set :math:`X` (for more details, see :ref:`kd_tree`).
65+
training set :math:`X` (for more details, see :txtref:`k-d Tree <kd_tree>`).
6666

6767

6868
.. _i_math:

source/elements/oneDAL/source/data_management/accessors.rst

Lines changed: 13 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@
44
Accessors
55
=========
66

7-
This section defines `requirements <accessor_reqs_>`_ to an :ref:`accessor
8-
<accessor>` implementation and introduces several `accessor types
9-
<accessor_types_>`_.
7+
This section defines :txtref:`requirements <accessor_reqs>` to an
8+
:txtref:`accessor` implementation and introduces several
9+
:txtref:`accessor_types`.
1010

1111
.. _accessor_reqs:
1212

@@ -20,23 +20,22 @@ Each accessor implementation shall:
2020
accessor. Every single accessor type shall return and use only one data
2121
format.
2222

23-
2. Provide an access to at least one in-memory :ref:`dataset` implementation
24-
(such as :code:`table`, its sub-types, or :ref:`table builders
25-
<table-builder>`).
23+
2. Provide an access to at least one in-memory :txtref:`dataset` implementation
24+
(such as :code:`table`, its sub-types, or :txtref:`<table-builder>s`).
2625

2726
3. Provide read-only, write-only, or read-write access to the data. If an
28-
accessor supports several :ref:`dataset` implementations to be passed in, it
29-
is not necessary for an accessor to support all access modes for every input
30-
object. For example, tables shall support a single read-only mode according
31-
to their :ref:`concept <table>` definition.
27+
accessor supports several :txtref:`dataset` implementations to be passed in,
28+
it is not necessary for an accessor to support all access modes for every
29+
input object. For example, tables shall support a single read-only mode
30+
according to their :txtref:`<table> concept` definition.
3231

3332
4. Provide the names for read and write operations following the pattern:
3433

3534
- :code:`pull_*()` for reading
3635

3736
- :code:`push_*()` for writing
3837

39-
5. Be lightweight. Its constructors from :ref:`dataset` implementations
38+
5. Be lightweight. Its constructors from :txtref:`dataset` implementations
4039
shall not have heavy operations such as copy of data, reading, writing, any
4140
sort of conversions. These operations shall be performed by heavy operations
4241
:code:`pull_*()` and :code:`push_*()`. It is not necessary to have copy- or
@@ -51,9 +50,9 @@ Accessor Types
5150
--------------
5251

5352
|dal_short_name| defines a set of accessor classes. Each class is associated
54-
with a single specific way of interacting with data within a :ref:`dataset`. The
55-
following table briefly explains these classes and shows which :ref:`dataset`
56-
implementations are supported by each accessor type.
53+
with a single specific way of interacting with data within a :txtref:`dataset`.
54+
The following table briefly explains these classes and shows which
55+
:txtref:`dataset` implementations are supported by each accessor type.
5756

5857
.. list-table::
5958
:header-rows: 1

0 commit comments

Comments
 (0)