Skip to content

Commit a32ca26

Browse files
authored
Use PyData docs theme, reorganize C++ docs (#2137)
This is split off of #2087. I am overhauling the RMM documentation. This is the first set of changes, which includes a new theme and a reorganization of the C++ docs. All docs now use Markdown / Myst. The next phases will include docstring tweaks to fix various formatting/cross-linking issues (see #2138 and #2139 for current progress on this), an expansion of the Python API docs, and adding user guides for various features. Authors: - Bradley Dice (https://github.com/bdice) Approvers: - Matthew Murray (https://github.com/Matt711) - Rong Ou (https://github.com/rongou) - Jake Awe (https://github.com/AyodeAwe) URL: #2137
1 parent 04cb74c commit a32ca26

Some content is hidden

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

46 files changed

+290
-223
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,7 @@ thirdparty/googletest/
9595

9696
## Documentation
9797
cpp/doxygen/html
98+
cpp/doxygen/latex
9899
cpp/doxygen/xml
99100
docs/_build
100101

conda/environments/all_cuda-129_arch-aarch64.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ dependencies:
2222
- identify>=2.5.20
2323
- ipython
2424
- make
25+
- myst-parser
2526
- nbsphinx
2627
- ninja
2728
- numba-cuda>=0.19.1,<0.20.0a0
@@ -30,6 +31,7 @@ dependencies:
3031
- numpydoc
3132
- packaging
3233
- pre-commit
34+
- pydata-sphinx-theme>=0.15.4
3335
- pytest-cov
3436
- pytest<9.0.0a0
3537
- python>=3.10,<3.14
@@ -39,6 +41,6 @@ dependencies:
3941
- sphinx
4042
- sphinx-copybutton
4143
- sphinx-markdown-tables
42-
- sphinx_rtd_theme
44+
- sphinxcontrib-jquery
4345
- sysroot_linux-aarch64==2.28
4446
name: all_cuda-129_arch-aarch64

conda/environments/all_cuda-129_arch-x86_64.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ dependencies:
2222
- identify>=2.5.20
2323
- ipython
2424
- make
25+
- myst-parser
2526
- nbsphinx
2627
- ninja
2728
- numba-cuda>=0.19.1,<0.20.0a0
@@ -30,6 +31,7 @@ dependencies:
3031
- numpydoc
3132
- packaging
3233
- pre-commit
34+
- pydata-sphinx-theme>=0.15.4
3335
- pytest-cov
3436
- pytest<9.0.0a0
3537
- python>=3.10,<3.14
@@ -39,6 +41,6 @@ dependencies:
3941
- sphinx
4042
- sphinx-copybutton
4143
- sphinx-markdown-tables
42-
- sphinx_rtd_theme
44+
- sphinxcontrib-jquery
4345
- sysroot_linux-64==2.28
4446
name: all_cuda-129_arch-x86_64

conda/environments/all_cuda-130_arch-aarch64.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ dependencies:
2222
- identify>=2.5.20
2323
- ipython
2424
- make
25+
- myst-parser
2526
- nbsphinx
2627
- ninja
2728
- numba-cuda>=0.19.1,<0.20.0a0
@@ -30,6 +31,7 @@ dependencies:
3031
- numpydoc
3132
- packaging
3233
- pre-commit
34+
- pydata-sphinx-theme>=0.15.4
3335
- pytest-cov
3436
- pytest<9.0.0a0
3537
- python>=3.10,<3.14
@@ -39,6 +41,6 @@ dependencies:
3941
- sphinx
4042
- sphinx-copybutton
4143
- sphinx-markdown-tables
42-
- sphinx_rtd_theme
44+
- sphinxcontrib-jquery
4345
- sysroot_linux-aarch64==2.28
4446
name: all_cuda-130_arch-aarch64

conda/environments/all_cuda-130_arch-x86_64.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ dependencies:
2222
- identify>=2.5.20
2323
- ipython
2424
- make
25+
- myst-parser
2526
- nbsphinx
2627
- ninja
2728
- numba-cuda>=0.19.1,<0.20.0a0
@@ -30,6 +31,7 @@ dependencies:
3031
- numpydoc
3132
- packaging
3233
- pre-commit
34+
- pydata-sphinx-theme>=0.15.4
3335
- pytest-cov
3436
- pytest<9.0.0a0
3537
- python>=3.10,<3.14
@@ -39,6 +41,6 @@ dependencies:
3941
- sphinx
4042
- sphinx-copybutton
4143
- sphinx-markdown-tables
42-
- sphinx_rtd_theme
44+
- sphinxcontrib-jquery
4345
- sysroot_linux-64==2.28
4446
name: all_cuda-130_arch-x86_64

cpp/include/doxygen_groups.h

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* SPDX-FileCopyrightText: Copyright (c) 2023-2024, NVIDIA CORPORATION.
2+
* SPDX-FileCopyrightText: Copyright (c) 2023-2025, NVIDIA CORPORATION.
33
* SPDX-License-Identifier: Apache-2.0
44
*/
55

@@ -17,6 +17,26 @@
1717
// @ingroup tag to the API's doxygen comment.
1818
// Add a new group by first specifying in the hierarchy below.
1919

20+
/**
21+
* @namespace rmm
22+
* @brief RAPIDS Memory Manager - The top-level namespace for all RMM functionality
23+
*
24+
* The rmm namespace provides a comprehensive set of memory management
25+
* utilities for CUDA applications, including memory resources, CUDA stream
26+
* management, device-side data containers, and memory allocation utilities.
27+
*/
28+
29+
/**
30+
* @namespace rmm::mr
31+
* @brief Memory Resource classes and adaptors
32+
*
33+
* The rmm::mr namespace contains all base memory resource classes that
34+
* implement various CUDA memory allocation strategies, adaptors for
35+
* suballocation such as pool and arena adaptors, and adaptors that add
36+
* functionality such as logging, alignment, and statistics tracking to
37+
* existing memory resources.
38+
*/
39+
2040
/**
2141
* @defgroup memory_resources Memory Resources
2242
* @{

dependencies.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -259,14 +259,16 @@ dependencies:
259259
- graphviz
260260
- ipython
261261
- make
262+
- myst-parser
262263
- nbsphinx
263264
- &numba numba>=0.60.0,<0.62.0a0
264265
- &numba_cuda numba-cuda>=0.19.1,<0.20.0a0
265266
- numpydoc
267+
- pydata-sphinx-theme>=0.15.4
266268
- sphinx
267-
- sphinx_rtd_theme
268269
- sphinx-copybutton
269270
- sphinx-markdown-tables
271+
- sphinxcontrib-jquery
270272
py_version:
271273
specific:
272274
- output_types: conda
22.1 KB
Loading

docs/conf.py

Lines changed: 37 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -46,18 +46,18 @@
4646
# ones.
4747

4848
extensions = [
49-
"sphinxcontrib.jquery",
50-
"sphinx.ext.intersphinx",
49+
"IPython.sphinxext.ipython_console_highlighting",
50+
"IPython.sphinxext.ipython_directive",
51+
"breathe",
52+
"myst_parser",
53+
"nbsphinx",
54+
"numpydoc",
5155
"sphinx.ext.autodoc",
5256
"sphinx.ext.autosummary",
57+
"sphinx.ext.intersphinx",
5358
"sphinx_copybutton",
54-
"numpydoc",
5559
"sphinx_markdown_tables",
56-
"IPython.sphinxext.ipython_console_highlighting",
57-
"IPython.sphinxext.ipython_directive",
58-
"nbsphinx",
59-
"recommonmark",
60-
"breathe",
60+
"sphinxcontrib.jquery",
6161
]
6262

6363
# Breathe Configuration
@@ -95,14 +95,14 @@
9595
# List of warnings to suppress
9696
suppress_warnings = []
9797

98-
# if the file deprecated.xml does not exist in the doxygen xml output,
99-
# breathe will fail to build the docs, so we conditionally add
100-
# "deprecated.rst" to the exclude_patterns list
98+
# If the file deprecated.xml does not exist in the Doxygen XML output,
99+
# Breathe's deprecated page will fail. Conditionally exclude that page
100+
# and suppress the resulting toctree warning.
101101
if not os.path.exists(
102102
os.path.join(breathe_projects["librmm"], "deprecated.xml")
103103
):
104-
exclude_patterns.append("librmm_docs/deprecated.rst")
105-
suppress_warnings.append("toc.excluded")
104+
exclude_patterns.append("cpp/deprecated.md")
105+
suppress_warnings.append("toc.not_readable")
106106

107107
# The name of the Pygments (syntax highlighting) style to use.
108108
pygments_style = "sphinx"
@@ -117,18 +117,34 @@
117117
# a list of builtin themes.
118118
#
119119

120-
html_theme = "sphinx_rtd_theme"
121-
122-
# Theme options are theme-specific and customize the look and feel of a theme
123-
# further. For a list of options available for each theme, see the
124-
# documentation.
125-
#
126-
# html_theme_options = {}
120+
html_theme = "pydata_sphinx_theme"
121+
html_logo = "_static/RAPIDS-logo-purple.png"
122+
123+
html_theme_options = {
124+
"external_links": [],
125+
"icon_links": [
126+
{
127+
"name": "GitHub",
128+
"url": "https://github.com/rapidsai/rmm",
129+
"icon": "fa-brands fa-github",
130+
"type": "fontawesome",
131+
},
132+
{
133+
"name": "X",
134+
"url": "https://x.com/rapidsai",
135+
"icon": "fa-brands fa-x-twitter",
136+
"type": "fontawesome",
137+
},
138+
],
139+
"show_toc_level": 1,
140+
"navbar_align": "right",
141+
"navigation_with_keys": True,
142+
}
127143

128144
# Add any paths that contain custom static files (such as style sheets) here,
129145
# relative to this directory. They are copied after the builtin static files,
130146
# so a file named "default.css" will overwrite the builtin "default.css".
131-
html_static_path = []
147+
html_static_path = ["_static"]
132148

133149

134150
# -- Options for HTMLHelp output ------------------------------------------
@@ -300,7 +316,6 @@ def on_missing_reference(app, env, node, contnode):
300316

301317

302318
def setup(app):
303-
app.add_js_file("copybutton_pydocs.js")
304319
app.add_css_file("https://docs.rapids.ai/assets/css/custom.css")
305320
app.add_js_file(
306321
"https://docs.rapids.ai/assets/js/custom.js", loading_method="defer"

docs/cpp.rst

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

0 commit comments

Comments
 (0)