Merge branch 'dev' of github.com:AMDResearch/omniperf into python-logging

Tento commit je obsažen v:
colramos425
2022-12-06 10:38:10 -06:00
290 změnil soubory, kde provedl 13565 přidání a 174 odebrání
+8 -7
Zobrazit soubor
@@ -212,11 +212,11 @@ install(PROGRAMS src/omniperf TYPE BIN)
install(FILES src/parser.py TYPE BIN) install(FILES src/parser.py TYPE BIN)
install(FILES src/common.py TYPE BIN) install(FILES src/common.py TYPE BIN)
install(FILES VERSION VERSION.sha DESTINATION ${CMAKE_INSTALL_PREFIX}) install(FILES VERSION VERSION.sha DESTINATION ${CMAKE_INSTALL_PREFIX})
# src/omniperf_cli # src/omniperf_analyze
install( install(
DIRECTORY src/omniperf_cli DIRECTORY src/omniperf_analyze
TYPE BIN TYPE BIN
PATTERN src/omniperf_cli/tests EXCLUDE PATTERN src/omniperf_analyze/tests EXCLUDE
PATTERN "__pycache__" EXCLUDE) PATTERN "__pycache__" EXCLUDE)
# src/utils # src/utils
install( install(
@@ -224,10 +224,11 @@ install(
TYPE BIN TYPE BIN
PATTERN "rooflines*" EXCLUDE) PATTERN "rooflines*" EXCLUDE)
# src/utils/rooflines # src/utils/rooflines
install(PROGRAMS src/utils/rooflines/roofline-rhel8-mi200-rocm5 install(
src/utils/rooflines/roofline-sle15sp3-mi200-rocm5 PROGRAMS src/utils/rooflines/roofline-rhel8-mi200-rocm5
src/utils/rooflines/roofline-ubuntu20_04-mi200-rocm5 src/utils/rooflines/roofline-sle15sp3-mi200-rocm5
DESTINATION ${CMAKE_INSTALL_BINDIR}/utils/rooflines) src/utils/rooflines/roofline-ubuntu20_04-mi200-rocm5
DESTINATION ${CMAKE_INSTALL_BINDIR}/utils/rooflines)
# src/perfmon_pub # src/perfmon_pub
install( install(
DIRECTORY src/perfmon_pub DIRECTORY src/perfmon_pub
Rozdílový obsah nebyl zobrazen, protože některé řádky jsou příliš dlouhá
+7 -7
Zobrazit soubor
@@ -13,19 +13,19 @@
"author": "Audacious Software Group", "author": "Audacious Software Group",
"license": "MIT", "license": "MIT",
"devDependencies": { "devDependencies": {
"@grafana/data": "latest",
"@grafana/toolkit": "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": { "engines": {
"node": ">=14" "node": ">=14"
}, },
"dependencies": { "dependencies": {
"@grafana/runtime": "^8.1.1", "@grafana/runtime": "9.1.2",
"@svgdotjs/svg.js": "^3.1.1", "@grafana/data": "9.1.2",
"react-monaco-editor": "^0.44.0", "@grafana/ui": "9.1.2",
"tslib": "^2.3.1" "@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." "_comments": "Dependencies are not included as part of Omniperf. It's the user's responsibility to accept any licensing implications before building the project."
} }
+1 -1
Zobrazit soubor
@@ -31,5 +31,5 @@ pythonpath = [
".", ".",
"src", "src",
"src/utils", "src/utils",
"src/omniperf_cli/utils" "src/omniperf_analyze/utils"
] ]
+5
Zobrazit soubor
@@ -68,6 +68,11 @@ The uniform color coding is applied to most visualizations (bars, table, diagram
## Grafana GUI Import ## 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. 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: Each workload is imported to a separate database with the following naming convention:
omniperf_<team>_<database>_<soc> omniperf_<team>_<database>_<soc>
+1 -1
Zobrazit soubor
@@ -180,7 +180,7 @@ $ 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. > 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 ### Setup Grafana Instance
Once you've launced your docker container you should be able to reach Grafana at **http://\<host-ip>:1400**. The default login credentials for the first-time Grafana setup are: 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** - Username: **admin**
- Password: **admin** - Password: **admin**
+1 -1
Zobrazit soubor
@@ -41,7 +41,7 @@ Analyze
Dash is running on http://0.0.0.0:8050/ Dash is running on http://0.0.0.0:8050/
* Serving Flask app 'omniperf_cli.omniperf_cli' (lazy loading) * Serving Flask app 'omniperf_analyze.omniperf_analyze' (lazy loading)
* Environment: production * Environment: production
WARNING: This is a development server. Do not use it in a production deployment. WARNING: This is a development server. Do not use it in a production deployment.
Use a production WSGI server instead. Use a production WSGI server instead.
+38 -17
Zobrazit soubor
@@ -37,7 +37,7 @@ from utils.perfagg import perfmon_filter, pmc_filter
from utils import remove_workload from utils import remove_workload
from utils import csv_converter # Import workload from utils import csv_converter # Import workload
from utils import plot_roofline # standalone roofline 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 ( from common import (
OMNIPERF_HOME, OMNIPERF_HOME,
@@ -77,6 +77,7 @@ def resolve_rocprof():
print("ROC Profiler: ", rocprof_path.stdout.decode("utf-8")) print("ROC Profiler: ", rocprof_path.stdout.decode("utf-8"))
def get_soc(): def get_soc():
mspec = specs.get_machine_specs(0) mspec = specs.get_machine_specs(0)
@@ -183,8 +184,6 @@ def gen_sysinfo(workload_name, workload_dir, ip_blocks, app_cmd, skip_roof):
if not skip_roof: if not skip_roof:
blocks.append("roofline") blocks.append("roofline")
# ip block info # ip block info
if ip_blocks == None: if ip_blocks == None:
t = ["SQ", "LDS", "SQC", "TA", "TD", "TCP", "TCC", "SPI", "CPC", "CPF"] t = ["SQ", "LDS", "SQC", "TA", "TD", "TCP", "TCC", "SPI", "CPC", "CPF"]
@@ -205,10 +204,12 @@ def mongo_import(args, profileAndImport):
csv_converter.convert_folder(connectionInfo, Extractionlvl) csv_converter.convert_folder(connectionInfo, Extractionlvl)
print("-- Complete! --") print("-- Complete! --")
################################################ ################################################
# Roofline Helpers # Roofline Helpers
################################################ ################################################
def detect_roofline(): def detect_roofline():
mspec = specs.get_machine_specs(0) mspec = specs.get_machine_specs(0)
rocm_ver = mspec.rocmversion[:1] rocm_ver = mspec.rocmversion[:1]
@@ -222,7 +223,7 @@ def detect_roofline():
rooflineBinary = os.environ["ROOFLINE_BIN"] rooflineBinary = os.environ["ROOFLINE_BIN"]
if os.path.exists(rooflineBinary): if os.path.exists(rooflineBinary):
print("Detected user-supplied binary") print("Detected user-supplied binary")
return {"rocm_ver":"override", "distro":"override", "path":rooflineBinary} return {"rocm_ver": "override", "distro": "override", "path": rooflineBinary}
else: else:
print("ROOFLINE ERROR: user-supplied path to binary not accessible") print("ROOFLINE ERROR: user-supplied path to binary not accessible")
print("--> ROOFLINE_BIN = %s\n" % target_binary) print("--> ROOFLINE_BIN = %s\n" % target_binary)
@@ -240,9 +241,10 @@ def detect_roofline():
print("ROOFLINE ERROR: Cannot find a valid binary for your operating system") print("ROOFLINE ERROR: Cannot find a valid binary for your operating system")
sys.exit(1) sys.exit(1)
target_binary = { "rocm_ver":rocm_ver, "distro":distro } target_binary = {"rocm_ver": rocm_ver, "distro": distro}
return target_binary return target_binary
def mibench(args): def mibench(args):
print("No roofline data found. Generating...") print("No roofline data found. Generating...")
@@ -250,13 +252,20 @@ def mibench(args):
if target_binary["rocm_ver"] == "override": if target_binary["rocm_ver"] == "override":
path_to_binary = target_binary["path"] path_to_binary = target_binary["path"]
else: 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 # Distro is valid but cant find rocm ver
if not os.path.exists(path_to_binary): if not os.path.exists(path_to_binary):
print( print("ROOFLINE ERROR: Unable to locate expected binary (%s)." % path_to_binary)
"ROOFLINE ERROR: ROCm version not supported."
)
sys.exit(1) sys.exit(1)
run_subprocess( run_subprocess(
@@ -286,6 +295,7 @@ def characterize_app(path, cmd, verbose):
print(fname) print(fname)
run_prof(fname, workload_dir, perfmon_dir, app_cmd, verbose) run_prof(fname, workload_dir, perfmon_dir, app_cmd, verbose)
################################################ ################################################
# Profiling Helpers # Profiling Helpers
################################################ ################################################
@@ -316,7 +326,7 @@ def run_prof(fname, workload_dir, perfmon_dir, cmd, verbose):
) )
def omniperf_profile(args,VER): def omniperf_profile(args, VER):
# Verify valid target # Verify valid target
if args.target not in SOC_LIST: if args.target not in SOC_LIST:
parse.print_help(sys.stderr) parse.print_help(sys.stderr)
@@ -396,11 +406,21 @@ def omniperf_profile(args,VER):
if target_binary["rocm_ver"] == "override": if target_binary["rocm_ver"] == "override":
path_to_binary = target_binary["path"] path_to_binary = target_binary["path"]
else: 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 = (
# Distro is valid but cant find rocm ver 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): if not os.path.exists(path_to_binary):
print( print(
"ROOFLINE ERROR: ROCm version not supported." "ROOFLINE ERROR: Unable to locate expected binary (%s))."
% path_to_binary
) )
sys.exit(1) sys.exit(1)
@@ -414,6 +434,7 @@ def omniperf_profile(args,VER):
] ]
) )
################################################ ################################################
# MAIN # MAIN
################################################ ################################################
@@ -432,7 +453,7 @@ def main():
args = my_parser.parse_args() args = my_parser.parse_args()
vData = getVersion() vData = getVersion()
VER = vData['version'] VER = vData["version"]
if args.mode == None: if args.mode == None:
throw_parse_error( throw_parse_error(
@@ -532,7 +553,7 @@ def main():
# Profile only # Profile only
else: else:
print("\n-------------\nProfile only\n-------------\n") print("\n-------------\nProfile only\n-------------\n")
omniperf_profile(args,VER) omniperf_profile(args, VER)
############## ##############
# DATABASE MODE # DATABASE MODE
@@ -593,7 +614,7 @@ def main():
############## ##############
if args.mode == "analyze": if args.mode == "analyze":
if args.list_metrics: if args.list_metrics:
omniperf_cli(args) analyze(args)
else: else:
if args.path: if args.path:
if ".." in str(args.path): if ".." in str(args.path):
@@ -617,7 +638,7 @@ def main():
my_parser, dir[0] my_parser, dir[0]
) # Verify workload is valid before analyzing ) # Verify workload is valid before analyzing
omniperf_cli(args) analyze(args)
else: else:
throw_parse_error( throw_parse_error(
my_parser, my_parser,
+1 -1
Zobrazit soubor
@@ -1,6 +1,6 @@
# Description # 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 ## Features

Před

Šířka:  |  Výška:  |  Velikost: 197 KiB

Za

Šířka:  |  Výška:  |  Velikost: 197 KiB

Před

Šířka:  |  Výška:  |  Velikost: 3.5 KiB

Za

Šířka:  |  Výška:  |  Velikost: 3.5 KiB

Před

Šířka:  |  Výška:  |  Velikost: 187 KiB

Za

Šířka:  |  Výška:  |  Velikost: 187 KiB

Před

Šířka:  |  Výška:  |  Velikost: 282 KiB

Za

Šířka:  |  Výška:  |  Velikost: 282 KiB

Před

Šířka:  |  Výška:  |  Velikost: 182 KiB

Za

Šířka:  |  Výška:  |  Velikost: 182 KiB

Před

Šířka:  |  Výška:  |  Velikost: 116 KiB

Za

Šířka:  |  Výška:  |  Velikost: 116 KiB

Před

Šířka:  |  Výška:  |  Velikost: 118 KiB

Za

Šířka:  |  Výška:  |  Velikost: 118 KiB

Před

Šířka:  |  Výška:  |  Velikost: 116 KiB

Za

Šířka:  |  Výška:  |  Velikost: 116 KiB

Před

Šířka:  |  Výška:  |  Velikost: 118 KiB

Za

Šířka:  |  Výška:  |  Velikost: 118 KiB

Před

Šířka:  |  Výška:  |  Velikost: 120 KiB

Za

Šířka:  |  Výška:  |  Velikost: 120 KiB

Před

Šířka:  |  Výška:  |  Velikost: 114 KiB

Za

Šířka:  |  Výška:  |  Velikost: 114 KiB

Před

Šířka:  |  Výška:  |  Velikost: 120 KiB

Za

Šířka:  |  Výška:  |  Velikost: 120 KiB

Před

Šířka:  |  Výška:  |  Velikost: 117 KiB

Za

Šířka:  |  Výška:  |  Velikost: 117 KiB

Před

Šířka:  |  Výška:  |  Velikost: 116 KiB

Za

Šířka:  |  Výška:  |  Velikost: 116 KiB

Některé soubory nejsou zobrazny, neboť je v této revizi změněno mnoho souborů Zobrazit více