Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
45cb921
Move .rst files to docs/sphinx
derobins Dec 23, 2025
54f0077
Add .readthedocs.yaml
derobins Mar 17, 2026
64425b9
Move Doxyfile.in to docs/doxygen/
derobins Mar 17, 2026
2e7d1e2
Move API Sphinx docs to docs/api
derobins Mar 17, 2026
1328970
Move misc Sphinx docs to docs/
derobins Mar 17, 2026
ebd8d3a
Add toc and requirements
derobins Mar 17, 2026
cfeebcb
Add conf.py
derobins Mar 17, 2026
f275f90
Fixes that make Sphinx "work"
derobins Mar 17, 2026
c344af6
Add stats_collection to Sphinx
derobins Mar 17, 2026
48bd17a
Fix index.rst rocSHMEM comment
derobins Mar 18, 2026
2d48924
Fix missing space in index.rst
derobins Mar 18, 2026
b76d494
Add a comment block to _toc.yml.in
derobins Mar 18, 2026
1def73c
Fix correctness and formatting in .readthedocs.yaml
derobins Mar 18, 2026
8acfbad
Suppress pylint complaints on conf.py
derobins Mar 18, 2026
5b6c4ed
Add rocm_docs to pip list
derobins Mar 18, 2026
d4a3e1d
Fix rocm_docs package typo
derobins Mar 18, 2026
dc8c802
First cut at moving sphinx generation to CMake
derobins Mar 18, 2026
e54bc25
Fixed a lot of CMake issues
derobins Mar 18, 2026
7c224d9
Fix cmakelint issues
derobins Mar 19, 2026
ccc7d1e
Fix pylint issues
derobins Mar 19, 2026
397835c
Fix quotes on conf.py
derobins Mar 19, 2026
fdba1f0
Install rocm-docs-core via pip in Docker images
derobins Mar 25, 2026
019a5de
pip3 --> pip
derobins Mar 25, 2026
ac7128f
Install pip on Ubuntu
derobins Mar 25, 2026
74ab83e
Add pip to SUSE and Rocky
derobins Mar 25, 2026
ed0cbd9
pip3 --> python3 -m pip
derobins Mar 25, 2026
f26adc4
Apparently we need Python3
derobins Mar 25, 2026
97e48a4
Forgot RUN
derobins Mar 25, 2026
7a1bc94
Yet another try at the right dependencies
derobins Mar 25, 2026
e2f9da3
Add debug output to Ubuntu
derobins Mar 25, 2026
0cd74f1
Docker Python setup should work now
derobins Mar 25, 2026
0e86476
Add venv to CI
derobins Mar 25, 2026
ff9c648
Remove rocm-docs-core from list of apt packages
derobins Mar 25, 2026
53b493c
Fix Python configs
derobins Mar 25, 2026
53b81bd
Copy conf.py and _toc.yml.in to build directory
derobins Mar 25, 2026
c6563f1
Add a README to the docs directory
derobins Mar 25, 2026
6acde4d
Update docs/README.md
derobins Mar 26, 2026
5d41a9f
Add a blank line before bulleted list
derobins Mar 26, 2026
c46bd65
Update CHANGELOG.md
derobins Mar 26, 2026
172aa09
Add Sphinx LaTeX output
derobins Mar 26, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/build-ais.yml
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,7 @@ jobs:
-w /ais/hipFile/build \
"${AIS_CONTAINER_NAME}" \
/bin/bash -c '
source /opt/venv/bin/activate
export CPACK_DEBIAN_PACKAGE_RELEASE="${JOB_DESIGNATOR}${SLES_BUILD_ID_PREFIX}${BUILD_ID}~$(source /etc/os-release && echo ${VERSION_ID})"
export CPACK_RPM_PACKAGE_RELEASE="${JOB_DESIGNATOR}${SLES_BUILD_ID_PREFIX}${BUILD_ID}"
cmake \
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/pylint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,12 @@ jobs:
- name: Set up Python
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 #v6.2.0

- name: Set up pylint and black
- name: Install packages
run: |
python -m pip install --upgrade pip
python -m pip install pylint
python -m pip install black
python -m pip install rocm-docs-core
- name: Lint all Python files
run: |
Expand Down
18 changes: 18 additions & 0 deletions .readthedocs.yaml
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
Copy link

Copilot AI Mar 26, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Read the Docs is configured to use docs/conf.py, but this repo only contains docs/sphinx/conf.py (and the CMake build copies that into the build tree). As-is, RTD builds will fail to start because the configured Sphinx conf.py path does not exist. Update the RTD config to point at the actual Sphinx config file (or add a docs/conf.py shim that delegates to docs/sphinx/conf.py).

Suggested change
configuration: docs/conf.py
configuration: docs/sphinx/conf.py

Copilot uses AI. Check for mistakes.
Copy link

Copilot AI Apr 1, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The Read the Docs config points to docs/conf.py, but this repo’s Sphinx config is under docs/sphinx/conf.py (and docs/sphinx is the only Sphinx config dir present). As written, RTD will fail to find the configuration file.

Suggested change
configuration: docs/conf.py
configuration: docs/sphinx/conf.py

Copilot uses AI. Check for mistakes.

formats: []

python:
install:
- requirements: docs/sphinx/requirements.txt
Copy link

Copilot AI Mar 26, 2026

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.

Suggested change
- requirements: docs/sphinx/requirements.txt
- method: pip
path: .

Copilot uses AI. Check for mistakes.

build:
os: ubuntu-22.04
tools:
python: "3.10"
Copy link

Copilot AI Apr 1, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This config pins Read the Docs to Python 3.10, but docs/README.md states Python 3.12 is required/expected. Align the documented requirement with what RTD uses (or update RTD to use 3.12 if that’s the actual requirement).

Suggested change
python: "3.10"
python: "3.12"

Copilot uses AI. Check for mistakes.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
* Added check in the Fastpath/AIS backend to ensure the HIP Runtime is initialized. This avoids causing a segfault in the HIP Runtime.
* The default CMake build type was changed from `Debug` to `RelWithDebInfo`
* Added file type and file system validation in Fastpath. Fastpath will only accept IO targeting block devices or regular files backed by xfs or ext4 with ordered journaling mode. Other file systems can be explicitly allowed via the `HIPFILE_UNSUPPORTED_FILE_SYSTEMS` environment variable.
* The docs directory has been reorganized and `AIS_BUILD_DOCS` will now generate Sphinx output for the web.

### Removed
* The rocFile library has been completely removed and the code is now a part of hipFile.
Expand Down
20 changes: 5 additions & 15 deletions INSTALL.md
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,9 @@ sudo systemctl reboot
* `libmount-dev` (Debian/Ubuntu)
* `libmount-devel` (RHEL/Fedora/openSUSE)

Please the the README.md file in the docs directory for requirements
for building the documentation.

Comment on lines +119 to +121
Copy link

Copilot AI Apr 1, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The new sentence has a grammatical error ("Please the the") and is missing the verb (likely "Please see"). Also consider linking directly to docs/README.md to avoid ambiguity.

Suggested change
Please the the README.md file in the docs directory for requirements
for building the documentation.
Please see docs/README.md for requirements for building the documentation.

Copilot uses AI. Check for mistakes.
### Configure

You do not need to set the `HIP_PLATFORM` environment variable, as
Expand All @@ -126,7 +129,7 @@ that will be set by CMake.
Options
|Option|Default|Purpose|
|------|-------|-------|
|AIS\_BUILD\_DOCS|OFF|Build API documentation (requires Doxygen)|
|AIS\_BUILD\_DOCS|OFF|Build API documentation (see `docs/README.md`)|
|AIS\_INSTALL\_EXAMPLES|ON|Install example programs|
|AIS\_USE\_CLANG\_TIDY|OFF|Run the `clang-tidy` tool (clang only)|
|AIS\_USE\_CODE\_COVERAGE|OFF|Generate code coverage information when tests are run (clang only)|
Expand Down Expand Up @@ -191,18 +194,5 @@ The results will be wrote to `<path/to/repo>/build`, in the
`coverage-report.txt` and `coverage-lines.txt` files.

### Documentation
The API documentation is built using Doxygen. To build it, use the
`AIS_BUILD_DOCS` option. This will build the documentation for any
libraries that have been configured. As a special case, configuring
the documentation without any library will build the documentation
for BOTH libraries, allowing for a docs-only build.

The documentation will be built with the libraries and appear in
`docs/(hip|roc)file`. We build HTML, XML, and LaTeX docs. If you
want a pdf, run `make pdf` in the `latex` directory, which will
create a file named refman.pdf that you can rename.

If you want to build the docs without compiling the libraries,
you can just build the `doc` target (if you've set `AIS_BUILD_DOCS`):

`cmake --build . --target doc`
See `docs/README.md`
79 changes: 70 additions & 9 deletions cmake/AISDocumentation.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -13,27 +13,88 @@ option(AIS_BUILD_DOCS "Build the hipFile docs (requires Doxygen, Sphinx, and Bre

if(AIS_BUILD_DOCS)
find_package(Doxygen REQUIRED)
find_package(Python3 REQUIRED COMPONENTS Interpreter)

# Verify Sphinx + rocm_docs are available
execute_process(
COMMAND "${Python3_EXECUTABLE}" -c "import rocm_docs"
RESULT_VARIABLE _rocm_docs_found
OUTPUT_QUIET ERROR_QUIET
)
if(NOT _rocm_docs_found EQUAL 0)
message(FATAL_ERROR "rocm_docs Python package not found. Install it with: pip install rocm-docs-core")
endif()
Comment on lines +18 to +26
Copy link

Copilot AI Apr 1, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The comment says this block verifies "Sphinx + rocm_docs" are available, but the code only checks import rocm_docs. Either extend the check to also validate Sphinx/Breathe imports, or update the comment to match what’s actually being verified.

Copilot uses AI. Check for mistakes.

# Set Doxygen input (pasted into Doxyfile.in)
set(AIS_DOXYFILE_INPUT "${HIPFILE_ROOT_PATH}/include")

# Set the path to the documentation
set(AIS_DOC_PATH "${CMAKE_CURRENT_BINARY_DIR}/docs")

###########
# Doxygen #
###########

# The Doxygen HTML, XML, etc. goes in docs/doxygen/

# Set the Doxyfile install location
set(AIS_DOXYFILE ${AIS_DOC_PATH}/Doxyfile)
set(AIS_DOXYFILE "${AIS_DOC_PATH}/doxygen/Doxyfile")

# Doxygen XML output dir (consumed by Breathe inside Sphinx)
set(AIS_DOXYGEN_XML_DIR "${AIS_DOC_PATH}/doxygen/xml")

# Create the Doxyfile from the input file
configure_file("docs/Doxyfile.in" ${AIS_DOXYFILE})
configure_file("docs/doxygen/Doxyfile.in" ${AIS_DOXYFILE})

##########
# Sphinx #
##########

# The Sphinx HTML, XML, etc. goes in docs/sphinx/

# Set the target for the config file and toc file
set(AIS_SPHINX_CONF_FILE "${AIS_DOC_PATH}/sphinx/conf.py")
set(AIS_SPHINX_TOC_FILE "${AIS_DOC_PATH}/sphinx/_toc.yml.in")

# Sphinx HTML output dir
set(AIS_SPHINX_BUILD_DIR "${AIS_DOC_PATH}/sphinx/html")

# Set the output directory
set(DOXYGEN_OUT ${AIS_DOC_PATH})
# Copy conf.py and the table of contents file
# Need to do this so the toc file doesn't dirty the repo
# _toc.yml.in is transformed by rocm_docs, not CMake
configure_file("docs/sphinx/conf.py" ${AIS_SPHINX_CONF_FILE} COPYONLY)
configure_file("docs/sphinx/_toc.yml.in" ${AIS_SPHINX_TOC_FILE} COPYONLY)

# Configure the documentation build
add_custom_target("doc"
COMMAND ${DOXYGEN_EXECUTABLE} ${AIS_DOXYFILE}
WORKING_DIRECTORY ${AIS_DOC_PATH}
COMMENT "Generating hipFile API documentation with Doxygen"
# Build docs: Doxygen first, then Sphinx (which pulls in rocm_docs via conf.py)
add_custom_target(doc
# Step 1: Run Doxygen to produce XML for Breathe
COMMAND "${DOXYGEN_EXECUTABLE}" "${AIS_DOXYFILE}"
# Step 2: Run Sphinx (html), injecting the Doxygen paths via environment
COMMAND
${CMAKE_COMMAND} -E env
"DOXYFILE_PATH=${AIS_DOXYFILE}"
"DOXYGEN_ROOT=${AIS_DOC_PATH}/doxygen"
"DOXYGEN_XML_DIR=${AIS_DOXYGEN_XML_DIR}"
"${Python3_EXECUTABLE}" -m sphinx
-b html
-c "${AIS_DOC_PATH}/sphinx"
"${HIPFILE_ROOT_PATH}/docs"
"${AIS_SPHINX_BUILD_DIR}"
-v
# Step 3: Run Sphinx (LaTeX), injecting the Doxygen paths via environment
COMMAND
${CMAKE_COMMAND} -E env
"DOXYFILE_PATH=${AIS_DOXYFILE}"
"DOXYGEN_ROOT=${AIS_DOC_PATH}/doxygen"
"DOXYGEN_XML_DIR=${AIS_DOXYGEN_XML_DIR}"
"${Python3_EXECUTABLE}" -m sphinx
-b latex
-c "${AIS_DOC_PATH}/sphinx"
"${HIPFILE_ROOT_PATH}/docs"
"${AIS_SPHINX_BUILD_DIR}"
-v
Comment on lines +90 to +95
Copy link

Copilot AI Apr 1, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The Sphinx LaTeX build is currently writing into the HTML output directory (${AIS_SPHINX_BUILD_DIR}), which will overwrite/mix outputs and makes it impossible to run make for a PDF from the expected LaTeX build dir. Use a dedicated LaTeX output directory (e.g., ${AIS_DOC_PATH}/sphinx/latex) for the -b latex invocation.

Copilot uses AI. Check for mistakes.
WORKING_DIRECTORY "${AIS_DOC_PATH}"
COMMENT "Generating hipFile API documentation with Doxygen + Sphinx (rocm_docs)"
VERBATIM
)

Expand Down
79 changes: 79 additions & 0 deletions docs/README.md
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
Copy link

Copilot AI Apr 1, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The PDF generation instructions for Sphinx are inconsistent with how Sphinx typically outputs LaTeX (and with the CMake target invoking -b latex). You generally need to run make in the LaTeX output directory (e.g., sphinx/latex), not sphinx/html; update these paths to match the actual build output directories.

Suggested change
To generate a pdf for the Sphinx docs, navigate to `sphinx/html` and run `make` in
To generate a pdf for the Sphinx docs, navigate to `sphinx/latex` and run `make` in

Copilot uses AI. Check for mistakes.
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.
Comment on lines +78 to +79
Copy link

Copilot AI Apr 1, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The paths here don’t match the repo layout: the API docs live under docs/api/ (lowercase), and the TOC file is under docs/sphinx/_toc.yml.in. As written, contributors may add content in the wrong place or update the wrong TOC file.

Suggested change
belongs in `docs/API` and other documentation goes in `docs`. Be sure to update
`sphinx/_toc.yml.in` if you add any new files.
belongs in `docs/api/` and other documentation goes in `docs/`. Be sure to update
`docs/sphinx/_toc.yml.in` if you add any new files.

Copilot uses AI. Check for mistakes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion docs/Doxyfile.in → docs/doxygen/Doxyfile.in
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ PROJECT_LOGO =
# entered, it will be relative to the location where doxygen was started. If
# left blank the current directory will be used.

OUTPUT_DIRECTORY =
OUTPUT_DIRECTORY = @AIS_DOC_PATH@/doxygen

# If the CREATE_SUBDIRS tag is set to YES then doxygen will create up to 4096
# sub-directories (in 2 levels) under the output directory of each output format
Expand Down
2 changes: 2 additions & 0 deletions docs/hipify.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
hipify
======
43 changes: 43 additions & 0 deletions docs/index.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
.. meta::
:description: hipFile does hipFile stuff
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Was this going to be replaced later?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The 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
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Capitalize Documentation?

*********************

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.
45 changes: 45 additions & 0 deletions docs/sphinx/_toc.yml.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
defaults:
numbered: False
root: index
subtrees:

- 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
Loading
Loading