Skip to content

Commit 687d624

Browse files
stanleytsang-amdmfepv01dxyzGergely Meszarossamjwu
authored
Documentation cherry-pick for 5.6 (#436)
* Updated docs to use the ROCm standard (#418) * Convert Doxygen doc to Sphinx doc breathe needs to be patched in order to correctly look up the functions. The doc can still be generated but with generated errors within the doc. * Update README.md for Sphinx doc * Update README.md for Sphinx doc * Add svg images to regenerate png * Add comments to distinguish images generated from SVG * Order and organize doc * Remove the mention to CUB * Correct typo, improve style * Add examples to iterators * Explicit dependencies versions for building doc * Correct typos Signed-off-by: v01dxyz <v01dxyz@v01d.xyz> * Remove SVG image directory * Re-enable preprocessing for doxygen `__host__` and `__device__` function attributes are shown in the docs. * Re-enable Doxygen to expand all the macros instead of only the predefined ones. * Add cuda / hip attributes to `cpp_id_attributes` in sphinx. This fixes it erroring out on these attributes. * Add `rocprim::` suffix to all functions/classes name references in the rst docs. They were not working previously because the namespace macros were not expanded by doxygen. * Fix documentation of template overloaded methods with doxygen groups Use doxygen groups as a workaround for breathe failing to find methods that have complex template names, or both templated and non templated overloads. non-resolved problem: The `ropcrim::` prefix is not appended to the object names, contrary to the ones generated by the other directives. * Simplify macros for Doxygen * keep only one pre-defined variable to indicate Doxygen preprocessor * isolate macro definitions for Doxygen (only one ifndef instead of one per problematic macro) * Organize conf.py Gather the html options. * Correct typo * Clean Doxyfile Remove commented declarations * Render function parameters as a HTML list Ameliorate how the function signatures are rendered by using HTML list instead of one big single line signature. It is a hack since it mixes span elements with div elements side by side which is not good HTML. Furthermore, this translator would possibly need maintenance if Sphinx introduces breaking changes to the base Translator. * Simplify custom CSS * Remove documentation images Those two images were not particularly relevant and well polished. There were a logo and a draft schema to visualise the different GPU scopes. * Revert deletion of DOXYGEN_SHOULD_SKIP_THIS * Populate doxygen groups for intrinsics * Correct typo Delete duplicate title for a section that was displaced to another file * Rename ops directories * Rename filename/title for summary of the ops * Fixed rebase in config.hpp * Updated docs to the ROCm standard * Updated style and copyright date * Removed docs from top-level gitignore * Removed redundant requirements.txt * Updated CHANGELOG.md * Updated gitignore * Updated Changelog.md * Rebase fix * Updated docs/.gitignore * Added Acknowledgements --------- Signed-off-by: v01dxyz <v01dxyz@v01d.xyz> Co-authored-by: v01dxyz <v01dxyz@v01d.xyz> Co-authored-by: Gergely Meszaros <gergely@streamhpc.com> * Add dependabot config and pin rocm-docs-core (#420) * Update dependabot config (#421) Co-authored-by: samjwu <samjwu@users.noreply.github.com> * Bump rocm-docs-core from 0.2.0 to 0.7.1 in /docs/.sphinx (#425) Bumps [rocm-docs-core](https://github.com/RadeonOpenCompute/rocm-docs-core) from 0.2.0 to 0.7.1. - [Release notes](https://github.com/RadeonOpenCompute/rocm-docs-core/releases) - [Changelog](https://github.com/RadeonOpenCompute/rocm-docs-core/blob/develop/CHANGELOG.md) - [Commits](https://github.com/RadeonOpenCompute/rocm-docs-core/commits/v0.7.1) --- updated-dependencies: - dependency-name: rocm-docs-core dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Update version string (#426) * Fix typo * Update documentation requirements (#429) Co-authored-by: samjwu <samjwu@users.noreply.github.com> * Bump rocm-docs-core from 0.11.0 to 0.13.1 in /docs/.sphinx (#435) Bumps [rocm-docs-core](https://github.com/RadeonOpenCompute/rocm-docs-core) from 0.11.0 to 0.13.1. - [Release notes](https://github.com/RadeonOpenCompute/rocm-docs-core/releases) - [Changelog](https://github.com/RadeonOpenCompute/rocm-docs-core/blob/develop/CHANGELOG.md) - [Commits](ROCm/rocm-docs-core@v0.11.0...v0.13.1) --- updated-dependencies: - dependency-name: rocm-docs-core dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump requests from 2.28.2 to 2.31.0 in /docs/.sphinx (#430) Bumps [requests](https://github.com/psf/requests) from 2.28.2 to 2.31.0. - [Release notes](https://github.com/psf/requests/releases) - [Changelog](https://github.com/psf/requests/blob/main/HISTORY.md) - [Commits](psf/requests@v2.28.2...v2.31.0) --- updated-dependencies: - dependency-name: requests dependency-type: indirect ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --------- Signed-off-by: v01dxyz <v01dxyz@v01d.xyz> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: Lőrinc Serfőző <mfep@users.noreply.github.com> Co-authored-by: v01dxyz <v01dxyz@v01d.xyz> Co-authored-by: Gergely Meszaros <gergely@streamhpc.com> Co-authored-by: Sam Wu <swm1000@hotmail.com> Co-authored-by: samjwu <samjwu@users.noreply.github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Sam Wu <sam.wu2@amd.com>
1 parent d8d795d commit 687d624

Some content is hidden

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

77 files changed

+1178
-326
lines changed

.github/dependabot.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# To get started with Dependabot version updates, you'll need to specify which
2+
# package ecosystems to update and where the package manifests are located.
3+
# Please see the documentation for all configuration options:
4+
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
5+
6+
version: 2
7+
updates:
8+
- package-ecosystem: "pip" # See documentation for possible values
9+
directory: "/docs/.sphinx" # Location of package manifests
10+
open-pull-requests-limit: 10
11+
schedule:
12+
interval: "daily"

.gitignore

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,6 @@
11
### Build dirs ###
22
build/
33

4-
### Docs dirs ###
5-
doc/html/
6-
doc/xml/
7-
doc/latex/
8-
doc/*.tag
9-
104
# Created by https://www.gitignore.io/api/c++,cmake
115

126
### C++ ###

.gitlab-ci.yml

Lines changed: 4 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ include:
2626
file:
2727
- /defaults.yaml
2828
- /deps-cmake.yaml
29+
- /deps-docs.yaml
2930
- /deps-rocm.yaml
3031
- /deps-vcpkg.yaml
3132
- /gpus-rocm.yaml
@@ -352,21 +353,9 @@ test:deb:
352353

353354
test:docs:
354355
stage: test
355-
extends: .rules:test
356-
image: sphinxdoc/sphinx-latexpdf:latest
357-
needs: []
358-
before_script:
359-
- apt-get update -qq
360-
- apt-get install -y -qq doxygen
361-
- pip3 install --user -r $CI_PROJECT_DIR/docs/requirements.txt
362-
script:
363-
- cd docs
364-
- make
365-
artifacts:
366-
paths:
367-
- $CI_PROJECT_DIR/docs/_build
368-
- $CI_PROJECT_DIR/docs/docBin
369-
expire_in: 1 week
356+
extends:
357+
- .rules:test
358+
- .build:docs
370359

371360
.benchmark-base:
372361
stage: benchmark

.readthedocs.yaml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# Read the Docs configuration file
2+
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details
3+
4+
version: 2
5+
6+
sphinx:
7+
configuration: docs/conf.py
8+
9+
formats: [htmlzip]
10+
11+
python:
12+
version: "3.8"
13+
install:
14+
- requirements: docs/.sphinx/requirements.txt

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ Full documentation for rocPRIM is available at [https://rocprim.readthedocs.io/e
1010
### Changed
1111
- Improved the performance of `block_radix_sort` and `device_radix_sort`.
1212
- Improved the performance of `device_merge_sort`.
13+
- Updated `docs` directory structure to match the standard of [rocm-docs-core](https://github.com/RadeonOpenCompute/rocm-docs-core). Contributed by: [v01dXYZ](https://github.com/v01dXYZ).
1314
### Known Issues
1415
- Disabled GPU error messages relating to incorrect warp operation usage with Navi GPUs on Windows, due to GPU printf performance issues on Windows.
1516
- When `ROCPRIM_DISABLE_LOOKBACK_SCAN` is set, `device_scan` fails for input sizes bigger than `scan_config::size_limit`, which defaults to `std::numeric_limits<unsigned int>::max()`.

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ if(USE_HIP_CPU)
110110
endif()
111111

112112
# Setup VERSION
113-
set(VERSION_STRING "2.10.9")
113+
set(VERSION_STRING "2.13.0")
114114
rocm_setup_version(VERSION ${VERSION_STRING})
115115

116116
# Print configuration summary

README.md

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -237,16 +237,21 @@ should be optimized for gfx803 GCN version, or to `900` for gfx900.
237237
## Documentation
238238
The latest rocPRIM documentation and API description can be found [here](https://rocprim.readthedocs.io/en/latest/).
239239

240-
It can also be build using the following commands
240+
It can also be built using the following commands:
241241

242242
```shell
243-
# go to rocPRIM doc directory
244-
cd rocPRIM; cd doc
243+
# Go to rocPRIM docs directory
244+
cd rocPRIM; cd docs
245245

246-
# run doxygen
247-
doxygen Doxyfile
246+
# Install Python dependencies
247+
python3 -m pip install -r .sphinx/requirements.txt
248248

249-
# open html/index.html
249+
# Build the documentation
250+
python3 -m sphinx -T -E -b html -d _build/doctrees -D language=en . _build/html
251+
252+
# For e.g. serve the HTML docs locally
253+
cd _build/html
254+
python3 -m http.server
250255
```
251256

252257
## hipCUB

custom.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
booktitle=rocPRIM API Guide
2-
spreadsheet.xml=doc/classification-map.xml
2+
spreadsheet.xml=docs/classification-map.xml
33
document.locale=enus

docs/Doxyfile renamed to docs/.doxygen/Doxyfile

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ PROJECT_LOGO =
5858
# entered, it will be relative to the location where doxygen was started. If
5959
# left blank the current directory will be used.
6060

61-
OUTPUT_DIRECTORY =
61+
OUTPUT_DIRECTORY = docBin
6262

6363
# If the CREATE_SUBDIRS tag is set to YES then doxygen will create 4096 sub-
6464
# directories (in 2 levels) under the output directory of each output format and
@@ -781,7 +781,7 @@ INPUT = mainpage.dox \
781781
iteratormodule.dox \
782782
intrinsicsmodule.dox \
783783
glossary.dox \
784-
../rocprim/include/rocprim
784+
../../rocprim/include/rocprim
785785

786786
# This tag can be used to specify the character encoding of the source files
787787
# that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses
@@ -837,7 +837,7 @@ EXCLUDE_SYMLINKS = NO
837837
# Note that the wildcards are matched against the file with absolute path, so to
838838
# exclude all test directories for example use the pattern */test/*
839839

840-
EXCLUDE_PATTERNS = */detail/*
840+
EXCLUDE_PATTERNS =
841841

842842
# The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names
843843
# (namespaces, classes, functions, etc.) that should be excluded from the
@@ -2007,7 +2007,7 @@ ENABLE_PREPROCESSING = YES
20072007
# The default value is: NO.
20082008
# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
20092009

2010-
MACRO_EXPANSION = NO
2010+
MACRO_EXPANSION = YES
20112011

20122012
# If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES then
20132013
# the macro expansion is limited to the macros specified with the PREDEFINED and
@@ -2047,7 +2047,7 @@ INCLUDE_FILE_PATTERNS =
20472047
# recursively expanded use the := operator instead of the = operator.
20482048
# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
20492049

2050-
PREDEFINED = "DOXYGEN_SHOULD_SKIP_THIS=1"
2050+
PREDEFINED = "DOXYGEN_SHOULD_SKIP_THIS=1" "DOXYGEN_DOCUMENTATION_BUILD"
20512051

20522052
# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then this
20532053
# tag can be used to specify a list of macro names that should be expanded. The

docs/.doxygen/blockmodule.dox

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
/**
2+
@brief rocPRIM Block-wide parallel primitives
3+
@author
4+
@file
5+
*/
6+
7+
/**
8+
* \defgroup blockmodule Block-wide
9+
* \ingroup primitivesmodule
10+
*
11+
*/
12+
13+
/**
14+
* \defgroup blockmodule_warp_load_functions
15+
* \ingroup blockmodule
16+
*/
17+
18+
/**
19+
* \defgroup blockmodule_warp_store_functions
20+
* \ingroup blockmodule
21+
*/
File renamed without changes.
File renamed without changes.

docs/.doxygen/intrinsicsmodule.dox

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
/**
2+
@brief rocPRIM intrinsic functions.
3+
@author
4+
@file
5+
*/
6+
7+
/**
8+
* \defgroup intrinsicsmodule Intrinsic functions
9+
*/
10+
11+
/**
12+
* \defgroup intrinsicsmodule_flat_id
13+
* \ingroup intrinsicsmodule
14+
*/
15+
16+
/**
17+
* \defgroup intrinsicsmodule_warp_id
18+
* \ingroup intrinsicsmodule
19+
*/
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

docs/.gitignore

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
/_build/
2+
/_doxygen/
3+
/_images/
4+
/_static/
5+
/_templates/
6+
/.doxygen/docBin
7+
/.doxygen/rocPRIM.tag
8+
/.sphinx/_toc.yml
9+
/api

docs/.sphinx/_toc.yml.in

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# Anywhere {branch} is used, the branch name will be substituted.
2+
# These comments will also be removed.
3+
root: index
4+
subtrees:
5+
- entries:
6+
- file: intro
7+
- file: ops_summary
8+
- file: device_ops/index
9+
- file: block_ops/index
10+
- file: warp_ops/index
11+
- file: thread_ops
12+
- file: iterators
13+
- file: intrinsics
14+
- file: glossary

docs/.sphinx/requirements.in

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
rocm-docs-core==0.13.1

docs/.sphinx/requirements.txt

Lines changed: 145 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,145 @@
1+
#
2+
# This file is autogenerated by pip-compile with Python 3.8
3+
# by the following command:
4+
#
5+
# pip-compile requirements.in
6+
#
7+
accessible-pygments==0.0.3
8+
# via pydata-sphinx-theme
9+
alabaster==0.7.13
10+
# via sphinx
11+
babel==2.12.1
12+
# via
13+
# pydata-sphinx-theme
14+
# sphinx
15+
beautifulsoup4==4.11.2
16+
# via pydata-sphinx-theme
17+
breathe==4.34.0
18+
# via rocm-docs-core
19+
certifi==2022.12.7
20+
# via requests
21+
cffi==1.15.1
22+
# via
23+
# cryptography
24+
# pynacl
25+
charset-normalizer==3.1.0
26+
# via requests
27+
click==8.1.3
28+
# via sphinx-external-toc
29+
cryptography==40.0.2
30+
# via pyjwt
31+
deprecated==1.2.13
32+
# via pygithub
33+
docutils==0.19
34+
# via
35+
# breathe
36+
# myst-parser
37+
# pydata-sphinx-theme
38+
# sphinx
39+
fastjsonschema==2.16.3
40+
# via rocm-docs-core
41+
gitdb==4.0.10
42+
# via gitpython
43+
gitpython==3.1.31
44+
# via rocm-docs-core
45+
idna==3.4
46+
# via requests
47+
imagesize==1.4.1
48+
# via sphinx
49+
jinja2==3.1.2
50+
# via
51+
# myst-parser
52+
# sphinx
53+
linkify-it-py==1.0.3
54+
# via myst-parser
55+
markdown-it-py==2.2.0
56+
# via
57+
# mdit-py-plugins
58+
# myst-parser
59+
markupsafe==2.1.2
60+
# via jinja2
61+
mdit-py-plugins==0.3.5
62+
# via myst-parser
63+
mdurl==0.1.2
64+
# via markdown-it-py
65+
myst-parser[linkify]==1.0.0
66+
# via rocm-docs-core
67+
packaging==23.0
68+
# via
69+
# pydata-sphinx-theme
70+
# sphinx
71+
pycparser==2.21
72+
# via cffi
73+
pydata-sphinx-theme==0.13.3
74+
# via
75+
# rocm-docs-core
76+
# sphinx-book-theme
77+
pygithub==1.58.1
78+
# via rocm-docs-core
79+
pygments==2.14.0
80+
# via
81+
# accessible-pygments
82+
# pydata-sphinx-theme
83+
# sphinx
84+
pyjwt[crypto]==2.6.0
85+
# via pygithub
86+
pynacl==1.5.0
87+
# via pygithub
88+
pyyaml==6.0
89+
# via
90+
# myst-parser
91+
# rocm-docs-core
92+
# sphinx-external-toc
93+
requests==2.31.0
94+
# via
95+
# pygithub
96+
# sphinx
97+
rocm-docs-core==0.13.1
98+
# via -r requirements.in
99+
smmap==5.0.0
100+
# via gitdb
101+
snowballstemmer==2.2.0
102+
# via sphinx
103+
soupsieve==2.4
104+
# via beautifulsoup4
105+
sphinx==5.3.0
106+
# via
107+
# breathe
108+
# myst-parser
109+
# pydata-sphinx-theme
110+
# rocm-docs-core
111+
# sphinx-book-theme
112+
# sphinx-copybutton
113+
# sphinx-design
114+
# sphinx-external-toc
115+
# sphinx-notfound-page
116+
sphinx-book-theme==1.0.1
117+
# via rocm-docs-core
118+
sphinx-copybutton==0.5.1
119+
# via rocm-docs-core
120+
sphinx-design==0.4.1
121+
# via rocm-docs-core
122+
sphinx-external-toc==0.3.1
123+
# via rocm-docs-core
124+
sphinx-notfound-page==0.8.3
125+
# via rocm-docs-core
126+
sphinxcontrib-applehelp==1.0.4
127+
# via sphinx
128+
sphinxcontrib-devhelp==1.0.2
129+
# via sphinx
130+
sphinxcontrib-htmlhelp==2.0.1
131+
# via sphinx
132+
sphinxcontrib-jsmath==1.0.1
133+
# via sphinx
134+
sphinxcontrib-qthelp==1.0.3
135+
# via sphinx
136+
sphinxcontrib-serializinghtml==1.1.5
137+
# via sphinx
138+
typing-extensions==4.5.0
139+
# via pydata-sphinx-theme
140+
uc-micro-py==1.0.1
141+
# via linkify-it-py
142+
urllib3==1.26.15
143+
# via requests
144+
wrapt==1.15.0
145+
# via deprecated

0 commit comments

Comments
 (0)