Unified configuration for metrics (#726)

* Show description of metrics during analysis
    * Use --include-cols Description show the Description column in analyze mode (this is hidden by default)
    * Remove tips field from analysis config

* Align metric names in analysis config and documentation

* Add unified config utils/unified_config.yaml

* Add python script utils/split_config.py to auto generate analysis configuration and documentation metrics description
   * Add test case to ensure unified config is older than auto-generated config
   * Auto generate analysis config and documentation metrics description

* Update CONTRIBUTING.md to add instructions to build documentation assets
    * Add docker image and compose file to build documentation

* Update CHANGELOG and Documentation

* Use jinja template instead of hardcoding metric tables in documentation

[ROCm/rocprofiler-compute commit: bb44e90b2d]
This commit is contained in:
vedithal-amd
2025-07-25 14:01:34 -04:00
committed by GitHub
parent dcdadfd37d
commit 354fe5f52c
232 changed files with 44409 additions and 22480 deletions
+118 -1
View File
@@ -30,6 +30,8 @@
import re
import yaml
with open("../VERSION", encoding="utf-8") as f:
match = re.search(r"([0-9.]+)[^0-9.]+", f.read())
if not match:
@@ -43,7 +45,12 @@ copyright = "Copyright (c) 2025 Advanced Micro Devices, Inc. All rights reserved
version = version_number
release = version_number
extensions = ["rocm_docs", "sphinx.ext.extlinks", "sphinxcontrib.datatemplates"]
extensions = [
"rocm_docs",
"sphinx.ext.extlinks",
"sphinxcontrib.datatemplates",
"sphinx_jinja",
]
html_theme = "rocm_docs_theme"
html_theme_options = {"flavor": "rocm"}
html_title = f"{project} {version_number} documentation"
@@ -52,6 +59,113 @@ exclude_patterns = ["archive", "*/includes"]
html_static_path = ["sphinx/static/css"]
html_css_files = ["o_custom.css"]
with open("data/metrics_description.yaml", "r") as f:
metrics_data = yaml.safe_load(f)
jinja_contexts = {
"wavefront-launch-stats": {
"data": metrics_data["Wavefront launch stats"],
},
"wavefront-runtime-stats": {
"data": metrics_data["Wavefront runtime stats"],
},
"instruction-mix": {
"data": metrics_data["Overall instruction mix"],
},
"valu-arith-instruction-mix": {
"data": metrics_data["VALU arithmetic instruction mix"],
},
"mfma-instruction-mix": {
"data": metrics_data["MFMA instruction mix"],
},
"compute-speed-of-light": {
"data": metrics_data["Compute Speed-of-Light"],
},
"pipeline-stats": {
"data": metrics_data["Pipeline statistics"],
},
"arithmetic-operations": {
"data": metrics_data["Arithmetic operations"],
},
"lds-sol": {
"data": metrics_data["LDS Speed-of-Light"],
},
"lds-stats": {
"data": metrics_data["LDS Statistics"],
},
"vl1d-sol": {
"data": metrics_data["vL1D Speed-of-Light"],
},
"ta-busy-stall": {
"data": metrics_data["Busy / stall metrics"],
},
"ta-instruction-counts": {
"data": metrics_data["Instruction counts"],
},
"ta-spill-stack": {
"data": metrics_data["Spill / stack metrics"],
},
"desc-utcl1": {
"data": metrics_data["L1 Unified Translation Cache (UTCL1)"],
},
"vl1d-cache-stall-metrics": {
"data": metrics_data["vL1D cache stall metrics"],
},
"vl1d-cache-access-metrics": {
"data": metrics_data["vL1D cache access metrics"],
},
"desc-td": {
"data": metrics_data["Vector L1 data-return path or Texture Data (TD)"],
},
"l2-sol": {
"data": metrics_data["L2 Speed-of-Light"],
},
"l2-cache-accesses": {
"data": metrics_data["L2 cache accesses"],
},
"l2-fabric-metrics": {
"data": metrics_data["L2-Fabric interface metrics"],
},
"l2-detailed-metrics": {
"data": metrics_data["L2 - Fabric interface detailed metrics"],
},
"l2-fabric-stalls": {
"data": metrics_data["L2 - Fabric Interface stalls"],
},
"desc-sl1d-sol": {
"data": metrics_data["Scalar L1D Speed-of-Light"],
},
"desc-sl1d-stats": {
"data": metrics_data["Scalar L1D cache accesses"],
},
"desc-sl1d-l2-interface": {
"data": metrics_data["Scalar L1D Cache - L2 Interface"],
},
"desc-l1i-sol": {
"data": metrics_data["L1I Speed-of-Light"],
},
"desc-l1i-stats": {
"data": metrics_data["L1I cache accesses"],
},
"desc-l1i-l2-interface": {
"data": metrics_data["L1I <-> L2 interface"],
},
"spi-util": {
"data": metrics_data["Workgroup manager utilizations"],
},
"spi-resc-util": {
"data": metrics_data["Workgroup Manager - Resource Allocation"],
},
"cpf-metrics": {
"data": metrics_data["Command processor fetcher (CPF)"],
},
"cpc-metrics": {
"data": metrics_data["Command processor packet processor (CPC)"],
},
"sys-sol": {
"data": metrics_data["System Speed-of-Light"],
},
}
external_toc_path = "./sphinx/_toc.yml"
external_projects_current_project = "rocprofiler-compute"
@@ -96,3 +210,6 @@ extlinks = {
"HSA Runtime Programmer's Reference Manual (page %s)",
),
}
# Uncomment if facing rate limit exceed issue with local build
external_projects_remote_repository = ""