Re-enable multi kernel filtering

Co-authored-by: Nick Curtis <nicholas.curtis@amd.com>
Signed-off-by: coleramos425 <colramos@amd.com>


[ROCm/rocprofiler-compute commit: 5ebd2dbc74]
Этот коммит содержится в:
coleramos425
2024-02-29 15:12:01 -06:00
коммит произвёл Cole Ramos
родитель 5f48d2d30d
Коммит 13154a0382
+4 -2
Просмотреть файл
@@ -855,7 +855,7 @@ def apply_filters(workload, dir, is_gui, debug):
# We pick up kernel names from kerne ids first.
# Then filter valid entries with kernel names.
if workload.filter_kernel_ids:
if type(workload.filter_kernel_ids) == int:
if all(type(kid) == int for kid in workload.filter_kernel_ids):
# Verify valid kernel filter
kernels_df = pd.read_csv(os.path.join(dir, "pmc_kernel_top.csv"))
for kernel_id in workload.filter_kernel_ids:
@@ -880,12 +880,14 @@ def apply_filters(workload, dir, is_gui, debug):
ret_df = ret_df.loc[
ret_df[schema.pmc_perf_file_prefix]["Kernel_Name"].isin(kernels)
]
elif type(workload.filter_kernel_ids) == str:
elif all(type(kid) == str for kid in workload.filter_kernel_ids):
ret_df = ret_df.loc[
ret_df[schema.pmc_perf_file_prefix]["Kernel_Name"].isin(
workload.filter_kernel_ids
)
]
else:
error("Mixing kernel indices and string filters is not currently supported")
if workload.filter_dispatch_ids:
# NB: support ignoring the 1st n dispatched execution by '> n'