MI300 counters support for rocprof and rocprofv2(Accumulation from all xccs)
1. Xml files updated for gfx940 counters 2. File plugin changes to allow rocprofv2 backward compatibility for results.csv 3. Changes in rocprofv2 script to use tblextr.py, to generate results.csv just like rocprof Change-Id: I7798f4411ce01f6fbfffb126de654ed806ca7045 (cherry picked from commit 86cbaf38c436be876f0426fa27803b1e64d90378)
This commit is contained in:
committed by
Ammar ELWazir
parent
c795a6d375
commit
8f82ff6a46
@@ -262,6 +262,7 @@ if [ -n "$COUNTERS_PATH" ]; then
|
||||
done < $input
|
||||
fi
|
||||
|
||||
COUNTERS_PMC_DIRS=""
|
||||
if [ -n "$PMC_LINES" ]; then
|
||||
COUNTER=1
|
||||
for i in ${!PMC_LINES[@]}; do
|
||||
@@ -269,6 +270,7 @@ if [ -n "$PMC_LINES" ]; then
|
||||
if [ -n "$OUTPUT_PATH" ]; then
|
||||
if [ ! -n "$ATT_ARGV" ]; then
|
||||
FINAL_PATH="$OUTPUT_PATH_INTERNAL/pmc_$COUNTER"
|
||||
COUNTERS_PMC_DIRS="$COUNTERS_PMC_DIRS $FINAL_PATH"
|
||||
else
|
||||
FINAL_PATH="$OUTPUT_PATH"
|
||||
fi
|
||||
@@ -292,6 +294,32 @@ elif [ ! -n "$ATT_ARGV" ]; then
|
||||
fi
|
||||
fi
|
||||
|
||||
get_pmc_results_txt_path(){
|
||||
for file_name in `ls $1` ; do
|
||||
if [[ $file_name == *results.txt ]]; then
|
||||
echo "$1/$file_name"
|
||||
fi
|
||||
done
|
||||
}
|
||||
|
||||
if [ -n "$COUNTERS_PMC_DIRS" ]; then
|
||||
COUNTERS_RESULTS_TXT=""
|
||||
for PMC_DIR in $COUNTERS_PMC_DIRS; do
|
||||
COUNTERS_RESULTS_TXT="$COUNTERS_RESULTS_TXT $(get_pmc_results_txt_path $PMC_DIR)"
|
||||
done
|
||||
CSV_RESULTS=$OUTPUT_PATH_INTERNAL/results.csv
|
||||
if [ -n "$OUT_FILE_NAME" ]; then
|
||||
CSV_RESULTS=$OUTPUT_PATH_INTERNAL/$OUT_FILE_NAME
|
||||
fi
|
||||
echo "csv results path: $CSV_RESULTS"
|
||||
export ROCP_MERGE_PIDS=1 #required for tblextr.py to work correctly for counters
|
||||
if [ $RUN_FROM_BUILD == 1 ]; then
|
||||
eval "python3 $ROCM_DIR/bin/tblextr.py $CSV_RESULTS $COUNTERS_RESULTS_TXT"
|
||||
else
|
||||
eval "python3 $ROCPROFV2_DIR/../libexec/rocprofiler/tblextr.py $CSV_RESULTS $COUNTERS_RESULTS_TXT"
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ -n "$ATT_PATH" ]; then
|
||||
if [ -n "$ATT_ARGV" ]; then
|
||||
eval "python3 $ATT_PATH $ATT_ARGV"
|
||||
|
||||
Reference in New Issue
Block a user