Prevent users from ipblock filtering in standalone GUI

Signed-off-by: coleramos425 <colramos@amd.com>
Dieser Commit ist enthalten in:
coleramos425
2023-08-16 14:16:50 -05:00
Ursprung 74f816ed47
Commit 5d74b142b6
2 geänderte Dateien mit 24 neuen und 10 gelöschten Zeilen
+23 -9
Datei anzeigen
@@ -856,6 +856,20 @@ def main():
my_parser,
"Access denied. Cannot access parent directories in path ../",
)
if args.filter_metrics and args.gui:
throw_parse_error(
my_parser,
"""
omniperf analyze --path <workload_path> [analyze options]
\n\n-------------------------------------------------------------------------------
\nExamples:
\n\tomniperf analyze -p workloads/vcopy/mi200/ --list-metrics gfx90a
\n\tomniperf analyze -p workloads/mixbench/mi200/ --filter-dispatch-ids 12 34 --decimal 3
\n\tomniperf analyze -p workloads/mixbench/mi200/ --gui
\n-------------------------------------------------------------------------------\n
\ntool: error: --gui cannot be used in combination with: -b/--metric
"""
)
print("\n--------\nAnalyze\n--------\n")
# Ensure absolute path
for dir in args.path:
@@ -877,15 +891,15 @@ def main():
throw_parse_error(
my_parser,
"""
omniperf analyze --path <workload_path> [analyze options]
\n\n-------------------------------------------------------------------------------
\nExamples:
\n\tomniperf analyze -p workloads/vcopy/mi200/ --list-metrics gfx90a
\n\tomniperf analyze -p workloads/mixbench/mi200/ --filter-dispatch-ids 12 34 --decimal 3
\n\tomniperf analyze -p workloads/mixbench/mi200/ --gui
\n-------------------------------------------------------------------------------\n
\ntool: error: the following arguments are required: -p/--path
""",
omniperf analyze --path <workload_path> [analyze options]
\n\n-------------------------------------------------------------------------------
\nExamples:
\n\tomniperf analyze -p workloads/vcopy/mi200/ --list-metrics gfx90a
\n\tomniperf analyze -p workloads/mixbench/mi200/ --filter-dispatch-ids 12 34 --decimal 3
\n\tomniperf analyze -p workloads/mixbench/mi200/ --gui
\n-------------------------------------------------------------------------------\n
\ntool: error: the following arguments are required: -p/--path
""",
)
sys.exit(0) # Indicate successful on exit
+1 -1
Datei anzeigen
@@ -268,7 +268,7 @@ def roofline_only(path_to_dir, dev_id, sort_type, mem_level, kernel_names, verbo
app_path = path_to_dir + "/pmc_perf.csv"
roofline_exists = os.path.isfile(app_path)
if not roofline_exists:
print("Error: {} does not exist")
print("Error: {} does not exist".format(app_path))
sys.exit(0)
t_df = OrderedDict()
t_df["pmc_perf"] = pd.read_csv(app_path)