diff --git a/src/utils/utils.py b/src/utils/utils.py index 3dd86494f6..c6ba193eac 100644 --- a/src/utils/utils.py +++ b/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!!!")