Merge branch 'dev' of github.com:AMDResearch/omniperf into python-logging
[ROCm/rocprofiler-compute commit: 5cd0503a11]
此提交包含在:
當前提交
51b5f5101d
290 file changed
+13565
-174
No files matched your search
@@ -68,6 +68,11 @@ The uniform color coding is applied to most visualizations (bars, table, diagram
|
||||
## 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>
|
||||
|
||||
@@ -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.
|
||||
|
||||
### 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**
|
||||
- Password: **admin**
|
||||
|
||||
@@ -41,7 +41,7 @@ Analyze
|
||||
|
||||
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
|
||||
WARNING: This is a development server. Do not use it in a production deployment.
|
||||
Use a production WSGI server instead.
|
||||
|
||||
@@ -37,7 +37,7 @@ 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,
|
||||
@@ -77,6 +77,7 @@ def resolve_rocprof():
|
||||
|
||||
print("ROC Profiler: ", rocprof_path.stdout.decode("utf-8"))
|
||||
|
||||
|
||||
def get_soc():
|
||||
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:
|
||||
blocks.append("roofline")
|
||||
|
||||
|
||||
|
||||
# ip block info
|
||||
if ip_blocks == None:
|
||||
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)
|
||||
print("-- Complete! --")
|
||||
|
||||
|
||||
################################################
|
||||
# Roofline Helpers
|
||||
################################################
|
||||
|
||||
|
||||
def detect_roofline():
|
||||
mspec = specs.get_machine_specs(0)
|
||||
rocm_ver = mspec.rocmversion[:1]
|
||||
@@ -222,7 +223,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)
|
||||
@@ -240,23 +241,31 @@ 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)
|
||||
|
||||
run_subprocess(
|
||||
@@ -286,6 +295,7 @@ def characterize_app(path, cmd, verbose):
|
||||
print(fname)
|
||||
run_prof(fname, workload_dir, perfmon_dir, app_cmd, verbose)
|
||||
|
||||
|
||||
################################################
|
||||
# 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
|
||||
if args.target not in SOC_LIST:
|
||||
parse.print_help(sys.stderr)
|
||||
@@ -396,11 +406,21 @@ def omniperf_profile(args,VER):
|
||||
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)
|
||||
|
||||
@@ -414,6 +434,7 @@ def omniperf_profile(args,VER):
|
||||
]
|
||||
)
|
||||
|
||||
|
||||
################################################
|
||||
# MAIN
|
||||
################################################
|
||||
@@ -432,7 +453,7 @@ def main():
|
||||
args = my_parser.parse_args()
|
||||
|
||||
vData = getVersion()
|
||||
VER = vData['version']
|
||||
VER = vData["version"]
|
||||
|
||||
if args.mode == None:
|
||||
throw_parse_error(
|
||||
@@ -532,7 +553,7 @@ def main():
|
||||
# Profile only
|
||||
else:
|
||||
print("\n-------------\nProfile only\n-------------\n")
|
||||
omniperf_profile(args,VER)
|
||||
omniperf_profile(args, VER)
|
||||
|
||||
##############
|
||||
# DATABASE MODE
|
||||
@@ -593,7 +614,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):
|
||||
@@ -617,7 +638,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
-1
@@ -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
|
||||
|
||||
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Loaded 100 of 290 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
封鎖使用者