Skip to content

Commit a18b845

Browse files
authored
[SYCL][Doc] Update Sphinx and dependencies (#4340)
recommonmark (which was used for mardown rendering) is deprecated and will no longer be actively maintained. MyST and Sphinx 4 offer better Markdown and C++ syntax highlighting support.
1 parent a201984 commit a18b845

File tree

3 files changed

+27
-30
lines changed

3 files changed

+27
-30
lines changed

.github/workflows/gh_pages.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
- name: Install deps
1717
run: |
1818
sudo apt-get install -y doxygen graphviz ssh ninja-build
19-
sudo pip3 install 'sphinx==3.0.0' 'recommonmark==0.6.0' 'sphinx_markdown_tables==0.0.12'
19+
sudo pip3 install 'sphinx==4.1.2' 'myst-parser==0.15.1'
2020
- name: Build Docs
2121
run: |
2222
mkdir -p $GITHUB_WORKSPACE/build

sycl/doc/PreprocessorMacros.md

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -2,38 +2,38 @@
22

33
This file describes macros that have effect on SYCL compiler and run-time.
44

5-
### `RESTRICT_WRITE_ACCESS_TO_CONSTANT_PTR`
5+
- **RESTRICT_WRITE_ACCESS_TO_CONSTANT_PTR**
66

7-
The spec assumes that the SYCL implementation does address space deduction.
8-
However, for our implementation, the deduction is performed in the middle end,
9-
where it's hard to provide user friendly diagnositcs.
10-
Due to these problems writing to raw pointers obtained from `constant_ptr` is
11-
not diagnosed now.
12-
The user can enable diagnostics upon writing to such pointers via enabling the
13-
`RESTRICT_WRITE_ACCESS_TO_CONSTANT_PTR` macro.
14-
This allows `constant_ptr` to use constant pointers as underlying
15-
pointer types. Thus, conversions from `constant_ptr` to raw pointers will return
16-
constant pointers and writing to const pointers will be diagnosed by the
17-
front-end.
18-
This behavior is not following the SYCL spec since `constant_ptr` conversions to
19-
the underlying pointer types return pointers without any additional qualifiers
20-
so it's disabled by default.
7+
The spec assumes that the SYCL implementation does address space deduction.
8+
However, for our implementation, the deduction is performed in the middle end,
9+
where it's hard to provide user friendly diagnositcs.
10+
Due to these problems writing to raw pointers obtained from `constant_ptr` is
11+
not diagnosed now.
12+
The user can enable diagnostics upon writing to such pointers via enabling the
13+
`RESTRICT_WRITE_ACCESS_TO_CONSTANT_PTR` macro.
14+
This allows `constant_ptr` to use constant pointers as underlying
15+
pointer types. Thus, conversions from `constant_ptr` to raw pointers will return
16+
constant pointers and writing to const pointers will be diagnosed by the
17+
front-end.
18+
This behavior is not following the SYCL spec since `constant_ptr` conversions to
19+
the underlying pointer types return pointers without any additional qualifiers
20+
so it's disabled by default.
2121

22-
### `DISABLE_SYCL_INSTRUMENTATION_METADATA`
22+
- **DISABLE_SYCL_INSTRUMENTATION_METADATA**
2323

24-
This macro is used to disable passing of code location information to public
25-
methods.
24+
This macro is used to disable passing of code location information to public
25+
methods.
2626

27-
### `SYCL2020_DISABLE_DEPRECATION_WARNINGS`
27+
- **SYCL2020_DISABLE_DEPRECATION_WARNINGS**
2828

29-
Disables warnings coming from usage of SYCL 1.2.1 APIs, that are deprecated in
30-
SYCL 2020.
29+
Disables warnings coming from usage of SYCL 1.2.1 APIs, that are deprecated in
30+
SYCL 2020.
3131

32-
### `SYCL_DISABLE_DEPRECATION_WARNINGS`
32+
- **SYCL_DISABLE_DEPRECATION_WARNINGS**
3333

34-
Disables all deprecation warnings in SYCL runtime headers, including SYCL 1.2.1 deprecations.
34+
Disables all deprecation warnings in SYCL runtime headers, including SYCL 1.2.1 deprecations.
3535

36-
### Version macros
36+
## Version macros
3737

3838
- `__LIBSYCL_MAJOR_VERSION` is set to SYCL runtime library major version.
3939
- `__LIBSYCL_MINOR_VERSION` is set to SYCL runtime library minor version.

sycl/doc/conf.py

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,7 @@
3232
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
3333
# ones.
3434
extensions = [
35-
'recommonmark',
36-
'sphinx_markdown_tables'
35+
'myst_parser'
3736
]
3837

3938
# The name of the Pygments (syntax highlighting) style to use.
@@ -49,13 +48,11 @@
4948
# Extensions are mostly in asciidoc which has poor support in Sphinx
5049
exclude_patterns = ['extensions/*']
5150

52-
source_parsers = {'.md': 'recommonmark.parser.CommonMarkParser'}
53-
5451
suppress_warnings = [ 'misc.highlighting_failure' ]
5552

5653
def on_missing_reference(app, env, node, contnode):
5754
if node['reftype'] == 'any':
58-
contnode['refuri'] = "https://github.com/intel/llvm/tree/sycl/sycl/doc/" + contnode['refuri']
55+
contnode['refuri'] = "https://github.com/intel/llvm/tree/sycl/sycl/doc/" + node['reftarget']
5956
return contnode
6057
else:
6158
return None

0 commit comments

Comments
 (0)