fix crash for running rocprofv3 on mi100 (#557)

* initial hack to fix for v3 stucking on mi100 becasue of -m parameter and missing counter csv file

* proper formating

* refactored profiler option function to take soc arch

* resolve missing step that casued error for profiler option

* fix typo of arch name

* change method of putting soc info into profiler option

* isort and black format

* add comment for the part that handles missing counter csv file

* remove unncecessary import

---------

Co-authored-by: YANG WANG <ywang@ywang-ubuntu.amd.com>

[ROCm/rocprofiler-compute commit: 5ee37b3353]
这个提交包含在:
ywang103-amd和YANG WANG 编写, GitHub 于 2025-02-10 17:59:03 -05:00 提交
1 父节点 47921fe78d
当前提交 5cc49d6e90
7 个文件已更改
+27 -21

没有与搜索条件相匹配的文件

@@ -596,6 +596,9 @@ def run_prof(
new_env = os.environ.copy()
new_env["ROCPROFILER_INDIVIDUAL_XCC_MODE"] = "1"
is_timestamps = False
if path(fname).name == "timestamps.txt":
is_timestamps = True
time_1 = time.time()
# profile the app
@@ -686,10 +689,14 @@ def run_prof(
results_files_csv = glob.glob(
workload_dir + "/out/pmc_1/*/*_converted.csv"
)
else:
elif is_timestamps:
# when the input is timestamps, we know counter csv file is not generated and will instead parse kernel trace file
results_files_csv = glob.glob(
workload_dir + "/out/pmc_1/*/*_kernel_trace.csv"
)
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
return
else:
console_error("The output file of rocprofv3 can only support json or csv!!!")