-
Notifications
You must be signed in to change notification settings - Fork 7
Add Sphinx support to documentation #224
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: develop
Are you sure you want to change the base?
Changes from all commits
2b27c4d
f10559e
6bb1bba
6bc7a2e
f6cd456
efa99fb
d700dac
9fe03a0
4e17749
5d28f93
3375556
e0f6a5e
6c90324
6279fe8
ecff860
8d0a5d9
289b389
7fae5c0
658b57a
a43c82f
f6802d7
fe2bf75
f680e78
2563eae
9c3dd59
63120ab
cefa688
4ab4b1e
0bcc11e
8843376
1dcbd78
86604cc
f5ea909
208f3a1
c6cbb4b
16ce76e
f11aae9
f9c343e
50fb502
82a0c4c
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||
|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,18 @@ | ||||||||
| # Read the Docs configuration file | ||||||||
| # See https://docs.readthedocs.io/en/stable/config-file/v2.html for details | ||||||||
|
|
||||||||
| version: 2 | ||||||||
|
|
||||||||
| sphinx: | ||||||||
| configuration: docs/conf.py | ||||||||
|
||||||||
| configuration: docs/conf.py | |
| configuration: docs/sphinx/conf.py |
Copilot
AI
Mar 26, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
.readthedocs.yaml installs from docs/sphinx/requirements.txt, but that file isn't present in the repository. RTD builds will fail during dependency installation unless you add this requirements file or change the python.install section to install the needed packages another way.
| - requirements: docs/sphinx/requirements.txt | |
| - method: pip | |
| path: . |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,79 @@ | ||
| # hipFile Documentation | ||
|
|
||
| hipFile is documented using Doxygen markup in the public header | ||
| files and Sphinx .rst files. | ||
|
|
||
| ## Building the Documentation | ||
|
|
||
| hipFile can generate two documentation products: | ||
|
|
||
| 1. API documentation | ||
| 2. Sphinx HTML documentation (includes #1) | ||
|
|
||
| API documentation is generated from Doxygen and limited to markup | ||
| in the header files. This will generate HTML, XML, and LaTeX output. | ||
| The LaTeX can be used to create a pdf document. | ||
|
|
||
| The Sphinx documentation incorporates the Doxygen API markup and | ||
| adds reStructured text file content to generate HTML documentation | ||
| for the web. | ||
|
|
||
| The documentation CMake target currently builds both. There is | ||
| no way to select "just Doxygen". | ||
|
|
||
| ### Requirements | ||
|
|
||
| * CMake >= 3.21 | ||
| * Doxygen (we use 1.9.8, other versions are untested) | ||
| * Python 3.12 (earlier versions might work but are untested) | ||
| * The following Python packages: | ||
| * breathe | ||
| * rocm-docs-core | ||
| * sphinx | ||
| * sphinx-rtd-theme | ||
|
|
||
| If you want to build a pdf, you will need LaTeX and pdflatex. | ||
|
|
||
| ### Generation | ||
|
|
||
| Building the documentation is done via CMake by turning on the docs | ||
| option (which is off by default). | ||
|
|
||
| `cmake -DAIS_BUILD_DOCS=ON <options> <path/to/source>` | ||
|
|
||
| You can then build the `doc` target. | ||
|
|
||
| `cmake --build . --target doc` | ||
|
|
||
| The documentation will be in the `docs` subdirectory of the build | ||
| directory: | ||
|
|
||
| ``` | ||
| ├── doxygen | ||
| │ ├── html | ||
| │ ├── latex | ||
| │ └── xml | ||
| └── sphinx | ||
| └── html | ||
| ``` | ||
|
|
||
| To generate a pdf for the API docs, navigate to `doxygen/latex` and run `make pdf` to | ||
| generate a pdf named `refman.pdf`. | ||
|
|
||
| To generate a pdf for the Sphinx docs, navigate to `sphinx/html` and run `make` in | ||
| the directory. This will generate a pdf named `rocshmem.pdf` (we are stealing their | ||
| configs until `rocm-docs-core` is updated). | ||
|
|
||
| ## Adding to the Documentation | ||
|
|
||
| ### API Documentation (Doxygen) | ||
|
|
||
| * Make your markup look like the rest of the file | ||
| * Doxygen macros can be found in `docs/doxygen/Doxyfile.in` | ||
| * All public API types, functions, etc. MUST have Doxygen markup | ||
|
|
||
| ### Other Documentation (Sphinx) | ||
|
|
||
| All other documentation goes in Sphinx .rst documents. API-specific documentation | ||
| belongs in `docs/API` and other documentation goes in `docs`. Be sure to update | ||
| `sphinx/_toc.yml.in` if you add any new files. |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,2 @@ | ||
| hipify | ||
| ====== |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,43 @@ | ||
| .. meta:: | ||
| :description: hipFile does hipFile stuff | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Was this going to be replaced later?
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes. This is still fundamentally a draft. I just flipped it to normal to see what Copilot was going to complain about. |
||
| :keywords: hipFile, ROCm, storage, library, API, DMA | ||
|
|
||
| ********************* | ||
| hipFile documentation | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Capitalize |
||
| ********************* | ||
|
|
||
| hipFile introduction goes here. For more information, see :doc:`introduction`. | ||
|
|
||
| The hipFile public repository is located at `<https://github.com/ROCm/hipFile>`_. | ||
|
|
||
| .. grid:: 2 | ||
| :gutter: 3 | ||
|
|
||
| .. grid-item-card:: Build and install | ||
|
|
||
| * :doc:`Configure and build <./config_build>` | ||
| * :doc:`Sanitizers <./sanitizers>` | ||
|
|
||
| .. grid-item-card:: Using hipFile | ||
|
|
||
| * :doc:`hipify <./hipify>` | ||
| * :doc:`NVIDIA compatibility <./nvidia_compat>` | ||
| * :doc:`fio <./fio>` | ||
| * :doc:`Collecting statistics <./stats_collection>` | ||
|
|
||
| .. grid-item-card:: API reference | ||
|
|
||
| * :doc:`Errors <./api/errors>` | ||
| * :doc:`Core API <./api/core>` | ||
| * :doc:`Drivers <./api/driver>` | ||
| * :doc:`File operations <./api/file>` | ||
| * :doc:`Asynchronous operations <./api/async>` | ||
| * :doc:`Batch operations <./api/batch>` | ||
| * :doc:`RDMA <./api/rdma>` | ||
| * :doc:`Other <./api/misc_api>` | ||
|
|
||
| To contribute to the documentation, refer to | ||
| `Contributing to ROCm <https://rocm.docs.amd.com/en/latest/contribute/contributing.html>`_. | ||
|
|
||
| You can find licensing information on the | ||
| `Licensing <https://rocm.docs.amd.com/en/latest/about/license.html>`_ page. | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,45 @@ | ||
| defaults: | ||
| numbered: False | ||
| root: index | ||
| subtrees: | ||
derobins marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| - entries: | ||
| - file: introduction.rst | ||
| title: Introduction | ||
|
|
||
| - caption: Build and install | ||
| entries: | ||
| - file: config_build.rst | ||
| title: Configure and build | ||
| - file: sanitizers.rst | ||
| title: Sanitizers | ||
|
|
||
| - caption: Using hipFile | ||
| entries: | ||
| - file: hipify.rst | ||
| title: hipify | ||
| - file: nvidia_compat.rst | ||
| title: cuFile compatibility | ||
| - file: fio.rst | ||
| title: fio support | ||
| - file: stats_collection.rst | ||
| title: Collecting statistics | ||
|
|
||
| - caption: API reference | ||
| entries: | ||
| - file: api/errors.rst | ||
| title: Errors | ||
| - file: api/core.rst | ||
| title: Core | ||
| - file: api/driver.rst | ||
| title: Drivers | ||
| - file: api/file.rst | ||
| title: File operations | ||
| - file: api/async.rst | ||
| title: Asynchronous operations | ||
| - file: api/batch.rst | ||
| title: Batch operations | ||
| - file: api/rdma.rst | ||
| title: RDMA | ||
| - file: api/misc_api.rst | ||
| title: Other | ||
Uh oh!
There was an error while loading. Please reload this page.