Add support for kernel name filtering to rocprofv2

rocprofv2 does not support the "kernel:" attribute in
input files. This commit adds support for this attribute
for cli/csv output. This is requested by Alibaba/Omniperf
to have compatible execution with both v1/v2 (JSON and CTF
are not supported here and not needed).

Filtering can also be enabled by the flag ROCPROFILER_KERNEL_FILTER.

Change-Id: I376382d9e5b10a8356df8d175b1a56396b5b51d3


[ROCm/rocprofiler commit: b32eb2bda9]
This commit is contained in:
Benjamin Welton
2024-08-08 01:14:38 +00:00
committed by Benjamin Welton
parent a34d5dbc16
commit c45fbe91ff
4 changed files with 78 additions and 1 deletions
+8
View File
@@ -295,6 +295,14 @@ export LD_PRELOAD=$LD_PRELOAD:$ROCM_DIR/lib/rocprofiler/librocprofiler_tool.so
if [ -n "$PMC_LINES" ] && [ ! -n "$ATT_ARGV" ]; then
COUNTER=1
for i in ${!PMC_LINES[@]}; do
if [[ ${PMC_LINES[$i]} =~ "kernel:" ]]; then
echo ${PMC_LINES[$i]}
export ROCPROFILER_KERNEL_FILTER="${PMC_LINES[$i]}"
fi
done
for i in ${!PMC_LINES[@]}; do
export ROCPROFILER_COUNTERS="${PMC_LINES[$i]}"
if [[ ! ${PMC_LINES[$i]} =~ "pmc" ]]; then