Merge branch 'dev' into lucky
Signed-off-by: coleramos425 <colramos@amd.com>
@@ -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
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
# This is a basic workflow to help you get started with Actions
|
||||
|
||||
name: analyze-workloads
|
||||
|
||||
name: RHEL 8
|
||||
|
||||
# Controls when the workflow will run
|
||||
on:
|
||||
@@ -19,7 +18,7 @@ jobs:
|
||||
# The type of runner that the job will run on
|
||||
runs-on: ubuntu-latest
|
||||
container:
|
||||
image: rocm/dev-ubuntu-22.04:5.3
|
||||
image: colramos/target-images:rhel8
|
||||
# Steps represent a sequence of tasks that will be executed as part of the job
|
||||
steps:
|
||||
# Cancel any previous runs
|
||||
@@ -27,26 +26,30 @@ jobs:
|
||||
uses: styfle/cancel-workflow-action@0.11.0
|
||||
- name: Install baseline OS dependencies
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y git
|
||||
sudo apt-get install -y python3-pip
|
||||
sudo apt-get install -y cmake
|
||||
- name: Checkout
|
||||
yum -y update
|
||||
yum -y install git
|
||||
yum -y install python39
|
||||
yum -y install cmake3
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
submodules: recursive
|
||||
token: ${{ secrets.GH_PAT }}
|
||||
- name: Install Python prereqs
|
||||
run: |
|
||||
python3 -m pip install -r requirements.txt
|
||||
python3 -m pip install pyinstaller pytest pytest-cov
|
||||
- name: Configure and install
|
||||
python3.9 -m pip install -r requirements.txt
|
||||
python3.9 -m pip install pyinstaller pytest pytest-cov mock
|
||||
- name: Configure and install
|
||||
run: |
|
||||
mkdir build
|
||||
cd build
|
||||
cmake -DCMAKE_INSTALL_PREFIX=/opt/omniperf ..
|
||||
make install
|
||||
- name: run ctest
|
||||
- name: CTest- Analyze Commands
|
||||
run: |
|
||||
cd build
|
||||
ctest --verbose -R test_analyze_commands
|
||||
- name: CTest- Analyze Workloads
|
||||
run: |
|
||||
cd build
|
||||
ctest --verbose -R test_analyze_workloads test_saved_analysis
|
||||
@@ -13,8 +13,18 @@ jobs:
|
||||
env:
|
||||
INSTALL_DIR: /tmp/foo1
|
||||
steps:
|
||||
- name: Set git sha mode
|
||||
id: sha-mode
|
||||
run: |
|
||||
if [ "$EVENT" == 'pull_request' ]; then
|
||||
echo "sha=${{github.event.pull_request.head.sha}}" >> $GITHUB_OUTPUT
|
||||
else
|
||||
echo "sha=$GITHUB_SHA" >> $GITHUB_OUTPUT
|
||||
fi
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
ref: ${{ steps.sha-mode.sha }}
|
||||
- name: Cancel Previous Runs
|
||||
uses: styfle/cancel-workflow-action@0.11.0
|
||||
- name: Install Python
|
||||
@@ -73,6 +83,8 @@ jobs:
|
||||
- name: Verify expected paths
|
||||
run: |
|
||||
test -d $INSTALL_DIR/omniperf
|
||||
test -s $INSTALL_DIR/omniperf/VERSION
|
||||
test -s $INSTALL_DIR/omniperf/VERSION.sha
|
||||
test -d $INSTALL_DIR/omniperf/bin
|
||||
test -x $INSTALL_DIR/omniperf/bin/omniperf
|
||||
test -d $INSTALL_DIR/modulefiles/omniperf
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# This is a basic workflow to help you get started with Actions
|
||||
|
||||
name: analyze-commands
|
||||
name: Ubuntu 20.04
|
||||
|
||||
# Controls when the workflow will run
|
||||
on:
|
||||
@@ -45,7 +45,11 @@ jobs:
|
||||
cd build
|
||||
cmake -DCMAKE_INSTALL_PREFIX=/opt/omniperf ..
|
||||
make install
|
||||
- name: Run ctest
|
||||
- name: CTest- Analyze Commands
|
||||
run: |
|
||||
cd build
|
||||
ctest --verbose -R test_analyze_commands
|
||||
- name: CTest- Analyze Workloads
|
||||
run: |
|
||||
cd build
|
||||
ctest --verbose -R test_analyze_workloads test_saved_analysis
|
||||
@@ -14,6 +14,7 @@ __pycache__
|
||||
.coverage
|
||||
saved_analysis
|
||||
pmc_kernel_top.csv
|
||||
VERSION.sha
|
||||
|
||||
# temp files
|
||||
/tests/Testing
|
||||
@@ -0,0 +1,24 @@
|
||||
{
|
||||
"creators": [
|
||||
{
|
||||
"affiliation": "AMD",
|
||||
"name": "Xiaomin Lu"
|
||||
},
|
||||
{
|
||||
"affiliation": "AMD Research",
|
||||
"name": "Cole Ramos"
|
||||
},
|
||||
{
|
||||
"affiliation": "AMD",
|
||||
"name": "Fei Zheng"
|
||||
},
|
||||
{
|
||||
"affiliation": "AMD Research",
|
||||
"name": "Karl W. Schulz"
|
||||
},
|
||||
{
|
||||
"affiliation": "AMD Research",
|
||||
"name": "Jose Santos"
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
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)
|
||||
* enable additional normalizations in CLI mode (#30)
|
||||
* add missing ubuntu 20.04 roofline binary to packaging (#34)
|
||||
* update L1 bandwidth metric calculations (#36)
|
||||
* add L1 <-> L2 bandwidth calculation (#37)
|
||||
* documentation updates (#38, #41)
|
||||
* enhanced subprocess logging to identify critical errors in rocprofiler (#50)
|
||||
* maintain git sha in production installs from tarball (#53)
|
||||
|
||||
Version 1.0.4 (11 Nov 2022)
|
||||
|
||||
* update python requirements.txt with minimum versions for numpy and pandas
|
||||
* addition of progress bar indicator in web-based GUI (#8)
|
||||
* reduced default content for web-based GUI to reduce load times (#9)
|
||||
* minor packaging and CI updates
|
||||
* variety of documentation updates
|
||||
* added an optional argument to vcopy.cpp workload example to specify device id
|
||||
|
||||
Version 1.0.3 (07 Nov 2022)
|
||||
|
||||
* initial Omniperf release
|
||||
@@ -33,6 +33,19 @@ project(
|
||||
include(ExternalProject)
|
||||
include(GNUInstallDirs)
|
||||
|
||||
# version control info
|
||||
find_package(Git)
|
||||
if(Git_FOUND AND EXISTS "${PROJECT_SOURCE_DIR}/.git")
|
||||
execute_process(
|
||||
COMMAND git log --pretty=format:%h -n 1
|
||||
OUTPUT_VARIABLE OMNIPERF_GIT_REV
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
message(STATUS "Git revision: ${OMNIPERF_GIT_REV}")
|
||||
set(GIT_CLONE TRUE)
|
||||
else()
|
||||
set(GIT_CLONE FALSER)
|
||||
endif()
|
||||
|
||||
set(CMAKE_BUILD_TYPE "Release")
|
||||
if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
|
||||
set(CMAKE_INSTALL_PREFIX
|
||||
@@ -140,7 +153,7 @@ if(LOCALHOST MATCHES ".*\.crusher\.olcf\.ornl\.gov")
|
||||
endif()
|
||||
|
||||
# Thera mods
|
||||
if(LOCALHOST MATCHES ".*\.thera\.amd\.com")
|
||||
if(LOCALHOST MATCHES "TheraS01|.*\.thera\.amd\.com|thera-hn")
|
||||
list(APPEND CMAKE_MESSAGE_INDENT " ")
|
||||
message(STATUS "Using thera-specific modulefile modification")
|
||||
file(READ ${PROJECT_SOURCE_DIR}/cmake/modfile.thera.mod mod_additions)
|
||||
@@ -151,6 +164,12 @@ if(LOCALHOST MATCHES ".*\.thera\.amd\.com")
|
||||
list(POP_BACK CMAKE_MESSAGE_INDENT)
|
||||
endif()
|
||||
|
||||
# git versioning file
|
||||
if(${GIT_CLONE})
|
||||
configure_file(${PROJECT_SOURCE_DIR}/cmake/VERSION.sha.in
|
||||
${PROJECT_SOURCE_DIR}/VERSION.sha @ONLY)
|
||||
endif()
|
||||
|
||||
enable_testing()
|
||||
|
||||
add_test(
|
||||
@@ -196,12 +215,12 @@ add_test(
|
||||
install(PROGRAMS src/omniperf TYPE BIN)
|
||||
install(FILES src/parser.py TYPE BIN)
|
||||
install(FILES src/common.py TYPE BIN)
|
||||
install(FILES VERSION DESTINATION ${CMAKE_INSTALL_PREFIX})
|
||||
# src/omniperf_cli
|
||||
install(FILES VERSION VERSION.sha DESTINATION ${CMAKE_INSTALL_PREFIX})
|
||||
# src/omniperf_analyze
|
||||
install(
|
||||
DIRECTORY src/omniperf_cli
|
||||
DIRECTORY src/omniperf_analyze
|
||||
TYPE BIN
|
||||
PATTERN src/omniperf_cli/tests EXCLUDE
|
||||
PATTERN src/omniperf_analyze/tests EXCLUDE
|
||||
PATTERN "__pycache__" EXCLUDE)
|
||||
# src/utils
|
||||
install(
|
||||
@@ -209,9 +228,11 @@ install(
|
||||
TYPE BIN
|
||||
PATTERN "rooflines*" EXCLUDE)
|
||||
# src/utils/rooflines
|
||||
install(PROGRAMS src/utils/rooflines/roofline-rhel8-mi200-rocm5
|
||||
src/utils/rooflines/roofline-sle15sp3-mi200-rocm5
|
||||
DESTINATION ${CMAKE_INSTALL_BINDIR}/utils/rooflines)
|
||||
install(
|
||||
PROGRAMS src/utils/rooflines/roofline-rhel8-mi200-rocm5
|
||||
src/utils/rooflines/roofline-sle15sp3-mi200-rocm5
|
||||
src/utils/rooflines/roofline-ubuntu20_04-mi200-rocm5
|
||||
DESTINATION ${CMAKE_INSTALL_BINDIR}/utils/rooflines)
|
||||
# src/perfmon_pub
|
||||
install(
|
||||
DIRECTORY src/perfmon_pub
|
||||
@@ -272,6 +293,13 @@ install(
|
||||
|
||||
# Source tarball
|
||||
set(CPACK_SOURCE_GENERATOR "TGZ")
|
||||
set(CPACK_SOURCE_PACKAGE_FILE_NAME ${CMAKE_PROJECT_NAME}-${PROJECT_VERSION})
|
||||
set(CPACK_SOURCE_IGNORE_FILES ".*~$" \.git/ \.github /tests /build)
|
||||
set(CPACK_SOURCE_PACKAGE_FILE_NAME ${CMAKE_PROJECT_NAME}-${FULL_VERSION_STRING})
|
||||
set(CPACK_SOURCE_IGNORE_FILES
|
||||
".*~$"
|
||||
\.git/
|
||||
\.github
|
||||
\.gitmodules
|
||||
\.gitignore
|
||||
/tests
|
||||
/build)
|
||||
include(CPack)
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
[](https://amdresearch.github.io/omniperf/)
|
||||
[](https://github.com/AMDResearch/omniperf/actions/workflows/ubuntu-focal.yml)
|
||||
[](https://github.com/AMDResearch/omniperf/actions/workflows/opensuse.yml)
|
||||
[](https://amdresearch.github.io/omniperf/)
|
||||
[](https://zenodo.org/badge/latestdoi/561919887)
|
||||
|
||||
<!-- [](https://github.com/AMDResearch/omniperf/compare/main...dev) -->
|
||||
|
||||
# Omniperf
|
||||
|
||||
@@ -34,3 +36,26 @@ from `dev` with `*` being the version number of the upcoming
|
||||
release. This branch will only receive bug fixes and users may
|
||||
checkout to preview upcoming features.
|
||||
|
||||
## How to Cite
|
||||
|
||||
This software can be cited using a Zenodo
|
||||
[DOI](https://doi.org/10.5281/zenodo.7314631) reference. A BibTex
|
||||
style reference is provided below for convenience:
|
||||
|
||||
```
|
||||
@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.6 (21 December 2022)},
|
||||
month = dec,
|
||||
year = 2022,
|
||||
publisher = {Zenodo},
|
||||
version = {v1.0.6},
|
||||
doi = {10.5281/zenodo.7314631},
|
||||
url = {https://doi.org/10.5281/zenodo.7314631}
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
@@ -1 +1 @@
|
||||
1.0.3
|
||||
1.0.6
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
@OMNIPERF_GIT_REV@
|
||||
@@ -1,4 +1,4 @@
|
||||
-- Crusher-specific additions
|
||||
depends_on "cray-python"
|
||||
depends_on "rocm"
|
||||
prereq(atleast("rocm","5.1.0"))
|
||||
prereq(atleast("rocm","5.2.0"))
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
-- Thera-specific additions
|
||||
depends_on "python"
|
||||
depends_on "rocm"
|
||||
prereq(atleast("rocm","5.1.0"))
|
||||
prereq(atleast("rocm","5.2.0"))
|
||||
local home = os.getenv("HOME")
|
||||
setenv("MPLCONFIGDIR",pathJoin(home,".matplotlib"))
|
||||
|
||||
@@ -24,8 +24,8 @@ services:
|
||||
image: mongo
|
||||
restart: always
|
||||
environment:
|
||||
MONGO_INITDB_ROOT_USERNAME: amd
|
||||
MONGO_INITDB_ROOT_PASSWORD: amd123
|
||||
MONGO_INITDB_ROOT_USERNAME: temp
|
||||
MONGO_INITDB_ROOT_PASSWORD: temp123
|
||||
volumes:
|
||||
- grafana-mongo-db:/data/db
|
||||
ports:
|
||||
|
||||
@@ -13,19 +13,19 @@
|
||||
"author": "Audacious Software Group",
|
||||
"license": "MIT",
|
||||
"devDependencies": {
|
||||
"@grafana/data": "latest",
|
||||
"@grafana/toolkit": "latest",
|
||||
"@grafana/ui": "latest",
|
||||
"emotion": "10.0.27"
|
||||
"emotion": "10.0.27",
|
||||
"react-monaco-editor": "^0.44.0",
|
||||
"tslib": "^2.3.1"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=14"
|
||||
},
|
||||
"dependencies": {
|
||||
"@grafana/runtime": "^8.1.1",
|
||||
"@svgdotjs/svg.js": "^3.1.1",
|
||||
"react-monaco-editor": "^0.44.0",
|
||||
"tslib": "^2.3.1"
|
||||
"@grafana/runtime": "9.1.2",
|
||||
"@grafana/data": "9.1.2",
|
||||
"@grafana/ui": "9.1.2",
|
||||
"@svgdotjs/svg.js": "^3.1.1"
|
||||
},
|
||||
"_comments": "Dependencies are not included as part of Omniperf. It's the user's responsibility to accept any licensing implications before building the project."
|
||||
}
|
||||
|
||||
@@ -31,5 +31,5 @@ pythonpath = [
|
||||
".",
|
||||
"src",
|
||||
"src/utils",
|
||||
"src/omniperf_cli/utils"
|
||||
"src/omniperf_analyze/utils"
|
||||
]
|
||||
|
||||
@@ -2,8 +2,8 @@ astunparse==1.6.2
|
||||
colorlover
|
||||
dash
|
||||
matplotlib
|
||||
numpy
|
||||
pandas
|
||||
numpy>=1.17.5
|
||||
pandas>=1.4.3
|
||||
pymongo
|
||||
pyyaml
|
||||
tabulate
|
||||
|
||||
@@ -2,6 +2,8 @@
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <math.h>
|
||||
#include <iostream>
|
||||
using namespace std;
|
||||
|
||||
|
||||
#define HIP_ASSERT(x) (assert((x)==hipSuccess))
|
||||
@@ -19,7 +21,7 @@ __global__ void vecCopy(double *a, double *b, double *c, int n,int stride)
|
||||
|
||||
void usage()
|
||||
{
|
||||
printf("\nUsage: vcopy [n] [blocksize]\n\n");
|
||||
printf("\nUsage: vcopy [n] [blocksize] {dev}\n\n");
|
||||
exit(1);
|
||||
return;
|
||||
}
|
||||
@@ -45,13 +47,24 @@ int main( int argc, char* argv[] )
|
||||
double *d_c;
|
||||
|
||||
int stride = 1;
|
||||
int devId = 0;
|
||||
|
||||
if(argc < 3)
|
||||
usage();
|
||||
if(argc > 3)
|
||||
devId = atoi(argv[3]);
|
||||
|
||||
n = atoi(argv[1]);
|
||||
blockSize = atoi(argv[2]);
|
||||
|
||||
int numGpuDevices;
|
||||
HIP_ASSERT(hipGetDeviceCount(&numGpuDevices));
|
||||
if(devId >= numGpuDevices)
|
||||
devId = 0;
|
||||
HIP_ASSERT(hipSetDevice(devId));
|
||||
|
||||
printf("vcopy testing on GCD %d\n", devId);
|
||||
|
||||
assert(n > 0);
|
||||
assert(blockSize > 0);
|
||||
|
||||
|
||||
@@ -22,8 +22,10 @@
|
||||
|
||||
import os
|
||||
import sys
|
||||
import io
|
||||
from pathlib import Path
|
||||
import subprocess
|
||||
import shutil
|
||||
|
||||
OMNIPERF_HOME = Path(__file__).resolve().parent
|
||||
|
||||
@@ -31,10 +33,51 @@ OMNIPERF_HOME = Path(__file__).resolve().parent
|
||||
PROG = "omniperf"
|
||||
SOC_LIST = ["mi50", "mi100", "mi200", "vega10"]
|
||||
DISTRO_MAP = {"platform:el8": "rhel8", "15.3": "sle15sp3", "20.04": "ubuntu20_04"}
|
||||
version = os.path.join(OMNIPERF_HOME.parent, "VERSION")
|
||||
try:
|
||||
with open(version, "r") as file:
|
||||
VER = file.read().replace("\n", "")
|
||||
except EnvironmentError:
|
||||
print("ERROR: Cannot find VERSION file at {}".format(version))
|
||||
sys.exit(1)
|
||||
|
||||
|
||||
def getVersion():
|
||||
# symantic version info
|
||||
version = os.path.join(OMNIPERF_HOME.parent, "VERSION")
|
||||
try:
|
||||
with open(version, "r") as file:
|
||||
VER = file.read().replace("\n", "")
|
||||
except EnvironmentError:
|
||||
print("ERROR: Cannot find VERSION file at {}".format(version))
|
||||
sys.exit(1)
|
||||
|
||||
# git version info
|
||||
gitDir = os.path.join(OMNIPERF_HOME.parent, ".git")
|
||||
if (shutil.which("git") is not None) and os.path.exists(gitDir):
|
||||
gitQuery = subprocess.run(
|
||||
["git", "log", "--pretty=format:%h", "-n", "1"],
|
||||
stdout=subprocess.PIPE,
|
||||
stderr=subprocess.DEVNULL,
|
||||
)
|
||||
if gitQuery.returncode != 0:
|
||||
SHA = "unknown"
|
||||
MODE = "unknown"
|
||||
else:
|
||||
SHA = gitQuery.stdout.decode("utf-8")
|
||||
MODE = "dev"
|
||||
else:
|
||||
shaFile = os.path.join(OMNIPERF_HOME.parent, "VERSION.sha")
|
||||
try:
|
||||
with open(shaFile, "r") as file:
|
||||
SHA = file.read().replace("\n", "")
|
||||
except EnvironmentError:
|
||||
print("ERROR: Cannot find VERSION.sha file at {}".format(shaFile))
|
||||
sys.exit(1)
|
||||
|
||||
MODE = "release"
|
||||
|
||||
versionData = {"version": VER, "sha": SHA, "mode": MODE}
|
||||
return versionData
|
||||
|
||||
|
||||
def getVersionDisplay(version, sha, mode):
|
||||
buf = io.StringIO()
|
||||
print("-" * 40, file=buf)
|
||||
print("Omniperf version: %s (%s)" % (version, mode), file=buf)
|
||||
print("Git revision: %s" % sha, file=buf)
|
||||
print("-" * 40, file=buf)
|
||||
return buf.getvalue()
|
||||
|
||||
@@ -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.
|
||||
@@ -0,0 +1,725 @@
|
||||
# Analysis
|
||||
|
||||
```eval_rst
|
||||
.. toctree::
|
||||
:glob:
|
||||
:maxdepth: 4
|
||||
```
|
||||
Omniperf offers several ways to interact with the metrics it generates from profiling. The option you choose will likey be influnced by your familiarity with the profiled application, computing enviroment, and experience with Omniperf.
|
||||
|
||||
While analyzing with the CLI offers quick and straightforward access to Omniperf metrics from terminal, the GUI adds an extra layer of styling and interactiveness some users may prefer.
|
||||
|
||||
See sections below for more information on each.
|
||||
|
||||
## CLI Analysis
|
||||
> Profiling results from the [aforementioned vcopy workload](https://amdresearch.github.io/omniperf/profiling.html#workload-compilation) will be used in the following sections to demonstrate the use of Omniperf in MI GPU performance analysis. Unless otherwise noted, the performance analysis is done on the MI200 platform.
|
||||
|
||||
### Features
|
||||
|
||||
- All Omniperf built-in metrics.
|
||||
- Multiple runs base line comparison.
|
||||
- Metrics customization: pick up subset of build-in metrics or build your own profiling configuration.
|
||||
- Kernel, gpu-id, dispatch-id filters.
|
||||
|
||||
Run `omniperf analyze -h` for more details.
|
||||
|
||||
### Recommended workflow
|
||||
|
||||
1) Do a comprehensive analysis with Omniperf CLI at the beginning.
|
||||
```shell
|
||||
$ omniperf analyze -p workloads/vcopy/mi200/
|
||||
|
||||
--------
|
||||
Analyze
|
||||
--------
|
||||
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
0. Top Stat
|
||||
╒════╤══════════════════════════════════════════╤═════════╤═══════════╤════════════╤══════════════╤════════╕
|
||||
│ │ KernelName │ Count │ Sum(ns) │ Mean(ns) │ Median(ns) │ Pct │
|
||||
╞════╪══════════════════════════════════════════╪═════════╪═══════════╪════════════╪══════════════╪════════╡
|
||||
│ 0 │ vecCopy(double*, double*, double*, int, │ 1 │ 20000.00 │ 20000.00 │ 20000.00 │ 100.00 │
|
||||
│ │ int) [clone .kd] │ │ │ │ │ │
|
||||
╘════╧══════════════════════════════════════════╧═════════╧═══════════╧════════════╧══════════════╧════════╛
|
||||
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
1. System Info
|
||||
╒══════════════════╤═══════════════════════════════════════════════╕
|
||||
│ │ Info │
|
||||
╞══════════════════╪═══════════════════════════════════════════════╡
|
||||
│ workload_name │ vcopy │
|
||||
├──────────────────┼───────────────────────────────────────────────┤
|
||||
│ command │ /home/colramos/vcopy 1048576 256 │
|
||||
├──────────────────┼───────────────────────────────────────────────┤
|
||||
│ host_name │ sv-pdp-2 │
|
||||
├──────────────────┼───────────────────────────────────────────────┤
|
||||
│ host_cpu │ AMD EPYC 7282 16-Core Processor │
|
||||
├──────────────────┼───────────────────────────────────────────────┤
|
||||
│ host_distro │ Ubuntu 20.04.3 LTS │
|
||||
├──────────────────┼───────────────────────────────────────────────┤
|
||||
│ host_kernel │ 5.15.0-43-generic │
|
||||
├──────────────────┼───────────────────────────────────────────────┤
|
||||
│ host_rocmver │ 5.2.1-79 │
|
||||
├──────────────────┼───────────────────────────────────────────────┤
|
||||
│ date │ Fri Jan 20 11:22:20 2023 (CST) │
|
||||
├──────────────────┼───────────────────────────────────────────────┤
|
||||
│ gpu_soc │ gfx90a │
|
||||
├──────────────────┼───────────────────────────────────────────────┤
|
||||
│ numSE │ 8 │
|
||||
├──────────────────┼───────────────────────────────────────────────┤
|
||||
│ numCU │ 104 │
|
||||
├──────────────────┼───────────────────────────────────────────────┤
|
||||
│ numSIMD │ 4 │
|
||||
├──────────────────┼───────────────────────────────────────────────┤
|
||||
│ waveSize │ 64 │
|
||||
├──────────────────┼───────────────────────────────────────────────┤
|
||||
│ maxWavesPerCU │ 32 │
|
||||
├──────────────────┼───────────────────────────────────────────────┤
|
||||
│ maxWorkgroupSize │ 1024 │
|
||||
├──────────────────┼───────────────────────────────────────────────┤
|
||||
│ L1 │ 16 │
|
||||
├──────────────────┼───────────────────────────────────────────────┤
|
||||
│ L2 │ 8192 │
|
||||
├──────────────────┼───────────────────────────────────────────────┤
|
||||
│ sclk │ 1700 │
|
||||
├──────────────────┼───────────────────────────────────────────────┤
|
||||
│ mclk │ 1600 │
|
||||
├──────────────────┼───────────────────────────────────────────────┤
|
||||
│ cur_sclk │ 800 │
|
||||
├──────────────────┼───────────────────────────────────────────────┤
|
||||
│ cur_mclk │ 1600 │
|
||||
├──────────────────┼───────────────────────────────────────────────┤
|
||||
│ L2Banks │ 32 │
|
||||
├──────────────────┼───────────────────────────────────────────────┤
|
||||
│ name │ mi200 │
|
||||
├──────────────────┼───────────────────────────────────────────────┤
|
||||
│ numSQC │ 56 │
|
||||
├──────────────────┼───────────────────────────────────────────────┤
|
||||
│ hbmBW │ 1638.4 │
|
||||
├──────────────────┼───────────────────────────────────────────────┤
|
||||
│ ip_blocks │ roofline|SQ|LDS|SQC|TA|TD|TCP|TCC|SPI|CPC|CPF │
|
||||
╘══════════════════╧═══════════════════════════════════════════════╛
|
||||
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
2. System Speed-of-Light
|
||||
....
|
||||
```
|
||||
2. Use `--list-metrics` to generate a list of availible metrics for inspection
|
||||
```shell
|
||||
$ omniperf analyze -p workloads/vcopy/mi200/ --list-metrics gfx90a
|
||||
╒═════════╤═════════════════════════════╕
|
||||
│ │ Metric │
|
||||
╞═════════╪═════════════════════════════╡
|
||||
│ 0 │ Top Stat │
|
||||
├─────────┼─────────────────────────────┤
|
||||
│ 1 │ System Info │
|
||||
├─────────┼─────────────────────────────┤
|
||||
│ 2.1.0 │ VALU_FLOPs │
|
||||
├─────────┼─────────────────────────────┤
|
||||
│ 2.1.1 │ VALU_IOPs │
|
||||
├─────────┼─────────────────────────────┤
|
||||
│ 2.1.2 │ MFMA_FLOPs_(BF16) │
|
||||
├─────────┼─────────────────────────────┤
|
||||
│ 2.1.3 │ MFMA_FLOPs_(F16) │
|
||||
├─────────┼─────────────────────────────┤
|
||||
│ 2.1.4 │ MFMA_FLOPs_(F32) │
|
||||
├─────────┼─────────────────────────────┤
|
||||
│ 2.1.5 │ MFMA_FLOPs_(F64) │
|
||||
├─────────┼─────────────────────────────┤
|
||||
│ 2.1.6 │ MFMA_IOPs_(Int8) │
|
||||
├─────────┼─────────────────────────────┤
|
||||
│ 2.1.7 │ Active_CUs │
|
||||
├─────────┼─────────────────────────────┤
|
||||
│ 2.1.8 │ SALU_Util │
|
||||
├─────────┼─────────────────────────────┤
|
||||
│ 2.1.9 │ VALU_Util │
|
||||
├─────────┼─────────────────────────────┤
|
||||
│ 2.1.10 │ MFMA_Util │
|
||||
├─────────┼─────────────────────────────┤
|
||||
│ 2.1.11 │ VALU_Active_Threads/Wave │
|
||||
├─────────┼─────────────────────────────┤
|
||||
│ 2.1.12 │ IPC_-_Issue │
|
||||
├─────────┼─────────────────────────────┤
|
||||
│ 2.1.13 │ LDS_BW │
|
||||
├─────────┼─────────────────────────────┤
|
||||
│ 2.1.14 │ LDS_Bank_Conflict │
|
||||
├─────────┼─────────────────────────────┤
|
||||
│ 2.1.15 │ Instr_Cache_Hit_Rate │
|
||||
├─────────┼─────────────────────────────┤
|
||||
│ 2.1.16 │ Instr_Cache_BW │
|
||||
├─────────┼─────────────────────────────┤
|
||||
│ 2.1.17 │ Scalar_L1D_Cache_Hit_Rate │
|
||||
├─────────┼─────────────────────────────┤
|
||||
│ 2.1.18 │ Scalar_L1D_Cache_BW │
|
||||
├─────────┼─────────────────────────────┤
|
||||
│ 2.1.19 │ Vector_L1D_Cache_Hit_Rate │
|
||||
├─────────┼─────────────────────────────┤
|
||||
│ 2.1.20 │ Vector_L1D_Cache_BW │
|
||||
├─────────┼─────────────────────────────┤
|
||||
│ 2.1.21 │ L2_Cache_Hit_Rate │
|
||||
├─────────┼─────────────────────────────┤
|
||||
│ 2.1.22 │ L2-Fabric_Read_BW │
|
||||
├─────────┼─────────────────────────────┤
|
||||
│ 2.1.23 │ L2-Fabric_Write_BW │
|
||||
├─────────┼─────────────────────────────┤
|
||||
│ 2.1.24 │ L2-Fabric_Read_Latency │
|
||||
├─────────┼─────────────────────────────┤
|
||||
│ 2.1.25 │ L2-Fabric_Write_Latency │
|
||||
├─────────┼─────────────────────────────┤
|
||||
...
|
||||
```
|
||||
2. Choose your own customized subset of metrics with `-b` (a.k.a. `--filter-metrics`), or build your own config following [config_template](https://github.com/AMDResearch/omniperf/blob/main/src/omniperf_analyze/configs/panel_config_template.yaml). Below we'll inspect block 2 (a.k.a. System Speed-of-Light).
|
||||
```shell
|
||||
$ omniperf analyze -p workloads/vcopy/mi200/ -b 2
|
||||
--------
|
||||
Analyze
|
||||
--------
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
0. Top Stat
|
||||
╒════╤══════════════════════════════════════════╤═════════╤═══════════╤════════════╤══════════════╤════════╕
|
||||
│ │ KernelName │ Count │ Sum(ns) │ Mean(ns) │ Median(ns) │ Pct │
|
||||
╞════╪══════════════════════════════════════════╪═════════╪═══════════╪════════════╪══════════════╪════════╡
|
||||
│ 0 │ vecCopy(double*, double*, double*, int, │ 1 │ 20000.00 │ 20000.00 │ 20000.00 │ 100.00 │
|
||||
│ │ int) [clone .kd] │ │ │ │ │ │
|
||||
╘════╧══════════════════════════════════════════╧═════════╧═══════════╧════════════╧══════════════╧════════╛
|
||||
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
2. System Speed-of-Light
|
||||
╒═════════╤═══════════════════════════╤═══════════════════════╤══════════════════╤════════════════════╤════════════════════════╕
|
||||
│ Index │ Metric │ Value │ Unit │ Peak │ PoP │
|
||||
╞═════════╪═══════════════════════════╪═══════════════════════╪══════════════════╪════════════════════╪════════════════════════╡
|
||||
│ 2.1.0 │ VALU FLOPs │ 0.0 │ Gflop │ 22630.4 │ 0.0 │
|
||||
├─────────┼───────────────────────────┼───────────────────────┼──────────────────┼────────────────────┼────────────────────────┤
|
||||
│ 2.1.1 │ VALU IOPs │ 367.0016 │ Giop │ 22630.4 │ 1.6217194570135745 │
|
||||
├─────────┼───────────────────────────┼───────────────────────┼──────────────────┼────────────────────┼────────────────────────┤
|
||||
│ 2.1.2 │ MFMA FLOPs (BF16) │ 0.0 │ Gflop │ 90521.6 │ 0.0 │
|
||||
├─────────┼───────────────────────────┼───────────────────────┼──────────────────┼────────────────────┼────────────────────────┤
|
||||
│ 2.1.3 │ MFMA FLOPs (F16) │ 0.0 │ Gflop │ 181043.2 │ 0.0 │
|
||||
├─────────┼───────────────────────────┼───────────────────────┼──────────────────┼────────────────────┼────────────────────────┤
|
||||
│ 2.1.4 │ MFMA FLOPs (F32) │ 0.0 │ Gflop │ 45260.8 │ 0.0 │
|
||||
├─────────┼───────────────────────────┼───────────────────────┼──────────────────┼────────────────────┼────────────────────────┤
|
||||
│ 2.1.5 │ MFMA FLOPs (F64) │ 0.0 │ Gflop │ 45260.8 │ 0.0 │
|
||||
├─────────┼───────────────────────────┼───────────────────────┼──────────────────┼────────────────────┼────────────────────────┤
|
||||
│ 2.1.6 │ MFMA IOPs (Int8) │ 0.0 │ Giop │ 181043.2 │ 0.0 │
|
||||
├─────────┼───────────────────────────┼───────────────────────┼──────────────────┼────────────────────┼────────────────────────┤
|
||||
│ 2.1.7 │ Active CUs │ 74 │ Cus │ 104 │ 71.15384615384616 │
|
||||
├─────────┼───────────────────────────┼───────────────────────┼──────────────────┼────────────────────┼────────────────────────┤
|
||||
│ 2.1.8 │ SALU Util │ 4.016057506716307 │ Pct │ 100 │ 4.016057506716307 │
|
||||
├─────────┼───────────────────────────┼───────────────────────┼──────────────────┼────────────────────┼────────────────────────┤
|
||||
│ 2.1.9 │ VALU Util │ 5.737225009594725 │ Pct │ 100 │ 5.737225009594725 │
|
||||
├─────────┼───────────────────────────┼───────────────────────┼──────────────────┼────────────────────┼────────────────────────┤
|
||||
│ 2.1.10 │ MFMA Util │ 0.0 │ Pct │ 100 │ 0.0 │
|
||||
├─────────┼───────────────────────────┼───────────────────────┼──────────────────┼────────────────────┼────────────────────────┤
|
||||
│ 2.1.11 │ VALU Active Threads/Wave │ 64.0 │ Threads │ 64 │ 100.0 │
|
||||
├─────────┼───────────────────────────┼───────────────────────┼──────────────────┼────────────────────┼────────────────────────┤
|
||||
│ 2.1.12 │ IPC - Issue │ 1.0 │ Instr/cycle │ 5 │ 20.0 │
|
||||
├─────────┼───────────────────────────┼───────────────────────┼──────────────────┼────────────────────┼────────────────────────┤
|
||||
│ 2.1.13 │ LDS BW │ 0.0 │ Gb/sec │ 22630.4 │ 0.0 │
|
||||
├─────────┼───────────────────────────┼───────────────────────┼──────────────────┼────────────────────┼────────────────────────┤
|
||||
│ 2.1.14 │ LDS Bank Conflict │ │ Conflicts/access │ 32 │ │
|
||||
├─────────┼───────────────────────────┼───────────────────────┼──────────────────┼────────────────────┼────────────────────────┤
|
||||
│ 2.1.15 │ Instr Cache Hit Rate │ 99.91306912556854 │ Pct │ 100 │ 99.91306912556854 │
|
||||
├─────────┼───────────────────────────┼───────────────────────┼──────────────────┼────────────────────┼────────────────────────┤
|
||||
│ 2.1.16 │ Instr Cache BW │ 209.7152 │ Gb/s │ 6092.8 │ 3.442016806722689 │
|
||||
├─────────┼───────────────────────────┼───────────────────────┼──────────────────┼────────────────────┼────────────────────────┤
|
||||
│ 2.1.17 │ Scalar L1D Cache Hit Rate │ 99.81986908342313 │ Pct │ 100 │ 99.81986908342313 │
|
||||
├─────────┼───────────────────────────┼───────────────────────┼──────────────────┼────────────────────┼────────────────────────┤
|
||||
│ 2.1.18 │ Scalar L1D Cache BW │ 209.7152 │ Gb/s │ 6092.8 │ 3.442016806722689 │
|
||||
├─────────┼───────────────────────────┼───────────────────────┼──────────────────┼────────────────────┼────────────────────────┤
|
||||
│ 2.1.19 │ Vector L1D Cache Hit Rate │ 50.0 │ Pct │ 100 │ 50.0 │
|
||||
├─────────┼───────────────────────────┼───────────────────────┼──────────────────┼────────────────────┼────────────────────────┤
|
||||
│ 2.1.20 │ Vector L1D Cache BW │ 1677.7216 │ Gb/s │ 11315.199999999999 │ 14.82714932126697 │
|
||||
├─────────┼───────────────────────────┼───────────────────────┼──────────────────┼────────────────────┼────────────────────────┤
|
||||
│ 2.1.21 │ L2 Cache Hit Rate │ 35.55067615693325 │ Pct │ 100 │ 35.55067615693325 │
|
||||
├─────────┼───────────────────────────┼───────────────────────┼──────────────────┼────────────────────┼────────────────────────┤
|
||||
│ 2.1.22 │ L2-Fabric Read BW │ 419.8496 │ Gb/s │ 1638.4 │ 25.6255859375 │
|
||||
├─────────┼───────────────────────────┼───────────────────────┼──────────────────┼────────────────────┼────────────────────────┤
|
||||
│ 2.1.23 │ L2-Fabric Write BW │ 293.9456 │ Gb/s │ 1638.4 │ 17.941015625 │
|
||||
├─────────┼───────────────────────────┼───────────────────────┼──────────────────┼────────────────────┼────────────────────────┤
|
||||
│ 2.1.24 │ L2-Fabric Read Latency │ 256.6482321288385 │ Cycles │ │ │
|
||||
├─────────┼───────────────────────────┼───────────────────────┼──────────────────┼────────────────────┼────────────────────────┤
|
||||
│ 2.1.25 │ L2-Fabric Write Latency │ 317.2264255699014 │ Cycles │ │ │
|
||||
├─────────┼───────────────────────────┼───────────────────────┼──────────────────┼────────────────────┼────────────────────────┤
|
||||
│ 2.1.26 │ Wave Occupancy │ 1821.723057333852 │ Wavefronts │ 3328 │ 54.73927455931046 │
|
||||
├─────────┼───────────────────────────┼───────────────────────┼──────────────────┼────────────────────┼────────────────────────┤
|
||||
│ 2.1.27 │ Instr Fetch BW │ 4.174722306564298e-08 │ Gb/s │ 3046.4 │ 1.3703789084047721e-09 │
|
||||
├─────────┼───────────────────────────┼───────────────────────┼──────────────────┼────────────────────┼────────────────────────┤
|
||||
│ 2.1.28 │ Instr Fetch Latency │ 21.729248046875 │ Cycles │ │ │
|
||||
╘═════════╧═══════════════════════════╧═══════════════════════╧══════════════════╧════════════════════╧════════════════════════╛
|
||||
```
|
||||
> **Note:** Some cells may be blank indicating a missing/unavailible hardware counter or NULL value
|
||||
|
||||
3. Quick optimization iterations and profiling with customized metrics.
|
||||
4. Redo a comprehensive analysis with Omniperf CLI at any milestone or at the end.
|
||||
|
||||
### Demo
|
||||
|
||||
- Single run
|
||||
```shell
|
||||
$ omniperf analyze -p path/to/profiling/results/
|
||||
```
|
||||
|
||||
- List top kernels
|
||||
```shell
|
||||
$ omniperf analyze -p path/to/profiling/results/ --list-kernels
|
||||
```
|
||||
|
||||
- List metrics
|
||||
|
||||
```shell
|
||||
omniperf analyze -p path/to/profiling/results/ --list-metrics gfx90a
|
||||
```
|
||||
|
||||
- Customized profiling "System Speed-of-Light" and "CS_Busy" only
|
||||
|
||||
```shell
|
||||
omniperf analyze -p path/to/profiling/results/ -b 2 5.1.0
|
||||
```
|
||||
|
||||
Note: People can filter single metric or the whole IP block by its id.
|
||||
In this case, 1 is the id for "system speed of light" and 5.1.0 the id for metric "GPU Busy Cycles".
|
||||
|
||||
- Multiple runs
|
||||
|
||||
```shell
|
||||
omniperf analyze -p workload1/path/ -p workload2/path/
|
||||
```
|
||||
|
||||
- Filter kernels
|
||||
|
||||
```shell
|
||||
omniperf analyze -p workload1/path/ -k 0 -p workload2/path/ -k 0
|
||||
```
|
||||
|
||||
|
||||
## GUI Analysis
|
||||
|
||||
### Web-based GUI
|
||||
|
||||
#### Features
|
||||
|
||||
Omniperf's standalone GUI analyzer is a lightweight web page that can
|
||||
be generated directly from the command-line. This option is provided
|
||||
as an alternative for users wanting to explore profiling results
|
||||
graphically, but without the additional setup requirements or
|
||||
server-side overhead of Omniperf's detailed [Grafana
|
||||
interface](https://amdresearch.github.io/omniperf/analysis.html#grafana-based-gui)
|
||||
option. The standalone GUI analyzer is provided as simple
|
||||
[Flask](https://flask.palletsprojects.com/en/2.2.x/) application
|
||||
allowing users to view results from within a web browser.
|
||||
|
||||
```{admonition} Port forwarding
|
||||
|
||||
Note that the standalone GUI analyzer publishes a web interface on port 8050 by default.
|
||||
On production HPC systems where profiling jobs run
|
||||
under the auspices of a resource manager, additional ssh tunneling
|
||||
between the desired web browser host (e.g. login node or remote workstation) and compute host may be
|
||||
required. Alternatively, users may find it more convenient to download
|
||||
profiled workloads to perform analysis on their local system.
|
||||
```
|
||||
|
||||
#### Usage
|
||||
|
||||
To launch the standalone GUI, include the `--gui` flag with your desired analysis command. For example:
|
||||
|
||||
```bash
|
||||
$ omniperf analyze -p workloads/vcopy/mi200/ --gui
|
||||
|
||||
--------
|
||||
Analyze
|
||||
--------
|
||||
|
||||
Dash is running on http://0.0.0.0:8050/
|
||||
|
||||
* Serving Flask app 'omniperf_analyze.omniperf_analyze' (lazy loading)
|
||||
* Environment: production
|
||||
WARNING: This is a development server. Do not use it in a production deployment.
|
||||
Use a production WSGI server instead.
|
||||
* Debug mode: off
|
||||
* Running on all addresses (0.0.0.0)
|
||||
WARNING: This is a development server. Do not use it in a production deployment.
|
||||
* Running on http://127.0.0.1:8050
|
||||
* Running on http://10.228.32.139:8050 (Press CTRL+C to quit)
|
||||
```
|
||||
|
||||
At this point, users can then launch their web browser of choice and
|
||||
go to http://localhost:8050/ to see an analysis page.
|
||||
|
||||
|
||||
|
||||

|
||||
|
||||
```{tip}
|
||||
To launch the web application on a port other than 8050, include an optional port argument:
|
||||
`--gui <desired port>`
|
||||
```
|
||||
|
||||
When no filters are applied, users will see five basic sections derived from their application's profiling data:
|
||||
|
||||
1. Memory Chart Analysis
|
||||
2. Empirical Roofline Analysis
|
||||
3. Top Stats (Top Kernel Statistics)
|
||||
4. System Info
|
||||
5. System Speed-of-Light
|
||||
|
||||
To dive deeper, use the top drop down menus to isolate particular
|
||||
kernel(s) or dispatch(s). You will then see the web page update with
|
||||
metrics specific to the filter you've applied.
|
||||
|
||||
Once you have applied a filter, you will also see several additional
|
||||
sections become available with detailed metrics specific to that area
|
||||
of AMD hardware. These detailed sections mirror the data displayed in
|
||||
Omniperf's [Grafana
|
||||
interface](https://amdresearch.github.io/omniperf/analysis.html#grafana-based-gui).
|
||||
|
||||
### Grafana-based GUI
|
||||
|
||||
#### Features
|
||||
The Omniperf Grafana GUI Analyzer supports the following features to facilitate MI GPU performance profiling and analysis:
|
||||
|
||||
- System and IP-Block Speed-of-Light (SOL)
|
||||
- Multiple normalization options, including per-cycle, per-wave, per-kernel and per-second.
|
||||
- Baseline comparisons
|
||||
- Regex based Dispatch ID filtering
|
||||
- Roofline Analysis
|
||||
- Detailed per IP Block performance counters and metrics
|
||||
- CPC/CPF
|
||||
- SPI
|
||||
- SQ
|
||||
- SQC
|
||||
- TA/TD
|
||||
- TCP
|
||||
- TCC (both aggregated and per-channel perf info)
|
||||
|
||||
##### Speed-of-Light
|
||||
Speed-of-light panels are provided at both the system and per IP block level to help diagnosis performance bottlenecks. The performance numbers of the workload under testing are compared to the theoretical maximum, (e.g. floating point operations, bandwidth, cache hit rate, etc.), to indicate the available room to further utilize the hardware capability.
|
||||
|
||||
##### Multi Normalization
|
||||
|
||||
Multiple performance number normalizations are provided to allow performance inspection within both HW and SW context. The following normalizations are permitted:
|
||||
- per cycle
|
||||
- per wave
|
||||
- per kernel
|
||||
- per second
|
||||
|
||||
##### Baseline Comparison
|
||||
Omniperf enables baseline comparison to allow checking A/B effect. The current release limits the baseline comparison to the same SoC. Cross comparison between SoCs is in development.
|
||||
|
||||
For both the Current Workload and the Baseline Workload, one can independently setup the following filters to allow fine grained comparions:
|
||||
- Workload Name
|
||||
- GPU ID filtering (multi selection)
|
||||
- Kernel Name filtering (multi selection)
|
||||
- Dispatch ID filtering (Regex filtering)
|
||||
- Omniperf Panels (multi selection)
|
||||
|
||||
##### Regex based Dispatch ID filtering
|
||||
This release enables regex based dispatch ID filtering to flexibly choose the kernel invocations. One may refer to [Regex Numeric Range Generator](https://3widgets.com/), to generate typical number ranges.
|
||||
|
||||
For example, if one wants to inspect Dispatch Range from 17 to 48, inclusive, the corresponding regex is : **(1[7-9]|[23]\d|4[0-8])**. The generated express can be copied over for filtering.
|
||||
|
||||
##### Incremental Profiling
|
||||
Omniperf supports incremental profiling to significantly speed up performance analysis.
|
||||
|
||||
> Refer to [*IP Block profiling*](https://amdresearch.github.io/omniperf/profiling.html#ip-block-profiling) section for this command.
|
||||
|
||||
By default, the entire application is profiled to collect perfmon counter for all IP blocks, giving a system level view of where the workload stands in terms of performance optimization opportunities and bottlenecks.
|
||||
|
||||
After that one may focus on only a few IP blocks, (e.g., L1 Cache or LDS) to closely check the effect of software optimizations, without performing application replay for all other IP Blocks. This saves lots of compute time. In addition, the prior profiling results for other IP blocks are not overwritten. Instead, they can be merged during the import to piece together the system view.
|
||||
|
||||
##### Color Coding
|
||||
The uniform color coding is applied to most visualizations (bars, table, diagrams etc). Typically, Yellow color means over 50%, while Red color mean over 90% percent, for easy inspection.
|
||||
|
||||
##### Global Variables and Configurations
|
||||
|
||||

|
||||
|
||||
#### Grafana GUI Import
|
||||
The omniperf database `--import` option imports the raw profiling data to Grafana's backend MongoDB database. This step is only required for Grafana GUI based performance analysis.
|
||||
|
||||
Default username and password for MongoDB (to be used in database mode) are as follows:
|
||||
|
||||
- Username: **temp**
|
||||
- Password: **temp123**
|
||||
|
||||
Each workload is imported to a separate database with the following naming convention:
|
||||
|
||||
omniperf_<team>_<database>_<soc>
|
||||
|
||||
e.g., omniperf_asw_vcopy_mi200.
|
||||
|
||||
Below is the sample command to import the *vcopy* profiling data.
|
||||
|
||||
```shell
|
||||
$ omniperf database --help
|
||||
ROC Profiler: /usr/bin/rocprof
|
||||
|
||||
usage:
|
||||
|
||||
omniperf database <interaction type> [connection options]
|
||||
|
||||
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
|
||||
Examples:
|
||||
|
||||
omniperf database --import -H pavii1 -u temp -t asw -w workloads/vcopy/mi200/
|
||||
|
||||
omniperf database --remove -H pavii1 -u temp -w omniperf_asw_sample_mi200
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
|
||||
|
||||
|
||||
Help:
|
||||
-h, --help show this help message and exit
|
||||
|
||||
General Options:
|
||||
-v, --version show program's version number and exit
|
||||
-V, --verbose Increase output verbosity
|
||||
|
||||
Interaction Type:
|
||||
-i, --import Import workload to Omniperf DB
|
||||
-r, --remove Remove a workload from Omniperf DB
|
||||
|
||||
Connection Options:
|
||||
-H , --host Name or IP address of the server host.
|
||||
-P , --port TCP/IP Port. (DEFAULT: 27018)
|
||||
-u , --username Username for authentication.
|
||||
-p , --password The user's password. (will be requested later if it's not set)
|
||||
-t , --team Specify Team prefix.
|
||||
-w , --workload Specify name of workload (to remove) or path to workload (to import)
|
||||
-k , --kernelVerbose Specify Kernel Name verbose level 1-5.
|
||||
Lower the level, shorter the kernel name. (DEFAULT: 2) (DISABLE: 5)
|
||||
```
|
||||
|
||||
**omniperf import for vcopy:**
|
||||
```shell
|
||||
$ omniperf database --import -H pavii1 -u temp -t asw -w workloads/vcopy/mi200/
|
||||
ROC Profiler: /usr/bin/rocprof
|
||||
|
||||
--------
|
||||
Import Profiling Results
|
||||
--------
|
||||
|
||||
Pulling data from /home/amd/xlu/test/workloads/vcopy/mi200
|
||||
The directory exists
|
||||
Found sysinfo file
|
||||
KernelName shortening enabled
|
||||
Kernel name verbose level: 2
|
||||
Password:
|
||||
Password recieved
|
||||
-- Conversion & Upload in Progress --
|
||||
0%| | 0/11 [00:00<?, ?it/s]/home/amd/xlu/test/workloads/vcopy/mi200/SQ_IFETCH_LEVEL.csv
|
||||
9%|█████████████████▉ | 1/11 [00:00<00:01, 8.53it/s]/home/amd/xlu/test/workloads/vcopy/mi200/pmc_perf.csv
|
||||
18%|███████████████████████████████████▊ | 2/11 [00:00<00:01, 6.99it/s]/home/amd/xlu/test/workloads/vcopy/mi200/SQ_INST_LEVEL_SMEM.csv
|
||||
27%|█████████████████████████████████████████████████████▋ | 3/11 [00:00<00:01, 7.90it/s]/home/amd/xlu/test/workloads/vcopy/mi200/SQ_LEVEL_WAVES.csv
|
||||
36%|███████████████████████████████████████████████████████████████████████▋ | 4/11 [00:00<00:00, 8.56it/s]/home/amd/xlu/test/workloads/vcopy/mi200/SQ_INST_LEVEL_LDS.csv
|
||||
45%|█████████████████████████████████████████████████████████████████████████████████████████▌ | 5/11 [00:00<00:00, 9.00it/s]/home/amd/xlu/test/workloads/vcopy/mi200/SQ_INST_LEVEL_VMEM.csv
|
||||
55%|███████████████████████████████████████████████████████████████████████████████████████████████████████████▍ | 6/11 [00:00<00:00, 9.24it/s]/home/amd/xlu/test/workloads/vcopy/mi200/sysinfo.csv
|
||||
64%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████▎ | 7/11 [00:00<00:00, 9.37it/s]/home/amd/xlu/test/workloads/vcopy/mi200/roofline.csv
|
||||
82%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████▏ | 9/11 [00:00<00:00, 12.60it/s]/home/amd/xlu/test/workloads/vcopy/mi200/timestamps.csv
|
||||
100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 11/11 [00:00<00:00, 11.05it/s]
|
||||
9 collections added.
|
||||
Workload name uploaded
|
||||
-- Complete! --
|
||||
```
|
||||
|
||||
#### Omniperf Panels
|
||||
|
||||
##### Overview
|
||||
|
||||
There are currently 18 main panel categories available for analyzing the compute workload performance. Each category contains several panels for close inspection of the system performance.
|
||||
|
||||
- Kernel Statistics
|
||||
- Kernel time histogram
|
||||
- Top Ten bottleneck kernels
|
||||
- System Speed-of-Light
|
||||
- Speed-of-Light
|
||||
- System Info table
|
||||
- Memory Chart Analysis
|
||||
- Roofline Analysis
|
||||
- FP32/FP64
|
||||
- FP16/INT8
|
||||
- Command Processor
|
||||
- Command Processor - Fetch (CPF)
|
||||
- Command Processor - Controller (CPC)
|
||||
- Shader Processing Input (SPI)
|
||||
- SPI Stats
|
||||
- SPI Resource Allocations
|
||||
- Wavefront Launch
|
||||
- Wavefront Launch Stats
|
||||
- Wavefront runtime stats
|
||||
- per-SE Wavefront Scheduling performance
|
||||
- Wavefront Lifetime
|
||||
- Wavefront lifetime breakdown
|
||||
- per-SE wavefront life (average)
|
||||
- per-SE wavefront life (histogram)
|
||||
- Wavefront Occupancy
|
||||
- per-SE wavefront occupancy
|
||||
- per-CU wavefront occupancy
|
||||
- Compute Unit - Instruction Mix
|
||||
- per-wave Instruction mix
|
||||
- per-wave VALU Arithmetic instruction mix
|
||||
- per-wave MFMA Arithmetic instruction mix
|
||||
- Compute Unit - Compute Pipeline
|
||||
- Speed-of-Light: Compute Pipeline
|
||||
- Arithmetic OPs count
|
||||
- Compute pipeline stats
|
||||
- Memory latencies
|
||||
- Local Data Share (LDS)
|
||||
- Speed-of-Light: LDS
|
||||
- LDS stats
|
||||
- Instruction Cache
|
||||
- Speed-of-Light: Instruction Cache
|
||||
- Instruction Cache Accesses
|
||||
- Constant Cache
|
||||
- Speed-of-Light: Constant Cache
|
||||
- Constant Cache Accesses
|
||||
- Constant Cache - L2 Interface stats
|
||||
- Texture Address and Texture Data
|
||||
- Texture Address (TA)
|
||||
- Texture Data (TD)
|
||||
- L1 Cache
|
||||
- Speed-of-Light: L1 Cache
|
||||
- L1 Cache Accesses
|
||||
- L1 Cache Stalls
|
||||
- L1 - L2 Transactions
|
||||
- L1 - UTCL1 Interface stats
|
||||
- L2 Cache
|
||||
- Speed-of-Light: L2 Cache
|
||||
- L2 Cache Accesses
|
||||
- L2 - EA Transactions
|
||||
- L2 - EA Stalls
|
||||
- L2 Cache Per Channel Performance
|
||||
- Per-channel L2 Hit rate
|
||||
- Per-channel L1-L2 Read requests
|
||||
- Per-channel L1-L2 Write Requests
|
||||
- Per-channel L1-L2 Atomic Requests
|
||||
- Per-channel L2-EA Read requests
|
||||
- Per-channel L2-EA Write requests
|
||||
- Per-channel L2-EA Atomic requests
|
||||
- Per-channel L2-EA Read latency
|
||||
- Per-channel L2-EA Write latency
|
||||
- Per-channel L2-EA Atomic latency
|
||||
- Per-channel L2-EA Read stall (I/O, GMI, HBM)
|
||||
- Per-channel L2-EA Write stall (I/O, GMI, HBM, Starve)
|
||||
|
||||
Most panels are designed around a specific IP block to thoroughly understand its behavior. Additional panels, including custom panels, could also be added to aid the performance analysis.
|
||||
|
||||
##### System Info Panel
|
||||

|
||||
##### Kernel Statistics
|
||||
|
||||
###### Kernel Time Histogram
|
||||

|
||||
###### Top Bottleneck Kernels
|
||||

|
||||
###### Top Bottleneck Dispatches
|
||||

|
||||
###### Current and Baseline Dispatch IDs (Filtered)
|
||||

|
||||
|
||||
##### System Speed-of-Light
|
||||

|
||||
|
||||
##### Memory Chart Analysis
|
||||
> Note: The Memory Chart Analysis support multiple normalizations. Due to the space limit, all transactions, when normalized to per-sec, default to unit of Billion transactions per second.
|
||||
|
||||

|
||||
|
||||
##### Roofline Analysis
|
||||

|
||||
##### Command Processor
|
||||

|
||||
##### Shader Processing Input (SPI)
|
||||

|
||||
##### Wavefront Launch
|
||||

|
||||
|
||||
##### Compute Unit - Instruction Mix
|
||||
###### Instruction Mix
|
||||

|
||||
###### VALU Arithmetic Instruction Mix
|
||||

|
||||
###### MFMA Arithmetic Instruction Mix
|
||||

|
||||
###### VMEM Arithmetic Instruction Mix
|
||||

|
||||
|
||||
##### Compute Unit - Compute Pipeline
|
||||
###### Speed-of-Light
|
||||

|
||||
###### Compute Pipeline Stats
|
||||

|
||||
###### Arithmetic Operations
|
||||

|
||||
###### Memory Latencies
|
||||

|
||||
|
||||
##### Local Data Share (LDS)
|
||||
###### Speed-of-Light
|
||||

|
||||
###### LDS Stats
|
||||

|
||||
|
||||
##### Instruction Cache
|
||||
###### Speed-of-Light
|
||||

|
||||
###### Instruction Cache Stats
|
||||

|
||||
|
||||
##### Scalar L1D Cache
|
||||
###### Speed-of-Light
|
||||

|
||||
###### Constant Cache Stats
|
||||

|
||||
###### Constant Cache - L2 Interface
|
||||

|
||||
|
||||
##### Texture Address and Texture Data
|
||||
###### Texture Address (TA)
|
||||

|
||||
###### Texture Data (TD)
|
||||

|
||||
|
||||
##### Vector L1D Cache
|
||||
###### Speed-of-Light
|
||||

|
||||
###### Vector L1D Cache Accesses
|
||||

|
||||
###### L1 Cache Stalls
|
||||

|
||||
###### L1 - L2 Transactions
|
||||

|
||||
###### L1 - UTCL1 Interface Stats
|
||||

|
||||
|
||||
##### L2 Cache
|
||||
###### Speed-of-Light
|
||||

|
||||
###### L2 Cache Accesses
|
||||

|
||||
###### L2 - EA Transactions
|
||||

|
||||
###### L2 - EA Stalls
|
||||

|
||||
|
||||
##### L2 Cache Per Channel Performance
|
||||
###### L1-L2 Transactions
|
||||

|
||||
###### L2-EA Transactions
|
||||

|
||||
###### L2-EA Latencies
|
||||

|
||||
###### L2-EA Stalls
|
||||

|
||||
###### L2-EA Write Stalls
|
||||

|
||||
###### L2-EA Write Starvation
|
||||

|
||||
@@ -52,6 +52,8 @@ extensions = [
|
||||
"myst_parser",
|
||||
]
|
||||
|
||||
myst_heading_anchors = 2
|
||||
|
||||
# Add any paths that contain templates here, relative to this directory.
|
||||
templates_path = ["_templates"]
|
||||
|
||||
@@ -111,8 +113,8 @@ html_static_path = ["_static"]
|
||||
htmlhelp_basename = "Omniperfdoc"
|
||||
|
||||
html_theme_options = {
|
||||
# "analytics_id": "G-1HLBBRSTT9", # Provided by Google in your dashboard
|
||||
# "analytics_anonymize_ip": False,
|
||||
"analytics_id": "G-C5DYLCE9ED", # Provided by Google in your dashboard
|
||||
"analytics_anonymize_ip": False,
|
||||
"logo_only": False,
|
||||
"display_version": True,
|
||||
"prev_next_buttons_location": "bottom",
|
||||
|
||||
@@ -69,7 +69,9 @@ Modes change the fundamental behavior of the Omniperf command line tool. Dependi
|
||||
|
||||
- **Database**: Our detailed Grafana GUI is built on a MongoDB database. `--import` profiling results to the DB to interact with the workload in Grafana or `--remove` the workload from the DB.
|
||||
|
||||
Connection options will need to be specified. See the [*Omniperf Performance Analysis*](performance_analysis.md#omniperf-grafana-gui-import) section for more details on this.
|
||||
Connection options will need to be specified. See the [*Grafana
|
||||
Analysis*](https://amdresearch.github.io/omniperf/analysis.html#grafana-gui-import) import section
|
||||
for more details on this.
|
||||
|
||||
```shell
|
||||
$ omniperf database --help
|
||||
|
||||
@@ -1,260 +0,0 @@
|
||||
# Omniperf Grafana GUI Analyzer
|
||||
|
||||
```eval_rst
|
||||
.. toctree::
|
||||
:glob:
|
||||
:maxdepth: 4
|
||||
```
|
||||
|
||||
## Features
|
||||
The Omniperf Grafana GUI Analyzer supports the following features to facilitate MI GPU performance profiling and analysis:
|
||||
|
||||
- System and IP-Block Speed-of-Light (SOL)
|
||||
- Multiple normalization options, including per-cycle, per-wave, per-kernel and per-second.
|
||||
- Baseline comparisons
|
||||
- Regex based Dispatch ID filtering
|
||||
- Roofline Analysis
|
||||
- Detailed per IP Block performance counters and metrics
|
||||
- CPC/CPF
|
||||
- SPI
|
||||
- SQ
|
||||
- SQC
|
||||
- TA/TD
|
||||
- TCP
|
||||
- TCC (both aggregated and per-channel perf info)
|
||||
|
||||
### Speed-of-Light
|
||||
Speed-of-light panels are provided at both the system and per IP block level to help diagnosis performance bottlenecks. The performance numbers of the workload under testing are compared to the theoretical maximum, (e.g. floating point operations, bandwidth, cache hit rate, etc.), to indicate the available room to further utilize the hardware capability.
|
||||
|
||||
### Multi Normalization
|
||||
|
||||
Multiple performance number normalizations are provided to allow performance inspection within both HW and SW context. The following normalizations are permitted:
|
||||
- per cycle
|
||||
- per wave
|
||||
- per kernel
|
||||
- per second
|
||||
|
||||
### Baseline Comparison
|
||||
Omniperf enables baseline comparison to allow checking A/B effect. The current release limits the baseline comparison to the same SoC. Cross comparison between SoCs is in development.
|
||||
|
||||
For both the Current Workload and the Baseline Workload, one can independently setup the following filters to allow fine grained comparions:
|
||||
- Workload Name
|
||||
- GPU ID filtering (multi selection)
|
||||
- Kernel Name filtering (multi selection)
|
||||
- Dispatch ID filtering (Regex filtering)
|
||||
- Omniperf Panels (multi selection)
|
||||
|
||||
### Regex based Dispatch ID filtering
|
||||
This release enables regex based dispatch ID filtering to flexibly choose the kernel invocations. One may refer to [Regex Numeric Range Generator](https://3widgets.com/), to generate typical number ranges.
|
||||
|
||||
For example, if one wants to inspect Dispatch Range from 17 to 48, inclusive, the corresponding regex is : **(1[7-9]|[23]\d|4[0-8])**. The generated express can be copied over for filtering.
|
||||
|
||||
### Incremental Profiling
|
||||
Omniperf supports incremental profiling to significantly speed up performance analysis.
|
||||
|
||||
> Refer to [*IP Block profiling*](https://amdresearch.github.io/omniperf/performance_analysis.html#ip-block-profiling) section for this command.
|
||||
|
||||
By default, the entire application is profiled to collect perfmon counter for all IP blocks, giving a system level view of where the workload stands in terms of performance optimization opportunities and bottlenecks.
|
||||
|
||||
After that one may focus on only a few IP blocks, (e.g., L1 Cache or LDS) to closely check the effect of software optimizations, without performing application replay for all other IP Blocks. This saves lots of compute time. In addition, the prior profiling results for other IP blocks are not overwritten. Instead, they can be merged during the import to piece together the system view.
|
||||
|
||||
### Color Coding
|
||||
The uniform color coding is applied to most visualizations (bars, table, diagrams etc). Typically, Yellow color means over 50%, while Red color mean over 90% percent, for easy inspection.
|
||||
|
||||
### Global Variables and Configurations
|
||||
|
||||

|
||||
|
||||
## Omniperf Panels
|
||||
|
||||
### Overview
|
||||
|
||||
There are currently 18 main panel categories available for analyzing the compute workload performance. Each category contains several panels for close inspection of the system performance.
|
||||
|
||||
- Kernel Statistics
|
||||
- Kernel time histogram
|
||||
- Top Ten bottleneck kernels
|
||||
- System Speed-of-Light
|
||||
- Speed-of-Light
|
||||
- System Info table
|
||||
- Memory Chart Analysis
|
||||
- Roofline Analysis
|
||||
- FP32/FP64
|
||||
- FP16/INT8
|
||||
- Command Processor
|
||||
- Command Processor - Fetch (CPF)
|
||||
- Command Processor - Controller (CPC)
|
||||
- Shader Processing Input (SPI)
|
||||
- SPI Stats
|
||||
- SPI Resource Allocations
|
||||
- Wavefront Launch
|
||||
- Wavefront Launch Stats
|
||||
- Wavefront runtime stats
|
||||
- per-SE Wavefront Scheduling performance
|
||||
- Wavefront Lifetime
|
||||
- Wavefront lifetime breakdown
|
||||
- per-SE wavefront life (average)
|
||||
- per-SE wavefront life (histogram)
|
||||
- Wavefront Occupancy
|
||||
- per-SE wavefront occupancy
|
||||
- per-CU wavefront occupancy
|
||||
- Compute Unit - Instruction Mix
|
||||
- per-wave Instruction mix
|
||||
- per-wave VALU Arithmetic instruction mix
|
||||
- per-wave MFMA Arithmetic instruction mix
|
||||
- Compute Unit - Compute Pipeline
|
||||
- Speed-of-Light: Compute Pipeline
|
||||
- Arithmetic OPs count
|
||||
- Compute pipeline stats
|
||||
- Memory latencies
|
||||
- Local Data Share (LDS)
|
||||
- Speed-of-Light: LDS
|
||||
- LDS stats
|
||||
- Instruction Cache
|
||||
- Speed-of-Light: Instruction Cache
|
||||
- Instruction Cache Accesses
|
||||
- Constant Cache
|
||||
- Speed-of-Light: Constant Cache
|
||||
- Constant Cache Accesses
|
||||
- Constant Cache - L2 Interface stats
|
||||
- Texture Address and Texture Data
|
||||
- Texture Address (TA)
|
||||
- Texture Data (TD)
|
||||
- L1 Cache
|
||||
- Speed-of-Light: L1 Cache
|
||||
- L1 Cache Accesses
|
||||
- L1 Cache Stalls
|
||||
- L1 - L2 Transactions
|
||||
- L1 - UTCL1 Interface stats
|
||||
- L2 Cache
|
||||
- Speed-of-Light: L2 Cache
|
||||
- L2 Cache Accesses
|
||||
- L2 - EA Transactions
|
||||
- L2 - EA Stalls
|
||||
- L2 Cache Per Channel Performance
|
||||
- Per-channel L2 Hit rate
|
||||
- Per-channel L1-L2 Read requests
|
||||
- Per-channel L1-L2 Write Requests
|
||||
- Per-channel L1-L2 Atomic Requests
|
||||
- Per-channel L2-EA Read requests
|
||||
- Per-channel L2-EA Write requests
|
||||
- Per-channel L2-EA Atomic requests
|
||||
- Per-channel L2-EA Read latency
|
||||
- Per-channel L2-EA Write latency
|
||||
- Per-channel L2-EA Atomic latency
|
||||
- Per-channel L2-EA Read stall (I/O, GMI, HBM)
|
||||
- Per-channel L2-EA Write stall (I/O, GMI, HBM, Starve)
|
||||
|
||||
Most panels are designed around a specific IP block to thoroughly understand its behavior. Additional panels, including custom panels, could also be added to aid the performance analysis.
|
||||
|
||||
### System Info Panel
|
||||

|
||||
### Kernel Statistics
|
||||
|
||||
#### Kernel Time Histogram
|
||||

|
||||
#### Top Bottleneck Kernels
|
||||

|
||||
#### Top Bottleneck Dispatches
|
||||

|
||||
#### Current and Baseline Dispatch IDs (Filtered)
|
||||

|
||||
|
||||
### System Speed-of-Light
|
||||

|
||||
|
||||
### Memory Chart Analysis
|
||||
> Note: The Memory Chart Analysis support multiple normalizations. Due to the space limit, all transactions, when normalized to per-sec, default to unit of Billion transactions per second.
|
||||
|
||||

|
||||
|
||||
### Roofline Analysis
|
||||

|
||||
### Command Processor
|
||||

|
||||
### Shader Processing Input (SPI)
|
||||

|
||||
### Wavefront Launch
|
||||

|
||||
|
||||
### Compute Unit - Instruction Mix
|
||||
#### Instruction Mix
|
||||

|
||||
#### VALU Arithmetic Instruction Mix
|
||||

|
||||
#### MFMA Arithmetic Instruction Mix
|
||||

|
||||
#### VMEM Arithmetic Instruction Mix
|
||||

|
||||
|
||||
### Compute Unit - Compute Pipeline
|
||||
#### Speed-of-Light
|
||||

|
||||
#### Compute Pipeline Stats
|
||||

|
||||
#### Arithmetic Operations
|
||||

|
||||
#### Memory Latencies
|
||||

|
||||
|
||||
### Local Data Share (LDS)
|
||||
#### Speed-of-Light
|
||||

|
||||
#### LDS Stats
|
||||

|
||||
|
||||
### Instruction Cache
|
||||
#### Speed-of-Light
|
||||

|
||||
#### Instruction Cache Stats
|
||||

|
||||
|
||||
### Scalar L1D Cache
|
||||
#### Speed-of-Light
|
||||

|
||||
#### Constant Cache Stats
|
||||

|
||||
#### Constant Cache - L2 Interface
|
||||

|
||||
|
||||
### Texture Address and Texture Data
|
||||
#### Texture Address (TA)
|
||||

|
||||
#### Texture Data (TD)
|
||||

|
||||
|
||||
### Vector L1D Cache
|
||||
#### Speed-of-Light
|
||||

|
||||
#### Vector L1D Cache Accesses
|
||||

|
||||
#### L1 Cache Stalls
|
||||

|
||||
#### L1 - L2 Transactions
|
||||

|
||||
#### L1 - UTCL1 Interface Stats
|
||||

|
||||
|
||||
### L2 Cache
|
||||
#### Speed-of-Light
|
||||

|
||||
#### L2 Cache Accesses
|
||||

|
||||
#### L2 - EA Transactions
|
||||

|
||||
#### L2 - EA Stalls
|
||||

|
||||
|
||||
### L2 Cache Per Channel Performance
|
||||
#### L1-L2 Transactions
|
||||

|
||||
#### L2-EA Transactions
|
||||

|
||||
#### L2-EA Latencies
|
||||

|
||||
#### L2-EA Stalls
|
||||

|
||||
#### L2-EA Write Stalls
|
||||

|
||||
#### L2-EA Write Starvation
|
||||

|
||||
@@ -1,4 +1,4 @@
|
||||
# Omniperf High Level Design
|
||||
# High Level Design
|
||||
|
||||
```eval_rst
|
||||
.. toctree::
|
||||
|
||||
|
После Ширина: | Высота: | Размер: 47 KiB |
|
После Ширина: | Высота: | Размер: 113 KiB |
|
После Ширина: | Высота: | Размер: 272 KiB |
|
После Ширина: | Высота: | Размер: 57 KiB |
|
После Ширина: | Высота: | Размер: 253 KiB |
@@ -10,7 +10,7 @@
|
||||
high_level_design
|
||||
installation
|
||||
getting_started
|
||||
performance_analysis
|
||||
grafana_analyzer
|
||||
profiling
|
||||
analysis
|
||||
faq
|
||||
```
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# Omniperf Deployment
|
||||
# Deployment
|
||||
|
||||
```eval_rst
|
||||
.. toctree::
|
||||
@@ -24,7 +24,7 @@ Omniperf requires the following basic software dependencies prior to usage:
|
||||
|
||||
* Python (>=3.7)
|
||||
* CMake (>= 3.19)
|
||||
* ROCm (>= 5.1)
|
||||
* ROCm (>= 5.2.0)
|
||||
|
||||
In addition, Omniperf leverages a number of Python packages that are
|
||||
documented in the top-level `requirements.txt` file. These must be
|
||||
@@ -146,7 +146,7 @@ optional `ROCPROF` environment variable.
|
||||
|
||||
---
|
||||
|
||||
## Omniperf Server Setup
|
||||
## Server-side Setup
|
||||
|
||||
Note: Server-side setup is not required to profile or analyze
|
||||
performance data from the CLI. It is provided as an additional mechanism to import performance
|
||||
@@ -157,10 +157,10 @@ use the provided Docker file to build the Grafana and MongoDB
|
||||
instance.
|
||||
|
||||
### Install MongoDB Utils
|
||||
Omniperf uses [mongoimport](https://www.mongodb.com/docs/database-tools/mongoimport/) to upload data to Grafana's backend database
|
||||
Omniperf uses [mongoimport](https://www.mongodb.com/docs/database-tools/mongoimport/) to upload data to Grafana's backend database. Install for Ubuntu 20.04 is as follows:
|
||||
```bash
|
||||
$ wget https://fastdl.mongodb.org/tools/db/mongodb-database-tools-ubuntu2004-x86_64-100.6.1.deb
|
||||
$ sudo apt intall ./mongodb-database-tools-ubuntu2004-x86_64-100.6.1.deb
|
||||
$ sudo apt install ./mongodb-database-tools-ubuntu2004-x86_64-100.6.1.deb
|
||||
```
|
||||
> Find install for alternative distros [here](https://www.mongodb.com/download-center/database-tools/releases/archive)
|
||||
|
||||
@@ -177,3 +177,38 @@ $ sudo docker volume create --driver local --opt type=none --opt device=/usr/loc
|
||||
$ sudo docker-compose build
|
||||
$ sudo docker-compose up -d
|
||||
```
|
||||
> Note that TCP ports for Grafana (4000) and MongoDB (27017) in the docker container are mapped to 14000 and 27018, respectively, on the host side.
|
||||
|
||||
### Setup Grafana Instance
|
||||
Once you've launced your docker container you should be able to reach Grafana at **http://\<host-ip>:14000**. The default login credentials for the first-time Grafana setup are:
|
||||
|
||||
- Username: **admin**
|
||||
- Password: **admin**
|
||||
|
||||

|
||||
|
||||
MongoDB Datasource Configuration
|
||||
|
||||
The MongoDB Datasource shall be configured prior to the first-time use. Navigate to Grafana's Configuration page (shown below) to add the **Omniperf Data** connection.
|
||||
|
||||

|
||||
|
||||
Configure the following fields in the datasource:
|
||||
|
||||
- HTTP URL: set to *http://localhost:3333*
|
||||
- MongoDB URL: set to *mongodb://temp:temp123@\<host-ip>:27018/admin?authSource=admin*
|
||||
- Database Name: set to *admin*
|
||||
|
||||
After properly configuring these fields click **Save & Test** to make sure your connection is successful.
|
||||
|
||||
> Note to avoid potential DNS issue, one may need to use the actual IP address for the host node in the MongoDB URL.
|
||||
|
||||

|
||||
|
||||
Omniperf Dashboard Import
|
||||
|
||||
From *Create* → *Import*, (as seen below) upload the dashboard file, `/dashboards/Omniperf_v{__VERSION__}_pub.json`, from the Omniperf tarball.
|
||||
|
||||
Edit both the Dashboard Name and the Unique Identifier (UID) to uniquely identify the dashboard he/she will use. Click Import to finish the process.
|
||||
|
||||

|
||||
@@ -1,4 +1,4 @@
|
||||
# Omniperf Performance Analysis
|
||||
# Profiling
|
||||
|
||||
```eval_rst
|
||||
.. toctree::
|
||||
@@ -348,90 +348,3 @@ Dispatch Selection: ['0']
|
||||
IP Blocks: All
|
||||
... ...
|
||||
```
|
||||
|
||||
## Omniperf Grafana GUI Import
|
||||
The omniperf database `--import` option imports the raw profiling data to Grafana's backend MongoDB database. This step is only required for Grafana GUI based performance analysis.
|
||||
|
||||
Each workload is imported to a separate database with the following naming convention:
|
||||
|
||||
omniperf_<team>_<database>_<soc>
|
||||
|
||||
e.g., omniperf_asw_vcopy_mi200.
|
||||
|
||||
Below is the sample command to import the *vcopy* profiling data.
|
||||
|
||||
```shell
|
||||
$ omniperf database --help
|
||||
ROC Profiler: /usr/bin/rocprof
|
||||
|
||||
usage:
|
||||
|
||||
omniperf database <interaction type> [connection options]
|
||||
|
||||
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
|
||||
Examples:
|
||||
|
||||
omniperf database --import -H pavii1 -u amd -t asw -w workloads/vcopy/mi200/
|
||||
|
||||
omniperf database --remove -H pavii1 -u amd -w omniperf_asw_sample_mi200
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
|
||||
|
||||
|
||||
Help:
|
||||
-h, --help show this help message and exit
|
||||
|
||||
General Options:
|
||||
-v, --version show program's version number and exit
|
||||
-V, --verbose Increase output verbosity
|
||||
|
||||
Interaction Type:
|
||||
-i, --import Import workload to Omniperf DB
|
||||
-r, --remove Remove a workload from Omniperf DB
|
||||
|
||||
Connection Options:
|
||||
-H , --host Name or IP address of the server host.
|
||||
-P , --port TCP/IP Port. (DEFAULT: 27018)
|
||||
-u , --username Username for authentication.
|
||||
-p , --password The user's password. (will be requested later if it's not set)
|
||||
-t , --team Specify Team prefix.
|
||||
-w , --workload Specify name of workload (to remove) or path to workload (to import)
|
||||
-k , --kernelVerbose Specify Kernel Name verbose level 1-5.
|
||||
Lower the level, shorter the kernel name. (DEFAULT: 2) (DISABLE: 5)
|
||||
```
|
||||
|
||||
**omniperf import for vcopy:**
|
||||
```shell
|
||||
$ omniperf database --import -H pavii1 -u amd -t asw -w workloads/vcopy/mi200/
|
||||
ROC Profiler: /usr/bin/rocprof
|
||||
|
||||
--------
|
||||
Import Profiling Results
|
||||
--------
|
||||
|
||||
Pulling data from /home/amd/xlu/test/workloads/vcopy/mi200
|
||||
The directory exists
|
||||
Found sysinfo file
|
||||
KernelName shortening enabled
|
||||
Kernel name verbose level: 2
|
||||
Password:
|
||||
Password recieved
|
||||
-- Conversion & Upload in Progress --
|
||||
0%| | 0/11 [00:00<?, ?it/s]/home/amd/xlu/test/workloads/vcopy/mi200/SQ_IFETCH_LEVEL.csv
|
||||
9%|█████████████████▉ | 1/11 [00:00<00:01, 8.53it/s]/home/amd/xlu/test/workloads/vcopy/mi200/pmc_perf.csv
|
||||
18%|███████████████████████████████████▊ | 2/11 [00:00<00:01, 6.99it/s]/home/amd/xlu/test/workloads/vcopy/mi200/SQ_INST_LEVEL_SMEM.csv
|
||||
27%|█████████████████████████████████████████████████████▋ | 3/11 [00:00<00:01, 7.90it/s]/home/amd/xlu/test/workloads/vcopy/mi200/SQ_LEVEL_WAVES.csv
|
||||
36%|███████████████████████████████████████████████████████████████████████▋ | 4/11 [00:00<00:00, 8.56it/s]/home/amd/xlu/test/workloads/vcopy/mi200/SQ_INST_LEVEL_LDS.csv
|
||||
45%|█████████████████████████████████████████████████████████████████████████████████████████▌ | 5/11 [00:00<00:00, 9.00it/s]/home/amd/xlu/test/workloads/vcopy/mi200/SQ_INST_LEVEL_VMEM.csv
|
||||
55%|███████████████████████████████████████████████████████████████████████████████████████████████████████████▍ | 6/11 [00:00<00:00, 9.24it/s]/home/amd/xlu/test/workloads/vcopy/mi200/sysinfo.csv
|
||||
64%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████▎ | 7/11 [00:00<00:00, 9.37it/s]/home/amd/xlu/test/workloads/vcopy/mi200/roofline.csv
|
||||
82%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████▏ | 9/11 [00:00<00:00, 12.60it/s]/home/amd/xlu/test/workloads/vcopy/mi200/timestamps.csv
|
||||
100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 11/11 [00:00<00:00, 11.05it/s]
|
||||
9 collections added.
|
||||
Workload name uploaded
|
||||
-- Complete! --
|
||||
```
|
||||
@@ -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
|
||||
@@ -30,6 +30,7 @@ import glob
|
||||
import pandas as pd
|
||||
from datetime import datetime
|
||||
from pathlib import Path as path
|
||||
import warnings
|
||||
|
||||
from parser import parse
|
||||
from utils import specs
|
||||
@@ -37,19 +38,26 @@ from utils.perfagg import perfmon_filter, pmc_filter
|
||||
from utils import remove_workload
|
||||
from utils import csv_converter # Import workload
|
||||
from utils import plot_roofline # standalone roofline
|
||||
from omniperf_cli.omniperf_cli import omniperf_cli # CLI analysis
|
||||
from omniperf_analyze.omniperf_analyze import analyze # CLI analysis
|
||||
|
||||
from common import (
|
||||
OMNIPERF_HOME,
|
||||
PROG,
|
||||
SOC_LIST,
|
||||
VER,
|
||||
DISTRO_MAP,
|
||||
) # Import global variables
|
||||
|
||||
from common import getVersion
|
||||
|
||||
################################################
|
||||
# Helper Functions
|
||||
################################################
|
||||
def run_subprocess(cmd):
|
||||
subprocess.run(
|
||||
cmd,
|
||||
check=True
|
||||
)
|
||||
|
||||
def resolve_rocprof():
|
||||
# ROCPROF INFO
|
||||
global rocprof_cmd
|
||||
@@ -70,6 +78,7 @@ def resolve_rocprof():
|
||||
|
||||
print("ROC Profiler: ", rocprof_path.stdout.decode("utf-8"))
|
||||
|
||||
|
||||
def get_soc():
|
||||
mspec = specs.get_machine_specs(0)
|
||||
|
||||
@@ -109,20 +118,24 @@ def isWorkloadEmpty(my_parser, path):
|
||||
|
||||
def replace_timestamps(workload_dir):
|
||||
df_stamps = pd.read_csv(workload_dir + "/timestamps.csv")
|
||||
df_pmc_perf = pd.read_csv(workload_dir + "/pmc_perf.csv")
|
||||
if "BeginNs" in df_stamps.columns and "EndNs" in df_stamps.columns:
|
||||
df_pmc_perf = pd.read_csv(workload_dir + "/pmc_perf.csv")
|
||||
|
||||
df_pmc_perf["BeginNs"] = df_stamps["BeginNs"]
|
||||
df_pmc_perf["EndNs"] = df_stamps["EndNs"]
|
||||
df_pmc_perf.to_csv(workload_dir + "/pmc_perf.csv", index=False)
|
||||
df_pmc_perf["BeginNs"] = df_stamps["BeginNs"]
|
||||
df_pmc_perf["EndNs"] = df_stamps["EndNs"]
|
||||
df_pmc_perf.to_csv(workload_dir + "/pmc_perf.csv", index=False)
|
||||
else:
|
||||
warnings.warn("WARNING: Incomplete profiling data detected. Unable to update timestamps.")
|
||||
|
||||
|
||||
def gen_sysinfo(workload_name, workload_dir, ip_blocks, skip_roof):
|
||||
def gen_sysinfo(workload_name, workload_dir, ip_blocks, app_cmd, skip_roof):
|
||||
# Record system information
|
||||
mspec = specs.get_machine_specs(0)
|
||||
sysinfo = open(workload_dir + "/" + "sysinfo.csv", "w")
|
||||
|
||||
# write header
|
||||
header = "workload_name,"
|
||||
header += "command,"
|
||||
header += "host_name,host_cpu,host_distro,host_kernel,host_rocmver,date,"
|
||||
header += "gpu_soc,numSE,numCU,numSIMD,waveSize,maxWavesPerCU,maxWorkgroupSize,"
|
||||
header += "L1,L2,sclk,mclk,cur_sclk,cur_mclk,L2Banks,name,numSQC,hbmBW,"
|
||||
@@ -137,6 +150,7 @@ def gen_sysinfo(workload_name, workload_dir, ip_blocks, skip_roof):
|
||||
timestamp = now.strftime("%c") + " (" + local_tzname + ")"
|
||||
# host info
|
||||
param = [workload_name]
|
||||
param += [app_cmd]
|
||||
param += [
|
||||
mspec.hostname,
|
||||
mspec.cpu,
|
||||
@@ -196,10 +210,12 @@ def mongo_import(args, profileAndImport):
|
||||
csv_converter.convert_folder(connectionInfo, Extractionlvl)
|
||||
print("-- Complete! --")
|
||||
|
||||
|
||||
################################################
|
||||
# Roofline Helpers
|
||||
################################################
|
||||
|
||||
|
||||
def detect_roofline():
|
||||
mspec = specs.get_machine_specs(0)
|
||||
rocm_ver = mspec.rocmversion[:1]
|
||||
@@ -213,7 +229,7 @@ def detect_roofline():
|
||||
rooflineBinary = os.environ["ROOFLINE_BIN"]
|
||||
if os.path.exists(rooflineBinary):
|
||||
print("Detected user-supplied binary")
|
||||
return {"rocm_ver":"override", "distro":"override", "path":rooflineBinary}
|
||||
return {"rocm_ver": "override", "distro": "override", "path": rooflineBinary}
|
||||
else:
|
||||
print("ROOFLINE ERROR: user-supplied path to binary not accessible")
|
||||
print("--> ROOFLINE_BIN = %s\n" % target_binary)
|
||||
@@ -231,26 +247,34 @@ def detect_roofline():
|
||||
print("ROOFLINE ERROR: Cannot find a valid binary for your operating system")
|
||||
sys.exit(1)
|
||||
|
||||
target_binary = { "rocm_ver":rocm_ver, "distro":distro }
|
||||
target_binary = {"rocm_ver": rocm_ver, "distro": distro}
|
||||
return target_binary
|
||||
|
||||
|
||||
def mibench(args):
|
||||
print("No roofline data found. Generating...")
|
||||
|
||||
|
||||
target_binary = detect_roofline()
|
||||
if target_binary["rocm_ver"] == "override":
|
||||
path_to_binary = target_binary["path"]
|
||||
else:
|
||||
path_to_binary = str(OMNIPERF_HOME) + "/utils/rooflines/roofline" + "-" + DISTRO_MAP[target_binary["distro"]] + "-" + args.target.lower() + "-rocm" + target_binary["rocm_ver"]
|
||||
path_to_binary = (
|
||||
str(OMNIPERF_HOME)
|
||||
+ "/utils/rooflines/roofline"
|
||||
+ "-"
|
||||
+ DISTRO_MAP[target_binary["distro"]]
|
||||
+ "-"
|
||||
+ args.target.lower()
|
||||
+ "-rocm"
|
||||
+ target_binary["rocm_ver"]
|
||||
)
|
||||
|
||||
# Distro is valid but cant find rocm ver
|
||||
if not os.path.exists(path_to_binary):
|
||||
print(
|
||||
"ROOFLINE ERROR: ROCm version not supported."
|
||||
)
|
||||
print("ROOFLINE ERROR: Unable to locate expected binary (%s)." % path_to_binary)
|
||||
sys.exit(1)
|
||||
|
||||
subprocess.run(
|
||||
run_subprocess(
|
||||
[
|
||||
path_to_binary,
|
||||
"-o",
|
||||
@@ -276,6 +300,22 @@ def characterize_app(path, cmd, verbose):
|
||||
for fname in glob.glob(workload_dir + "/perfmon/*.txt"):
|
||||
print(fname)
|
||||
run_prof(fname, workload_dir, perfmon_dir, app_cmd, verbose)
|
||||
# run again with timestamps
|
||||
run_subprocess(
|
||||
[
|
||||
rocprof_cmd,
|
||||
# "-i", fname,
|
||||
# "-m", perfmon_dir + "/" + "metrics.xml",
|
||||
"--timestamp",
|
||||
"on",
|
||||
"-o",
|
||||
workload_dir + "/" + "timestamps.csv",
|
||||
'"' + app_cmd + '"',
|
||||
]
|
||||
)
|
||||
# Update pmc_perf.csv timestamps
|
||||
replace_timestamps(workload_dir)
|
||||
|
||||
|
||||
################################################
|
||||
# Profiling Helpers
|
||||
@@ -307,13 +347,12 @@ def run_prof(fname, workload_dir, perfmon_dir, cmd, verbose):
|
||||
if verbose:
|
||||
print("pmc file:", os.path.basename(fname))
|
||||
|
||||
subprocess.run(
|
||||
# profile the app
|
||||
run_subprocess(
|
||||
[
|
||||
rocprof_cmd,
|
||||
"-i",
|
||||
fname,
|
||||
"-m",
|
||||
perfmon_dir + "/" + "metrics.xml",
|
||||
"--timestamp",
|
||||
"on",
|
||||
"-o",
|
||||
@@ -323,12 +362,16 @@ def run_prof(fname, workload_dir, perfmon_dir, cmd, verbose):
|
||||
)
|
||||
|
||||
|
||||
def omniperf_profile(args):
|
||||
def omniperf_profile(args, VER):
|
||||
# Verify valid target
|
||||
if args.target not in SOC_LIST:
|
||||
parse.print_help(sys.stderr)
|
||||
sys.exit(1)
|
||||
|
||||
#Verify valid name
|
||||
if args.name.find(".") != -1 or args.name.find("-") != -1:
|
||||
raise ValueError("'-' and '.' are not permited in workload name", args.name)
|
||||
|
||||
# Basic Info
|
||||
print(PROG, "ver: ", VER)
|
||||
print("Path: ", args.path)
|
||||
@@ -402,7 +445,7 @@ def omniperf_profile(args):
|
||||
for fname in glob.glob(workload_dir + "/perfmon/*.txt"):
|
||||
# Kernel filtering (in-place replacement)
|
||||
if not args.kernel == None:
|
||||
subprocess.run(
|
||||
run_subprocess(
|
||||
[
|
||||
"sed",
|
||||
"-i",
|
||||
@@ -414,7 +457,7 @@ def omniperf_profile(args):
|
||||
|
||||
# Dispatch filtering (inplace replacement)
|
||||
if not args.dispatch == None:
|
||||
subprocess.run(
|
||||
run_subprocess(
|
||||
[
|
||||
"sed",
|
||||
"-i",
|
||||
@@ -431,7 +474,7 @@ def omniperf_profile(args):
|
||||
|
||||
|
||||
# run again with timestamps
|
||||
subprocess.run(
|
||||
run_subprocess(
|
||||
[
|
||||
rocprof_cmd,
|
||||
# "-i", fname,
|
||||
@@ -448,7 +491,7 @@ def omniperf_profile(args):
|
||||
replace_timestamps(workload_dir)
|
||||
|
||||
# Generate sysinfo
|
||||
gen_sysinfo(args.name, workload_dir, args.ipblocks, args.no_roof)
|
||||
gen_sysinfo(args.name, workload_dir, args.ipblocks, args.remaining, args.no_roof)
|
||||
|
||||
# Add tracing & roofline metrics (mi200 only)
|
||||
if args.target.lower() == "mi200":
|
||||
@@ -458,22 +501,35 @@ def omniperf_profile(args):
|
||||
if target_binary["rocm_ver"] == "override":
|
||||
path_to_binary = target_binary["path"]
|
||||
else:
|
||||
path_to_binary = str(OMNIPERF_HOME) + "/utils/rooflines/roofline" + "-" + DISTRO_MAP[target_binary["distro"]] + "-" + args.target.lower() + "-rocm" + target_binary["rocm_ver"]
|
||||
# Distro is valid but cant find rocm ver
|
||||
path_to_binary = (
|
||||
str(OMNIPERF_HOME)
|
||||
+ "/utils/rooflines/roofline"
|
||||
+ "-"
|
||||
+ DISTRO_MAP[target_binary["distro"]]
|
||||
+ "-"
|
||||
+ args.target.lower()
|
||||
+ "-rocm"
|
||||
+ target_binary["rocm_ver"]
|
||||
)
|
||||
# Distro is valid but cant find valid binary
|
||||
if not os.path.exists(path_to_binary):
|
||||
print(
|
||||
"ROOFLINE ERROR: ROCm version not supported."
|
||||
"ROOFLINE ERROR: Unable to locate expected binary (%s))."
|
||||
% path_to_binary
|
||||
)
|
||||
sys.exit(1)
|
||||
|
||||
subprocess.run(
|
||||
run_subprocess(
|
||||
[
|
||||
path_to_binary,
|
||||
"-o",
|
||||
workload_dir + "/" + "roofline.csv",
|
||||
"-d",
|
||||
str(args.device),
|
||||
]
|
||||
)
|
||||
|
||||
|
||||
################################################
|
||||
# MAIN
|
||||
################################################
|
||||
@@ -491,6 +547,9 @@ def main():
|
||||
parse(my_parser)
|
||||
args = my_parser.parse_args()
|
||||
|
||||
vData = getVersion()
|
||||
VER = vData["version"]
|
||||
|
||||
if args.mode == None:
|
||||
throw_parse_error(
|
||||
my_parser,
|
||||
@@ -566,7 +625,7 @@ def main():
|
||||
sysinfo_exists = os.path.isfile(sysinfo_path)
|
||||
if not sysinfo_exists:
|
||||
print("sysinfo not found")
|
||||
gen_sysinfo(args.name, args.path, [], False)
|
||||
gen_sysinfo(args.name, args.path, [], args.remaining, False)
|
||||
|
||||
# does app data exist?
|
||||
print("Checking for pmc_perf.csv in ", args.path)
|
||||
@@ -580,7 +639,7 @@ def main():
|
||||
if not args.remaining:
|
||||
throw_parse_error(
|
||||
my_parser,
|
||||
"Cannot find existing application data.\nAttempting to generate application data from -c.\n--cmd option is required to generate application data.",
|
||||
"Cannot find existing application data.\nAttempting to generate application data from -- <app_cmd>.\n-- <app_cmd> option is required to generate application data.",
|
||||
)
|
||||
else:
|
||||
characterize_app(args.path, args.remaining, args.verbose)
|
||||
@@ -589,8 +648,8 @@ def main():
|
||||
|
||||
# Profile only
|
||||
else:
|
||||
print("\n--------\nProfile only\n--------\n")
|
||||
omniperf_profile(args)
|
||||
print("\n-------------\nProfile only\n-------------\n")
|
||||
omniperf_profile(args, VER)
|
||||
|
||||
##############
|
||||
# DATABASE MODE
|
||||
@@ -651,7 +710,7 @@ def main():
|
||||
##############
|
||||
if args.mode == "analyze":
|
||||
if args.list_metrics:
|
||||
omniperf_cli(args)
|
||||
analyze(args)
|
||||
else:
|
||||
if args.path:
|
||||
if ".." in str(args.path):
|
||||
@@ -675,7 +734,7 @@ def main():
|
||||
my_parser, dir[0]
|
||||
) # Verify workload is valid before analyzing
|
||||
|
||||
omniperf_cli(args)
|
||||
analyze(args)
|
||||
else:
|
||||
throw_parse_error(
|
||||
my_parser,
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# Description
|
||||
|
||||
omniperf_cli.py is a post-processing profiling tool with the raw data collected from omniperf.
|
||||
omniperf_analyze.py is a post-processing profiling tool with the raw data collected from omniperf.
|
||||
|
||||
## Features
|
||||
|
||||
|
До Ширина: | Высота: | Размер: 197 KiB После Ширина: | Высота: | Размер: 197 KiB |
|
До Ширина: | Высота: | Размер: 3.5 KiB После Ширина: | Высота: | Размер: 3.5 KiB |
|
До Ширина: | Высота: | Размер: 187 KiB После Ширина: | Высота: | Размер: 187 KiB |
|
До Ширина: | Высота: | Размер: 282 KiB После Ширина: | Высота: | Размер: 282 KiB |
|
До Ширина: | Высота: | Размер: 182 KiB После Ширина: | Высота: | Размер: 182 KiB |
|
До Ширина: | Высота: | Размер: 116 KiB После Ширина: | Высота: | Размер: 116 KiB |