diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 9cdf2d670c..276690bd4f 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -6,7 +6,7 @@ version: 2 updates: - package-ecosystem: "pip" # See documentation for possible values - directory: "/docs/.sphinx" # Location of package manifests + directory: "/docs/sphinx" # Location of package manifests open-pull-requests-limit: 10 schedule: interval: "daily" diff --git a/.readthedocs.yaml b/.readthedocs.yaml index 3baf848c33..2a83261370 100644 --- a/.readthedocs.yaml +++ b/.readthedocs.yaml @@ -10,12 +10,11 @@ formats: [htmlzip, pdf, epub] python: install: - - requirements: docs/.sphinx/requirements.txt + - requirements: docs/sphinx/requirements.txt build: - os: ubuntu-20.04 + os: ubuntu-22.04 tools: python: "3.8" apt_packages: - - "doxygen" - "graphviz" # For dot graphs in doxygen diff --git a/CHANGELOG.md b/CHANGELOG.md index 381efe9b17..91d5f8dd9c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,21 +1,25 @@ # Change Log for ROCm SMI Library -Full documentation for rocm_smi_lib is available at [https://docs.amd.com/](https://docs.amd.com/category/SMI%20API%20Guides). +Full documentation for rocm_smi_lib is available at [https://docs.amd.com/](https://rocm.docs.amd.com/projects/rocm_smi_lib/en/latest/). ## rocm_smi_lib for ROCm 5.5.0 ### Optimizations + - Add new test to measure api execution time. - Remove the shared mutex if no process is using it. ### Added + - ROCm SMI CLI: Add --showtempgraph Feature. ### Changed + - Relying on vendor ID to detect AMDGPU. - Change pragma message to warning for backward compatibility. ### Fixed + - Fix --showproductname when device's SKU cannot be parsed out of the VBIOS string. - Fix compile error: ‘memcpy’ was not declared. - Fix order of CE and UE reporting in ROCm SMI CLI. diff --git a/README.md b/README.md index c987c36a82..8dc71c558f 100755 --- a/README.md +++ b/README.md @@ -51,7 +51,7 @@ The following is an example of how to build the docs: ```shell python3 -m venv .venv -.venv/bin/python3 -m pip install -r docs/.sphinx/requirements.txt +.venv/bin/python3 -m pip install -r docs/sphinx/requirements.txt .venv/bin/python3 -m sphinx -T -E -b html -d docs/_build/doctrees -D language=en docs docs/_build/html ``` diff --git a/docs/.doxygen/.gitignore b/docs/.doxygen/.gitignore deleted file mode 100644 index 5ebfac1dea..0000000000 --- a/docs/.doxygen/.gitignore +++ /dev/null @@ -1 +0,0 @@ -docBin/ diff --git a/docs/.sphinx/_toc.yml b/docs/.sphinx/_toc.yml deleted file mode 100644 index 45624f4efe..0000000000 --- a/docs/.sphinx/_toc.yml +++ /dev/null @@ -1,7 +0,0 @@ -defaults: - numbered: False - maxdepth: 6 -root: index -subtrees: - - entries: - - file: .doxygen/docBin/html/index diff --git a/docs/.sphinx/requirements.in b/docs/.sphinx/requirements.in deleted file mode 100755 index 6c2cd861c3..0000000000 --- a/docs/.sphinx/requirements.in +++ /dev/null @@ -1 +0,0 @@ -rocm-docs-core[api_reference]==0.26.0 diff --git a/docs/conf.py b/docs/conf.py index 733e8bcc24..a4c84ace61 100755 --- a/docs/conf.py +++ b/docs/conf.py @@ -4,12 +4,32 @@ # list see the documentation: # https://www.sphinx-doc.org/en/master/usage/configuration.html +import re + from rocm_docs import ROCmDocs -docs_core = ROCmDocs("ROCm SMI LIB") -docs_core.run_doxygen(doxygen_root='.doxygen', doxygen_path='.') +with open('../CMakeLists.txt', encoding='utf-8') as f: + match = re.search(r'get_package_version_number\(\"?([0-9.]+)[^0-9.]+', f.read()) + if not match: + raise ValueError("VERSION not found!") + version_number = match[1] +left_nav_title = f"ROCm SMI LIB {version_number} Documentation" + +# for PDF output on Read the Docs +project = "ROCm SMI LIB Documentation" +author = "Advanced Micro Devices, Inc." +copyright = "Copyright (c) 2024 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 = "rocm_smi_lib" + for sphinx_var in ROCmDocs.SPHINX_VARS: globals()[sphinx_var] = getattr(docs_core, sphinx_var) diff --git a/docs/doxygen/.gitignore b/docs/doxygen/.gitignore new file mode 100644 index 0000000000..08852dadd8 --- /dev/null +++ b/docs/doxygen/.gitignore @@ -0,0 +1,2 @@ +html/ +xml/ diff --git a/docs/.doxygen/Doxyfile b/docs/doxygen/Doxyfile similarity index 99% rename from docs/.doxygen/Doxyfile rename to docs/doxygen/Doxyfile index 39f0d396eb..1d22ab9965 100644 --- a/docs/.doxygen/Doxyfile +++ b/docs/doxygen/Doxyfile @@ -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 = docBin +OUTPUT_DIRECTORY = . # 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 @@ -1839,7 +1839,7 @@ EXTRA_SEARCH_MAPPINGS = # If the GENERATE_LATEX tag is set to YES, doxygen will generate LaTeX output. # The default value is: YES. -GENERATE_LATEX = YES +GENERATE_LATEX = NO # The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put. If a # relative path is entered the value of OUTPUT_DIRECTORY will be put in front of @@ -2124,7 +2124,7 @@ MAN_LINKS = NO # captures the structure of the code including all documentation. # The default value is: NO. -GENERATE_XML = NO +GENERATE_XML = YES # The XML_OUTPUT tag is used to specify where the XML pages will be put. If a # relative path is entered the value of OUTPUT_DIRECTORY will be put in front of diff --git a/docs/license.md b/docs/license.md new file mode 100644 index 0000000000..234cd49923 --- /dev/null +++ b/docs/license.md @@ -0,0 +1,4 @@ +# License + +```{include} ../License.txt +``` diff --git a/docs/.sphinx/.gitignore b/docs/sphinx/.gitignore similarity index 100% rename from docs/.sphinx/.gitignore rename to docs/sphinx/.gitignore diff --git a/docs/.sphinx/_toc.yml.in b/docs/sphinx/_toc.yml.in old mode 100755 new mode 100644 similarity index 59% rename from docs/.sphinx/_toc.yml.in rename to docs/sphinx/_toc.yml.in index a9a3dd8f89..94ade1c5b7 --- a/docs/.sphinx/_toc.yml.in +++ b/docs/sphinx/_toc.yml.in @@ -5,5 +5,9 @@ defaults: maxdepth: 6 root: index subtrees: - - entries: - - file: .doxygen/docBin/html/index +- caption: API + entries: + - file: doxygen/html/index +- caption: About + entries: + - file: license diff --git a/docs/sphinx/requirements.in b/docs/sphinx/requirements.in new file mode 100644 index 0000000000..e290475dc5 --- /dev/null +++ b/docs/sphinx/requirements.in @@ -0,0 +1 @@ +rocm-docs-core[api_reference]>=0.30.3 diff --git a/docs/.sphinx/requirements.txt b/docs/sphinx/requirements.txt similarity index 88% rename from docs/.sphinx/requirements.txt rename to docs/sphinx/requirements.txt index 72c1c3dffa..4fecda2643 100644 --- a/docs/.sphinx/requirements.txt +++ b/docs/sphinx/requirements.txt @@ -1,5 +1,5 @@ # -# This file is autogenerated by pip-compile with Python 3.10 +# This file is autogenerated by pip-compile with Python 3.8 # by the following command: # # pip-compile requirements.in @@ -105,6 +105,8 @@ pynacl==1.5.0 # via pygithub pyparsing==3.0.9 # via doxysphinx +pytz==2023.3.post1 + # via babel pyyaml==6.0 # via # myst-parser @@ -114,7 +116,7 @@ requests==2.28.2 # via # pygithub # sphinx -rocm-docs-core[api_reference]==0.26.0 +rocm-docs-core[api_reference]>=0.30.3 # via -r requirements.in smmap==5.0.0 # via gitdb @@ -159,7 +161,11 @@ tqdm==4.66.1 # via mpire typing-extensions==4.5.0 # via pydata-sphinx-theme -urllib3==2.0.3 +urllib3==1.26.18 # via requests wrapt==1.15.0 # via deprecated +zipp==3.17.0 + # via + # importlib-metadata + # importlib-resources