From f775c7cdbdd3bd5992f360b5612d9dbcb86e5dfe Mon Sep 17 00:00:00 2001 From: vedithal-amd Date: Tue, 18 Mar 2025 11:26:17 -0400 Subject: [PATCH] Band aid fix for MI 100 no counters collected (#614) * rocprofv3 might not collect any counters for MI 100, handle this case gracefully to prevent test failures [ROCm/rocprofiler-compute commit: 64ccd588deaef1273132d0102cdd33f6bbd5ccf2] --- projects/rocprofiler-compute/src/utils/utils.py | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/projects/rocprofiler-compute/src/utils/utils.py b/projects/rocprofiler-compute/src/utils/utils.py index 3dd86494f6..c6ba193eac 100644 --- a/projects/rocprofiler-compute/src/utils/utils.py +++ b/projects/rocprofiler-compute/src/utils/utils.py @@ -651,9 +651,15 @@ def run_prof( # TODO: add hip trace output processing # Combine results into single CSV file - combined_results = pd.concat( - [pd.read_csv(f) for f in results_files], ignore_index=True - ) + if results_files: + combined_results = pd.concat( + [pd.read_csv(f) for f in results_files], ignore_index=True + ) + else: + console_warning( + f"Cannot write results for {fbase}.csv due to no counter csv files generated." + ) + return # Overwrite column to ensure unique IDs. combined_results["Dispatch_ID"] = range(0, len(combined_results)) @@ -761,7 +767,8 @@ def process_rocprofv3_output(rocprof_output, workload_dir, is_timestamps): ) else: # when the input is not for timestamps, and counter csv file is not generated, we assume failed rocprof run and will completely bypass the file generation and merging for current pmc - console_error("No counter csv files generated, rocprofv3 run failed!!!") + results_files_csv = [] + console_warning("No counter csv files generated, rocprofv3 run failed!!!") else: console_error("The output file of rocprofv3 can only support json or csv!!!")