SWDEV-428554 - Standardize HIP Documentation

Relates to https://github.com/RadeonOpenCompute/rocm-docs-core/issues/330

Change-Id: I87468935a1aefa60158b8c07e3911845b3e8da36


[ROCm/hip commit: 29a532bd79]
이 커밋은 다음에 포함됨:
Sam Wu
2023-11-01 10:32:23 -06:00
커밋한 사람 Sam Wu
부모 86a0fc9fbe
커밋 1117c11909
12개의 변경된 파일과 67개의 추가작업 그리고 43개의 파일을 삭제
+26 -13
파일 보기
@@ -4,23 +4,36 @@
# list see the documentation:
# https://www.sphinx-doc.org/en/master/usage/configuration.html
from rocm_docs import ROCmDocs
import re
from typing import Any, Dict, List
docs_core = ROCmDocs("HIP Documentation")
docs_core.run_doxygen()
from rocm_docs import ROCmDocs
version_numbers = []
version_file = open("../VERSION", "r")
lines = version_file.readlines()
for line in lines:
if line[0] == '#':
continue
version_numbers.append(line.strip())
version_number = ".".join(version_numbers)
left_nav_title = f"HIP {version_number} Documentation"
# for PDF output on Read the Docs
project = "HIP Documentation"
author = "Advanced Micro Devices, Inc."
copyright = "Copyright (c) 2023 Advanced Micro Devices, Inc. All rights reserved."
version = version_number
release = version_number
external_toc_path = "./sphinx/_toc.yml"
docs_core = ROCmDocs(left_nav_title)
docs_core.run_doxygen(doxygen_root="doxygen", doxygen_path="doxygen/xml")
docs_core.enable_api_reference()
docs_core.setup()
external_projects_current_project = "hip"
for sphinx_var in ROCmDocs.SPHINX_VARS:
globals()[sphinx_var] = getattr(docs_core, sphinx_var)
# rocm-docs-core might or might not have changed these yet (depending on version),
# and we don't want to wipe their settings if they did
if not "html_theme_options" in globals():
html_theme_options: Dict[str, Any] = {}
if not "exclude_patterns" in globals():
exclude_patterns: List[str] = []
html_theme_options["show_navbar_depth"] = 2
exclude_patterns.append(".doxygen/mainpage.md")