conf.py 967 Bytes
Newer Older
Sam Wu's avatar
Sam Wu committed
1
2
3
4
5
6
# 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

Sam Wu's avatar
Sam Wu committed
7
8
import subprocess

Sam Wu's avatar
Sam Wu committed
9
10
from rocm_docs import ROCmDocs

Sam Wu's avatar
Sam Wu committed
11
12
13
14
15
16
17
18
19
20
21

name = "Composable Kernel"
get_version = r'sed -n -e "s/^rocm_setup_version(.* \([0-9\.]\{1,\}\).*/\1/p" ../CMakeLists.txt'
version = subprocess.getoutput(get_version)
if len(version) > 0:
    name = f"{name} {version}"

external_toc_path = "./sphinx/_toc.yml"

docs_core = ROCmDocs(f"{name} Documentation")
docs_core.run_doxygen(doxygen_root="doxygen", doxygen_path="doxygen/docBin/xml")
Sam Wu's avatar
Sam Wu committed
22
23
24
25
26
27
28
29
30
31
32
33
docs_core.setup()

mathjax3_config = {
'tex': {
    'macros': {
        'diag': '\\operatorname{diag}',
        }
    }
}

for sphinx_var in ROCmDocs.SPHINX_VARS:
    globals()[sphinx_var] = getattr(docs_core, sphinx_var)
34
35
36

extensions += ['sphinxcontrib.bibtex']
bibtex_bibfiles = ['refs.bib']