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
68 lines
2.1 KiB
Python
68 lines
2.1 KiB
Python
# Copyright(C) 2024 Advanced Micro Devices, Inc. All rights reserved.
|
|
# Configuration file for the Sphinx documentation builder.
|
|
# This file only contains a selection of the most common options.
|
|
# For a full list, see the documentation:
|
|
# https://www.sphinx-doc.org/en/master/usage/configuration.html
|
|
|
|
import datetime
|
|
import re
|
|
import sys
|
|
from pathlib import Path
|
|
|
|
from rocm_docs import ROCmDocs
|
|
|
|
# Add the Tensile module to PYTHON_PATH
|
|
sys.path.append(str(Path(__file__).resolve().parent.parent))
|
|
|
|
|
|
def get_semantic_version_from_file(file_path: str, search_prefix: str):
|
|
regex = rf'{search_prefix}"(\d+\.\d+\.\d+)"'
|
|
with open(file_path, "r") as f:
|
|
match = re.search(regex, f.read())
|
|
if not match:
|
|
raise ValueError(
|
|
f"Version is either not found or malformed. File: {file_path}, search prefix: {search_prefix}"
|
|
)
|
|
return match.group(1)
|
|
|
|
|
|
semantic_version = get_semantic_version_from_file("../bump-version.sh", "NEW_VERSION=")
|
|
left_nav_title = f"Tensile {semantic_version} Documentation"
|
|
|
|
# for PDF output on Read the Docs
|
|
project = "Tensile Documentation"
|
|
author = "Advanced Micro Devices, Inc."
|
|
year = datetime.date.today().strftime("%Y")
|
|
copyright = f"Copyright (c) {year} Advanced Micro Devices, Inc. All rights reserved."
|
|
version = f"{semantic_version}"
|
|
release = f"{semantic_version}"
|
|
|
|
numfig_reset = True
|
|
|
|
autodoc_default_options = {
|
|
"members": True,
|
|
"member-order": "bysource",
|
|
"undoc-members": True,
|
|
"special-members": "__init__, __getitem__",
|
|
"inherited-members": True,
|
|
"show-inheritance": True,
|
|
"imported-members": False,
|
|
"member-order": "bysource", # bysource: seems unfortunately not to work for Cython modules
|
|
}
|
|
|
|
external_toc_path = "./sphinx/_toc.yml"
|
|
external_projects_current_project = "Tensile"
|
|
|
|
docs_core = ROCmDocs(left_nav_title)
|
|
docs_core.setup()
|
|
|
|
for sphinx_var in ROCmDocs.SPHINX_VARS:
|
|
globals()[sphinx_var] = getattr(docs_core, sphinx_var)
|
|
|
|
extensions += [
|
|
"sphinx.ext.autodoc", # Automatically create API documentation from Python docstrings
|
|
"sphinx.ext.napoleon",
|
|
"sphinx.ext.mathjax",
|
|
"sphinxcontrib.datatemplates",
|
|
]
|