From 6b1a46e16cd38b08430171807a443350f684cf24 Mon Sep 17 00:00:00 2001 From: "Karl W. Schulz" Date: Thu, 15 Dec 2022 10:44:31 -0600 Subject: [PATCH 01/10] update version for dev branch Signed-off-by: Karl W. Schulz --- VERSION | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/VERSION b/VERSION index 90a27f9cea..af0b7ddbff 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.0.5 +1.0.6 From 1d90714cab39a0d01740ec929c797f9b9327fc64 Mon Sep 17 00:00:00 2001 From: "Karl W. Schulz" Date: Thu, 15 Dec 2022 11:02:18 -0600 Subject: [PATCH 02/10] Using xml configs from rocprofiler Signed-off-by: Karl W. Schulz --- .../perfmon/gfx908_metrics.xml | 5731 ----------------- .../perfmon/gfx90a_metrics.xml | 56 - src/omniperf_analyze/perfmon/metrics.xml | 13 - 3 files changed, 5800 deletions(-) delete mode 100644 src/omniperf_analyze/perfmon/gfx908_metrics.xml delete mode 100644 src/omniperf_analyze/perfmon/gfx90a_metrics.xml delete mode 100644 src/omniperf_analyze/perfmon/metrics.xml diff --git a/src/omniperf_analyze/perfmon/gfx908_metrics.xml b/src/omniperf_analyze/perfmon/gfx908_metrics.xml deleted file mode 100644 index 8db51ecf9c..0000000000 --- a/src/omniperf_analyze/perfmon/gfx908_metrics.xml +++ /dev/null @@ -1,5731 +0,0 @@ - - # CPC counters - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # CPF counters - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # GDS counters - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # GRBM counters - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # SPI counters - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # SQ counters - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # SX counters - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # TA counters - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # TCA counters - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # TCC counters - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # TCP counters - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # TD counters - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # GRBM_SE counters - - - - - - - - - - - - - - - - - # SDMA counters - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # ATCL2 counters - - - - - - - - - - - - - # MCVML2 counters - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # ATC counters - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/omniperf_analyze/perfmon/gfx90a_metrics.xml b/src/omniperf_analyze/perfmon/gfx90a_metrics.xml deleted file mode 100644 index 79354eeb81..0000000000 --- a/src/omniperf_analyze/perfmon/gfx90a_metrics.xml +++ /dev/null @@ -1,56 +0,0 @@ - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/src/omniperf_analyze/perfmon/metrics.xml b/src/omniperf_analyze/perfmon/metrics.xml deleted file mode 100644 index d4b3355da2..0000000000 --- a/src/omniperf_analyze/perfmon/metrics.xml +++ /dev/null @@ -1,13 +0,0 @@ -#include "gfx90a_metrics.xml" - - - - - - - - - - - - From 7a6331bfd6a5cfbd551e7301d3afc3c0ef391723 Mon Sep 17 00:00:00 2001 From: "Karl W. Schulz" Date: Fri, 16 Dec 2022 17:51:03 -0500 Subject: [PATCH 03/10] Add better error detection when local ROCM installation is incomplete. Closes #56. Signed-off-by: Karl W. Schulz --- src/utils/specs.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/src/utils/specs.py b/src/utils/specs.py index 2ae31481a5..bf2d49a7c8 100644 --- a/src/utils/specs.py +++ b/src/utils/specs.py @@ -24,6 +24,7 @@ import os import re +import sys import socket import subprocess @@ -174,12 +175,26 @@ def get_machine_specs(devicenum): "version-libs", "version-utils", ] + + rocmFound = False for itr in version_loc: _path = os.path.join(os.getenv("ROCM_PATH", "/opt/rocm"), ".info", itr) if os.path.exists(_path): + print(_path) rocm_ver = path(_path).read_text() + rocmFound = True break + if not rocmFound: + _rocm_path = os.getenv("ROCM_PATH", "/opt/rocm") + print("Error: Unable to detect a complete local ROCm installation.") + print( + "\nThe expected %s/.info/ versioning directory is missing. Please" + % _rocm_path + ) + print("ensure you have valid ROCm installation.") + sys.exit(1) + ( gpu_id, L1, From 06b489a1bf38720c329a7140cae3af48170cdc55 Mon Sep 17 00:00:00 2001 From: "Karl W. Schulz" Date: Tue, 20 Dec 2022 09:08:46 -0600 Subject: [PATCH 04/10] Addition of a github action to build and publish omniperf documentation using sphinx and a rtd theme. This action is triggered via documentation-related changes landed on the "main" branch (#22). Signed-off-by: Karl W. Schulz --- .github/workflows/docs.yml | 56 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) create mode 100644 .github/workflows/docs.yml diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml new file mode 100644 index 0000000000..5d7789692c --- /dev/null +++ b/.github/workflows/docs.yml @@ -0,0 +1,56 @@ +name: Documentation + +on: + push: + branches: ["main"] + paths: + - 'src/docs' + - '.github/workflows/docs.yml' + - 'VERSION' + + workflow_dispatch: + +permissions: + contents: read + pages: write + id-token: write + +concurrency: + group: "pages" + cancel-in-progress: true + +jobs: + # Build job + build: + runs-on: ubuntu-latest + container: + image: sphinxdoc/sphinx + + steps: + - name: Checkout + uses: actions/checkout@v3 + - name: Additional python packages + run: pip3 install recommonmark myst_parser sphinx_rtd_theme + - name: Setup Pages + uses: actions/configure-pages@v2 + - name: Build html + run: | + cd src/docs + make html + - name: Upload artifact + uses: actions/upload-pages-artifact@v1 + with: + path: ./src/docs/_build/html + + # Deployment job + deploy: + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + runs-on: ubuntu-latest + needs: build + steps: + - name: Deploy to GitHub Pages + id: deployment + uses: actions/deploy-pages@v1 + From 2359156aa45d04042ef0447d48e2746ab8fb43e8 Mon Sep 17 00:00:00 2001 From: "Karl W. Schulz" Date: Wed, 21 Dec 2022 10:31:31 -0500 Subject: [PATCH 05/10] Allow user to supply rocm version via ROCM_VER env variable if not autodetected due to missing .info directory (#56). Signed-off-by: Karl W. Schulz --- src/utils/specs.py | 25 +++++++++++++++++-------- 1 file changed, 17 insertions(+), 8 deletions(-) diff --git a/src/utils/specs.py b/src/utils/specs.py index bf2d49a7c8..696f850c0e 100644 --- a/src/utils/specs.py +++ b/src/utils/specs.py @@ -186,14 +186,23 @@ def get_machine_specs(devicenum): break if not rocmFound: - _rocm_path = os.getenv("ROCM_PATH", "/opt/rocm") - print("Error: Unable to detect a complete local ROCm installation.") - print( - "\nThe expected %s/.info/ versioning directory is missing. Please" - % _rocm_path - ) - print("ensure you have valid ROCm installation.") - sys.exit(1) + # check if ROCM_VER is supplied externally + ROCM_VER_USER = os.getenv("ROCM_VER") + if ROCM_VER_USER is not None: + print( + "Overriding missing ROCm version detection with ROCM_VER = %s" + % ROCM_VER_USER + ) + rocm_ver = ROCM_VER_USER + else: + _rocm_path = os.getenv("ROCM_PATH", "/opt/rocm") + print("Error: Unable to detect a complete local ROCm installation.") + print( + "\nThe expected %s/.info/ versioning directory is missing. Please" + % _rocm_path + ) + print("ensure you have valid ROCm installation.") + sys.exit(1) ( gpu_id, From e9ceefb23d8f8d4923e1cf5c75ba0b3caec59f6c Mon Sep 17 00:00:00 2001 From: "Karl W. Schulz" Date: Wed, 21 Dec 2022 12:39:05 -0600 Subject: [PATCH 06/10] updating changelong for v1.0.6 Signed-off-by: Karl W. Schulz --- CHANGES | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/CHANGES b/CHANGES index df9015655e..0d3f2025a1 100644 --- a/CHANGES +++ b/CHANGES @@ -1,3 +1,8 @@ +Version 1.0.6 (21 Dec 2022) + + * CI update: documentation now published via github action (#22) + * better error detection for incomplete ROCm installs (#56) + Version 1.0.5 (13 Dec 2022) * store application command-line parameters in profiling output (#27) From b5ac0233079ce16b2926a0c3f8dad10487170036 Mon Sep 17 00:00:00 2001 From: "Karl W. Schulz" Date: Wed, 21 Dec 2022 12:46:18 -0600 Subject: [PATCH 07/10] removing deprecated "update-docs.sh" script in favor of automatic documentation builds (#22) Signed-off-by: Karl W. Schulz --- src/docs/README | 6 ++++++ src/docs/update-docs.sh | 29 ----------------------------- 2 files changed, 6 insertions(+), 29 deletions(-) create mode 100644 src/docs/README delete mode 100755 src/docs/update-docs.sh diff --git a/src/docs/README b/src/docs/README new file mode 100644 index 0000000000..d888e91be2 --- /dev/null +++ b/src/docs/README @@ -0,0 +1,6 @@ +This subdirectory houses the input markup for Omniperf documentation using +Sphinx. Changes committed here on the main branch will automatically be built +and pushed live using a Github action. + +You can build a local copy of the documentation in this directory using +"make html" assuming you have the necessary sphinx dependencies installed. diff --git a/src/docs/update-docs.sh b/src/docs/update-docs.sh deleted file mode 100755 index f607a3c20e..0000000000 --- a/src/docs/update-docs.sh +++ /dev/null @@ -1,29 +0,0 @@ -#!/bin/bash -e - -message() -{ - echo -e "\n\n##### ${@}... #####\n" -} - -WORK_DIR=$(cd $(dirname ${BASH_SOURCE[0]}) && pwd) -SOURCE_DIR=$(cd ${WORK_DIR}/../.. &> /dev/null && pwd) - -message "Working directory is ${WORK_DIR}" -message "Source directory is ${SOURCE_DIR}" - -message "Changing directory to ${WORK_DIR}" -cd ${WORK_DIR} - -message "Building html documentation" -make html - -if [ -d ${SOURCE_DIR}/docs ]; then - message "Removing stale documentation in ${SOURCE_DIR}/docs/" - rm -rf ${SOURCE_DIR}/docs/* - - message "Adding nojekyll to docs/" - cp -r ${WORK_DIR}/.nojekyll ${SOURCE_DIR}/docs/.nojekyll - - message "Copying source/docs/_build/html/* to docs/" - cp -r ${WORK_DIR}/_build/html/* ${SOURCE_DIR}/docs/ -fi \ No newline at end of file From 69d9940c1fa79a938ad0a21566fd140cada58d0c Mon Sep 17 00:00:00 2001 From: "Karl W. Schulz" Date: Wed, 21 Dec 2022 15:01:11 -0600 Subject: [PATCH 08/10] update bibtex on release Signed-off-by: Karl W. Schulz --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index f377550b9f..fd46e13477 100644 --- a/README.md +++ b/README.md @@ -41,17 +41,17 @@ This software can be cited using a Zenodo style reference is provided below for convenience: ``` -@software{xiamin_lu_2022_7434848, +@software{xiamin_lu_2022_7314631 author = {Xiaomin Lu and Cole Ramos and Fei Zheng and Karl W. Schulz and Jose Santos}, - title = {AMDResearch/omniperf: v1.0.5 (13 December 2022)}, + title = {AMDResearch/omniperf: v1.0.6 (21 December 2022)}, month = dec, year = 2022, publisher = {Zenodo}, - version = {v1.0.5}, + version = {v1.0.6}, doi = {10.5281/zenodo.7314631}, url = {https://doi.org/10.5281/zenodo.7314631} } From 1e0a669c6aa62996f8f52f77f2077c87bf696b6d Mon Sep 17 00:00:00 2001 From: "Karl W. Schulz" Date: Wed, 21 Dec 2022 15:12:33 -0600 Subject: [PATCH 09/10] update docs badge Signed-off-by: Karl W. Schulz --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index fd46e13477..0f6b9f6eeb 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -[![Docs](https://github.com/AMDResearch/omniperf/actions/workflows/pages/pages-build-deployment/badge.svg?branch=gh-pages)](https://amdresearch.github.io/omniperf/) +[![Docs](https://github.com/AMDResearch/omniperf/actions/workflows/docs.yml/badge.svg)](https://amdresearch.github.io/omniperf/) [![DOI](https://zenodo.org/badge/561919887.svg)](https://zenodo.org/badge/latestdoi/561919887) [![GitHub commits since last release](https://img.shields.io/github/commits-since/AMDResearch/omniperf/latest/dev.svg)](https://github.com/AMDResearch/omniperf/compare/main...dev) From 9bc41f3a85b4bea7fa7febdec104983da41b9e51 Mon Sep 17 00:00:00 2001 From: "Karl W. Schulz" Date: Wed, 21 Dec 2022 15:15:13 -0600 Subject: [PATCH 10/10] Removing "commits since" badge Signed-off-by: Karl W. Schulz --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 0f6b9f6eeb..8bfa56510b 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ [![Docs](https://github.com/AMDResearch/omniperf/actions/workflows/docs.yml/badge.svg)](https://amdresearch.github.io/omniperf/) [![DOI](https://zenodo.org/badge/561919887.svg)](https://zenodo.org/badge/latestdoi/561919887) -[![GitHub commits since last release](https://img.shields.io/github/commits-since/AMDResearch/omniperf/latest/dev.svg)](https://github.com/AMDResearch/omniperf/compare/main...dev) + # Omniperf