CodeQL / Analyze (actions) (push) Canceled after 0s
CodeQL / Analyze (python) (push) Canceled after 0s
pre-commit / pre-commit (push) Canceled after 0s
Multi-Arch CI / setup (push) Canceled after 0s
Publish build_manylinux_x86_64 images / publish_build_manylinux_x86_64 (push) Canceled after 0s
Setup (Multi-Arch) / setup (push) Canceled after 0s
Multi-Arch CI / Linux::${{ fromJSON(needs.setup.outputs.linux_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubi10 image / publish_no_rocm_image_ubi10 (push) Canceled after 0s
Multi-Arch CI / Windows::${{ fromJSON(needs.setup.outputs.windows_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Multi-Arch CI / Manifest Diff (push) Canceled after 0s
TheRock Manifest Diff Report / Generate Manifest Diff Report (push) Canceled after 0s
Multi-Arch CI / CI Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_ocl_rt images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_rocgdb images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Unit Tests / Unit Tests :: ubuntu-24.04 (push) Canceled after 0s
Unit Tests / Unit Tests :: windows-2022 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_media (push) Canceled after 0s
Unit Tests / Unit Tests Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_openmpi (push) Canceled after 0s
81 lines
2.5 KiB
Python
81 lines
2.5 KiB
Python
# Configuration file for the Sphinx documentation builder.
|
|
#
|
|
# For the full list of built-in configuration values, see the documentation:
|
|
# https://www.sphinx-doc.org/en/master/usage/configuration.html
|
|
|
|
import re
|
|
from pathlib import Path
|
|
|
|
def get_version_info(filepath):
|
|
with open(filepath, "r") as f:
|
|
content = f.read()
|
|
|
|
version_pattern = (
|
|
r"^#define\s+AMDCUID_LIB_VERSION_MAJOR\s+(\d+)\s*$|"
|
|
r"^#define\s+AMDCUID_LIB_VERSION_MINOR\s+(\d+)\s*$|"
|
|
r"^#define\s+AMDCUID_LIB_VERSION_PATCH\s+(\d+)\s*$"
|
|
)
|
|
|
|
matches = re.findall(version_pattern, content, re.MULTILINE)
|
|
|
|
if len(matches) == 3:
|
|
version_major, version_minor, version_patch = [
|
|
match for match in matches if any(match)
|
|
]
|
|
return version_major[0], version_minor[1], version_patch[2]
|
|
else:
|
|
raise ValueError("Couldn't find all VERSION numbers in amd_cuid.h.")
|
|
|
|
|
|
version_major, version_minor, version_patch = get_version_info(
|
|
"../lib/include/amd_cuid.h"
|
|
)
|
|
version_number = f"{version_major}.{version_minor}.{version_patch}"
|
|
|
|
# -- Project information -----------------------------------------------------
|
|
project = "CUID"
|
|
author = "Advanced Micro Devices, Inc."
|
|
copyright = "Copyright (c) 2026 Advanced Micro Devices, Inc. All rights reserved."
|
|
version = version_number
|
|
release = version_number
|
|
|
|
# -- General configuration ---------------------------------------------------
|
|
html_theme = "rocm_docs_theme"
|
|
html_theme_options = {"flavor": "rocm"}
|
|
html_title = f"CUID {version_number} documentation"
|
|
suppress_warnings = ["etoc.toctree"]
|
|
external_toc_path = "./sphinx/_toc.yml"
|
|
|
|
external_projects_current_project = "amdcuid"
|
|
extensions = ["rocm_docs", "rocm_docs.doxygen"]
|
|
|
|
doxygen_root = "doxygen"
|
|
doxysphinx_enabled = True
|
|
doxygen_project = {
|
|
"name": "AMD CUID C API reference",
|
|
"path": "doxygen/docBin/xml",
|
|
}
|
|
|
|
|
|
def generate_doxyfile(app, _):
|
|
doxyfile_in = Path(app.confdir) / doxygen_root / "Doxyfile.in"
|
|
doxyfile_out = Path(app.confdir) / doxygen_root / "Doxyfile"
|
|
|
|
if not doxyfile_in.exists():
|
|
from sphinx.errors import ConfigError
|
|
|
|
raise ConfigError(f"Missing Doxyfile.in at {doxyfile_in}")
|
|
|
|
with open(doxyfile_in) as f:
|
|
content = f.read()
|
|
|
|
content = content.replace("@PROJECT_NUMBER@", version_number)
|
|
|
|
with open(doxyfile_out, "w") as f:
|
|
f.write(content)
|
|
|
|
|
|
def setup(app):
|
|
app.connect("config-inited", generate_doxyfile, priority=100)
|
|
return {"parallel_read_safe": True, "parallel_write_safe": True}
|