Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pull in changes for upcoming pre-release #190

Merged
merged 19 commits into from
Oct 13, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
7d457b5
Replacing subprocess with shutil
coleramos425 Aug 24, 2023
256ada0
uses c++filt instead of llvm-cxxfilt
JoseSantosAMD Aug 24, 2023
50fd968
Removing kernelVerbose from database mode
coleramos425 Aug 24, 2023
0694400
Merge branch 'main' of github.com:AMDResearch/omniperf into dev
coleramos425 Aug 29, 2023
8936966
Standardizing headers. Will use 'avg' instead of 'mean'
coleramos425 Aug 30, 2023
44b05c0
Adding a minimum version to dash module
coleramos425 Aug 30, 2023
6461df9
Adding color code thresholds to standalone GUI to match Grafana
coleramos425 Aug 30, 2023
56e497f
Update src/utils/csv_processor.py
JoseSantosAMD Aug 30, 2023
1289682
Merge pull request #168 from JoseSantosAMD/cpp_filt
coleramos425 Sep 5, 2023
a0955c2
fix for stoichastic kernel dispatch selection
Sep 11, 2023
6cc220d
Merge pull request #183 from arghdos/fix_for_dispatch_selection_of_st…
coleramos425 Sep 11, 2023
8ec6bd4
Stub swc/core module to 1.3.75 to fix know issue with lastest version…
coleramos425 Sep 19, 2023
d334190
Fix verbose mode in analyze mode
coleramos425 Sep 20, 2023
95f886e
Consistent useage of -p/--path option in profile mode
coleramos425 Oct 4, 2023
6b3c33d
Lock Pandas to version 1.4.3 for tutorial
coleramos425 Oct 9, 2023
c345a4c
Establish connection between kernel related flags in Analyze Mode (#187)
coleramos425 Oct 11, 2023
00d57e1
Fixing bug in kernel/dispatch filter pytest
coleramos425 Oct 12, 2023
15112d3
More CI logic errors fixed
coleramos425 Oct 12, 2023
c0a9596
Comply to Python formatting
coleramos425 Oct 12, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion grafana_plugins/svg_plugin/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"@grafana/e2e-selectors": "9.5.3",
"@grafana/eslint-config": "^6.0.0",
"@grafana/tsconfig": "^1.2.0-rc1",
"@swc/core": "^1.3.62",
"@swc/core": "1.3.75",
"@swc/helpers": "^0.5.0",
"@swc/jest": "^0.2.26",
"@testing-library/jest-dom": "^5.16.5",
Expand Down
4 changes: 2 additions & 2 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
astunparse==1.6.2
colorlover
dash
dash>=1.12.0
matplotlib
numpy>=1.17.5
pandas>=1.4.3
pandas==1.4.3
pymongo
pyyaml
tabulate
Expand Down
9 changes: 4 additions & 5 deletions src/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,18 +44,17 @@ def resolve_rocprof(returnPath=False):
else:
rocprof_cmd = os.environ["ROCPROF"]

rocprof_path = subprocess.run(
["which", rocprof_cmd], stdout=subprocess.PIPE, stderr=subprocess.DEVNULL
)
if rocprof_path.returncode != 0:
rocprof_path = shutil.which(rocprof_cmd)

if not rocprof_path:
print("\nError: Unable to resolve path to %s binary" % rocprof_cmd)
print(
"Please verify installation or set ROCPROF environment variable with full path."
)
sys.exit(1)
else:
# Resolve any sym links in file path
rocprof_path = os.path.realpath(rocprof_path.stdout.decode("utf-8").rstrip("\n"))
rocprof_path = os.path.realpath(rocprof_path.rstrip("\n"))
print("ROC Profiler: ", rocprof_path)
if returnPath:
return rocprof_path
Expand Down
28 changes: 13 additions & 15 deletions src/omniperf
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ import pandas as pd
from datetime import datetime
from pathlib import Path as path
import warnings
import shutil

from parser import parse
from utils import specs
Expand Down Expand Up @@ -235,10 +236,10 @@ def gen_sysinfo(workload_name, workload_dir, ip_blocks, app_cmd, skip_roof):

def mongo_import(args, profileAndImport):
# Validate target directory
connectionInfo, Extractionlvl = csv_processor.parse(args, profileAndImport)
connectionInfo = csv_processor.parse(args, profileAndImport)
# Convert and upload data
print("-- Conversion & Upload in Progress --")
csv_processor.convert_folder(connectionInfo, Extractionlvl)
csv_processor.convert_folder(connectionInfo)
print("-- Complete! --")

################################################
Expand Down Expand Up @@ -438,10 +439,8 @@ def characterize_app(args, VER):
def run_rocscope(args, fname):
# profile the app
if args.use_rocscope == True:
result = subprocess.run(
["which", "rocscope"], stdout=subprocess.PIPE, stderr=subprocess.DEVNULL
)
if result.returncode == 0:
result = shutil.which("rocscope")
if result:
rs_cmd = [
result.stdout.decode("ascii").strip(),
"metrics",
Expand Down Expand Up @@ -530,7 +529,10 @@ def omniperf_profile(args, VER):
print("KernelName verbose level: ", str(args.kernelVerbose))

# Set up directories
workload_dir = args.path + "/" + args.name + "/" + args.target
if args.path == os.getcwd() + "/workloads":
workload_dir = args.path + "/" + args.name + "/" + args.target
else:
workload_dir = args.path
perfmon_dir = str(OMNIPERF_HOME) + "/perfmon_pub"

# Perfmon filtering
Expand All @@ -553,10 +555,8 @@ def omniperf_profile(args, VER):
print(e)
sys.exit(1)

result = subprocess.run(
["which", "rocscope"], stdout=subprocess.PIPE, stderr=subprocess.DEVNULL
)
if result.returncode == 0:
result = shutil.which("rocscope")
if result:
rs_cmd = [
result.stdout.decode("ascii").strip(),
"top10",
Expand Down Expand Up @@ -587,10 +587,8 @@ def omniperf_profile(args, VER):
print(e)
sys.exit(1)

result = subprocess.run(
["which", "rocscope"], stdout=subprocess.PIPE, stderr=subprocess.DEVNULL
)
if result.returncode == 0:
result = shutil.which("rocscope")
if result:
rs_cmd = [
result.stdout.decode("ascii").strip(),
"summary",
Expand Down
12 changes: 6 additions & 6 deletions src/omniperf_analyze/configs/gfx906/1300_instruction-cache.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,38 +38,38 @@ Panel Config:
title: Instruction Cache Accesses
header:
metric: L1I Metric
mean: Mean
avg: Avg
min: Min
max: Max
unit: Unit
tips: Tips
metric:
Req:
mean: AVG((SQC_ICACHE_REQ / $denom))
avg: AVG((SQC_ICACHE_REQ / $denom))
min: MIN((SQC_ICACHE_REQ / $denom))
max: MAX((SQC_ICACHE_REQ / $denom))
unit: (Req + $normUnit)
tips:
Hits:
mean: AVG((SQC_ICACHE_HITS / $denom))
avg: AVG((SQC_ICACHE_HITS / $denom))
min: MIN((SQC_ICACHE_HITS / $denom))
max: MAX((SQC_ICACHE_HITS / $denom))
unit: (Hits + $normUnit)
tips:
Misses - Non Duplicated:
mean: AVG((SQC_ICACHE_MISSES / $denom))
avg: AVG((SQC_ICACHE_MISSES / $denom))
min: MIN((SQC_ICACHE_MISSES / $denom))
max: MAX((SQC_ICACHE_MISSES / $denom))
unit: (Misses + $normUnit)
tips:
Misses - Duplicated:
mean: AVG((SQC_ICACHE_MISSES_DUPLICATE / $denom))
avg: AVG((SQC_ICACHE_MISSES_DUPLICATE / $denom))
min: MIN((SQC_ICACHE_MISSES_DUPLICATE / $denom))
max: MAX((SQC_ICACHE_MISSES_DUPLICATE / $denom))
unit: (Misses + $normUnit)
tips:
Cache Hit:
mean: AVG(((100 * SQC_ICACHE_HITS) / ((SQC_ICACHE_HITS + SQC_ICACHE_MISSES)
avg: AVG(((100 * SQC_ICACHE_HITS) / ((SQC_ICACHE_HITS + SQC_ICACHE_MISSES)
+ SQC_ICACHE_MISSES_DUPLICATE)))
min: MIN(((100 * SQC_ICACHE_HITS) / ((SQC_ICACHE_HITS + SQC_ICACHE_MISSES) +
SQC_ICACHE_MISSES_DUPLICATE)))
Expand Down
36 changes: 18 additions & 18 deletions src/omniperf_analyze/configs/gfx906/1400_constant-cache.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,38 +39,38 @@ Panel Config:
title: Scalar L1D Cache Accesses
header:
metric: Metric
mean: Mean
avg: Avg
min: Min
max: Max
unit: Unit
tips: Tips
metric:
Req:
mean: AVG((SQC_DCACHE_REQ / $denom))
avg: AVG((SQC_DCACHE_REQ / $denom))
min: MIN((SQC_DCACHE_REQ / $denom))
max: MAX((SQC_DCACHE_REQ / $denom))
unit: (Req + $normUnit)
tips:
Hits:
mean: AVG((SQC_DCACHE_HITS / $denom))
avg: AVG((SQC_DCACHE_HITS / $denom))
min: MIN((SQC_DCACHE_HITS / $denom))
max: MAX((SQC_DCACHE_HITS / $denom))
unit: (Req + $normUnit)
tips:
Misses - Non Duplicated:
mean: AVG((SQC_DCACHE_MISSES / $denom))
avg: AVG((SQC_DCACHE_MISSES / $denom))
min: MIN((SQC_DCACHE_MISSES / $denom))
max: MAX((SQC_DCACHE_MISSES / $denom))
unit: (Req + $normUnit)
tips:
Misses- Duplicated:
mean: AVG((SQC_DCACHE_MISSES_DUPLICATE / $denom))
avg: AVG((SQC_DCACHE_MISSES_DUPLICATE / $denom))
min: MIN((SQC_DCACHE_MISSES_DUPLICATE / $denom))
max: MAX((SQC_DCACHE_MISSES_DUPLICATE / $denom))
unit: (Req + $normUnit)
tips:
Cache Hit:
mean: AVG((((100 * SQC_DCACHE_HITS) / ((SQC_DCACHE_HITS + SQC_DCACHE_MISSES)
avg: AVG((((100 * SQC_DCACHE_HITS) / ((SQC_DCACHE_HITS + SQC_DCACHE_MISSES)
+ SQC_DCACHE_MISSES_DUPLICATE)) if (((SQC_DCACHE_HITS + SQC_DCACHE_MISSES)
+ SQC_DCACHE_MISSES_DUPLICATE) != 0) else None))
min: MIN((((100 * SQC_DCACHE_HITS) / ((SQC_DCACHE_HITS + SQC_DCACHE_MISSES)
Expand All @@ -82,7 +82,7 @@ Panel Config:
unit: pct
tips:
Read Req (Total):
mean: AVG((((((SQC_DCACHE_REQ_READ_1 + SQC_DCACHE_REQ_READ_2) + SQC_DCACHE_REQ_READ_4)
avg: AVG((((((SQC_DCACHE_REQ_READ_1 + SQC_DCACHE_REQ_READ_2) + SQC_DCACHE_REQ_READ_4)
+ SQC_DCACHE_REQ_READ_8) + SQC_DCACHE_REQ_READ_16) / $denom))
min: MIN((((((SQC_DCACHE_REQ_READ_1 + SQC_DCACHE_REQ_READ_2) + SQC_DCACHE_REQ_READ_4)
+ SQC_DCACHE_REQ_READ_8) + SQC_DCACHE_REQ_READ_16) / $denom))
Expand All @@ -91,37 +91,37 @@ Panel Config:
unit: (Req + $normUnit)
tips:
Atomic Req:
mean: AVG((SQC_DCACHE_ATOMIC / $denom))
avg: AVG((SQC_DCACHE_ATOMIC / $denom))
min: MIN((SQC_DCACHE_ATOMIC / $denom))
max: MAX((SQC_DCACHE_ATOMIC / $denom))
unit: (Req + $normUnit)
tips:
Read Req (1 DWord):
mean: AVG((SQC_DCACHE_REQ_READ_1 / $denom))
avg: AVG((SQC_DCACHE_REQ_READ_1 / $denom))
min: MIN((SQC_DCACHE_REQ_READ_1 / $denom))
max: MAX((SQC_DCACHE_REQ_READ_1 / $denom))
unit: (Req + $normUnit)
tips:
Read Req (2 DWord):
mean: AVG((SQC_DCACHE_REQ_READ_2 / $denom))
avg: AVG((SQC_DCACHE_REQ_READ_2 / $denom))
min: MIN((SQC_DCACHE_REQ_READ_2 / $denom))
max: MAX((SQC_DCACHE_REQ_READ_2 / $denom))
unit: (Req + $normUnit)
tips:
Read Req (4 DWord):
mean: AVG((SQC_DCACHE_REQ_READ_4 / $denom))
avg: AVG((SQC_DCACHE_REQ_READ_4 / $denom))
min: MIN((SQC_DCACHE_REQ_READ_4 / $denom))
max: MAX((SQC_DCACHE_REQ_READ_4 / $denom))
unit: (Req + $normUnit)
tips:
Read Req (8 DWord):
mean: AVG((SQC_DCACHE_REQ_READ_8 / $denom))
avg: AVG((SQC_DCACHE_REQ_READ_8 / $denom))
min: MIN((SQC_DCACHE_REQ_READ_8 / $denom))
max: MAX((SQC_DCACHE_REQ_READ_8 / $denom))
unit: (Req + $normUnit)
tips:
Read Req (16 DWord):
mean: AVG((SQC_DCACHE_REQ_READ_16 / $denom))
avg: AVG((SQC_DCACHE_REQ_READ_16 / $denom))
min: MIN((SQC_DCACHE_REQ_READ_16 / $denom))
max: MAX((SQC_DCACHE_REQ_READ_16 / $denom))
unit: (Req + $normUnit)
Expand All @@ -132,32 +132,32 @@ Panel Config:
title: Scalar L1D Cache - L2 Interface
header:
metric: Metric
mean: Mean
avg: Avg
min: Min
max: Max
unit: Unit
tips: Tips
metric:
Read Req:
mean: AVG((SQC_TC_DATA_READ_REQ / $denom))
avg: AVG((SQC_TC_DATA_READ_REQ / $denom))
min: MIN((SQC_TC_DATA_READ_REQ / $denom))
max: MAX((SQC_TC_DATA_READ_REQ / $denom))
unit: (Req + $normUnit)
tips:
Write Req:
mean: AVG((SQC_TC_DATA_WRITE_REQ / $denom))
avg: AVG((SQC_TC_DATA_WRITE_REQ / $denom))
min: MIN((SQC_TC_DATA_WRITE_REQ / $denom))
max: MAX((SQC_TC_DATA_WRITE_REQ / $denom))
unit: (Req + $normUnit)
tips:
Atomic Req:
mean: AVG((SQC_TC_DATA_ATOMIC_REQ / $denom))
avg: AVG((SQC_TC_DATA_ATOMIC_REQ / $denom))
min: MIN((SQC_TC_DATA_ATOMIC_REQ / $denom))
max: MAX((SQC_TC_DATA_ATOMIC_REQ / $denom))
unit: (Req + $normUnit)
tips:
Stall:
mean: AVG((SQC_TC_STALL / $denom))
avg: AVG((SQC_TC_STALL / $denom))
min: MIN((SQC_TC_STALL / $denom))
max: MAX((SQC_TC_STALL / $denom))
unit: (Cycles + $normUnit)
Expand Down
24 changes: 12 additions & 12 deletions src/omniperf_analyze/configs/gfx906/1600_L1_cache.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -50,14 +50,14 @@ Panel Config:
title: L1D Cache Stalls
header:
metric: Metric
mean: Mean
avg: Avg
min: Min
max: Max
unit: Unit
tips: Tips
metric:
Stalled on L2 Data:
mean: AVG((((100 * TCP_PENDING_STALL_CYCLES_sum) / TCP_GATE_EN1_sum) if (TCP_GATE_EN1_sum
avg: AVG((((100 * TCP_PENDING_STALL_CYCLES_sum) / TCP_GATE_EN1_sum) if (TCP_GATE_EN1_sum
!= 0) else None))
min: MIN((((100 * TCP_PENDING_STALL_CYCLES_sum) / TCP_GATE_EN1_sum) if (TCP_GATE_EN1_sum
!= 0) else None))
Expand All @@ -66,7 +66,7 @@ Panel Config:
unit: pct
tips:
Stalled on L2 Req:
mean: AVG((((100 * TCP_TCR_TCP_STALL_CYCLES_sum) / TCP_GATE_EN1_sum) if (TCP_GATE_EN1_sum
avg: AVG((((100 * TCP_TCR_TCP_STALL_CYCLES_sum) / TCP_GATE_EN1_sum) if (TCP_GATE_EN1_sum
!= 0) else None))
min: MIN((((100 * TCP_TCR_TCP_STALL_CYCLES_sum) / TCP_GATE_EN1_sum) if (TCP_GATE_EN1_sum
!= 0) else None))
Expand All @@ -75,7 +75,7 @@ Panel Config:
unit: pct
tips:
Tag RAM Stall (Read):
mean: AVG((((100 * TCP_READ_TAGCONFLICT_STALL_CYCLES_sum) / TCP_GATE_EN1_sum)
avg: AVG((((100 * TCP_READ_TAGCONFLICT_STALL_CYCLES_sum) / TCP_GATE_EN1_sum)
if (TCP_GATE_EN1_sum != 0) else None))
min: MIN((((100 * TCP_READ_TAGCONFLICT_STALL_CYCLES_sum) / TCP_GATE_EN1_sum)
if (TCP_GATE_EN1_sum != 0) else None))
Expand All @@ -84,7 +84,7 @@ Panel Config:
unit: pct
tips:
Tag RAM Stall (Write):
mean: AVG((((100 * TCP_WRITE_TAGCONFLICT_STALL_CYCLES_sum) / TCP_GATE_EN1_sum)
avg: AVG((((100 * TCP_WRITE_TAGCONFLICT_STALL_CYCLES_sum) / TCP_GATE_EN1_sum)
if (TCP_GATE_EN1_sum != 0) else None))
min: MIN((((100 * TCP_WRITE_TAGCONFLICT_STALL_CYCLES_sum) / TCP_GATE_EN1_sum)
if (TCP_GATE_EN1_sum != 0) else None))
Expand All @@ -93,7 +93,7 @@ Panel Config:
unit: pct
tips:
Tag RAM Stall (Atomic):
mean: AVG((((100 * TCP_ATOMIC_TAGCONFLICT_STALL_CYCLES_sum) / TCP_GATE_EN1_sum)
avg: AVG((((100 * TCP_ATOMIC_TAGCONFLICT_STALL_CYCLES_sum) / TCP_GATE_EN1_sum)
if (TCP_GATE_EN1_sum != 0) else None))
min: MIN((((100 * TCP_ATOMIC_TAGCONFLICT_STALL_CYCLES_sum) / TCP_GATE_EN1_sum)
if (TCP_GATE_EN1_sum != 0) else None))
Expand Down Expand Up @@ -363,20 +363,20 @@ Panel Config:
title: L1D Addr Translation
header:
metric: Metric
mean: Mean
avg: Avg
min: Min
max: Max
units: Units
tips: Tips
metric:
Req:
mean: AVG((TCP_UTCL1_REQUEST_sum / $denom))
avg: AVG((TCP_UTCL1_REQUEST_sum / $denom))
min: MIN((TCP_UTCL1_REQUEST_sum / $denom))
max: MAX((TCP_UTCL1_REQUEST_sum / $denom))
units: (Req + $normUnit)
tips:
Hit Ratio:
mean: AVG((((100 * TCP_UTCL1_TRANSLATION_HIT_sum) / TCP_UTCL1_REQUEST_sum) if
avg: AVG((((100 * TCP_UTCL1_TRANSLATION_HIT_sum) / TCP_UTCL1_REQUEST_sum) if
(TCP_UTCL1_REQUEST_sum != 0) else None))
min: MIN((((100 * TCP_UTCL1_TRANSLATION_HIT_sum) / TCP_UTCL1_REQUEST_sum) if
(TCP_UTCL1_REQUEST_sum != 0) else None))
Expand All @@ -385,19 +385,19 @@ Panel Config:
units: pct
tips:
Hits:
mean: AVG((TCP_UTCL1_TRANSLATION_HIT_sum / $denom))
avg: AVG((TCP_UTCL1_TRANSLATION_HIT_sum / $denom))
min: MIN((TCP_UTCL1_TRANSLATION_HIT_sum / $denom))
max: MAX((TCP_UTCL1_TRANSLATION_HIT_sum / $denom))
units: (Hits + $normUnit)
tips:
Misses (Translation):
mean: AVG((TCP_UTCL1_TRANSLATION_MISS_sum / $denom))
avg: AVG((TCP_UTCL1_TRANSLATION_MISS_sum / $denom))
min: MIN((TCP_UTCL1_TRANSLATION_MISS_sum / $denom))
max: MAX((TCP_UTCL1_TRANSLATION_MISS_sum / $denom))
units: (Misses + $normUnit)
tips:
Misses (Permission):
mean: AVG((TCP_UTCL1_PERMISSION_MISS_sum / $denom))
avg: AVG((TCP_UTCL1_PERMISSION_MISS_sum / $denom))
min: MIN((TCP_UTCL1_PERMISSION_MISS_sum / $denom))
max: MAX((TCP_UTCL1_PERMISSION_MISS_sum / $denom))
units: (Misses + $normUnit)
Expand Down
Loading
Loading