Skip to content

Commit

Permalink
Pass accumulate counters to rocprofv3 using -E option (#522)
Browse files Browse the repository at this point in the history
rocprofv3 has a new -E option where extra counters can be passed (see accum_counters.yaml) instead
of defining them in counter_defs.yaml.
  • Loading branch information
benrichard-amd authored Dec 23, 2024
1 parent 8172bd8 commit 3d02560
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/rocprof_compute_profile/profiler_rocprof_v3.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
import os
import shlex

import config
from rocprof_compute_profile.profiler_base import RocProfCompute_Base
from utils.utils import console_error, console_log, demarcate, replace_timestamps

Expand All @@ -44,6 +45,13 @@ def get_profiler_options(self, fname):
if self.get_args().format_rocprof_output == "csv":
rocprof_out_format = "csv"
args = [
"-E",
os.path.join(
str(config.rocprof_compute_home),
"rocprof_compute_soc",
"profile_configs",
"accum_counters.yaml",
),
# v3 requires output directory argument
"-d",
self.get_args().path + "/" + "out",
Expand Down
25 changes: 25 additions & 0 deletions src/rocprof_compute_soc/profile_configs/accum_counters.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
SQ_IFETCH_LEVEL_ACCUM:
architectures:
gfx942/gfx941/gfx940/gfx90a:
expression: accumulate(SQ_IFETCH_LEVEL, HIGH_RES)
description: 'SQ_IFETCH_LEVEL accumulation'
SQ_INST_LEVEL_LDS_ACCUM:
architectures:
gfx942/gfx941/gfx940/gfx90a:
expression: accumulate(SQ_INST_LEVEL_LDS, HIGH_RES)
description: 'SQ_INST_LEVEL_LDS accumulation'
SQ_INST_LEVEL_SMEM_ACCUM:
architectures:
gfx942/gfx941/gfx940/gfx90a:
expression: accumulate(SQ_INST_LEVEL_SMEM, HIGH_RES)
description: 'SQ_INST_LEVEL_SMEM accumulation'
SQ_INST_LEVEL_VMEM_ACCUM:
architectures:
gfx942/gfx941/gfx940/gfx90a:
expression: accumulate(SQ_INST_LEVEL_VMEM, HIGH_RES)
description: 'SQ_INST_LEVEL_VMEM accumulation'
SQ_LEVEL_WAVES_ACCUM:
architectures:
gfx942/gfx941/gfx940/gfx90a:
expression: accumulate(SQ_LEVEL_WAVES, HIGH_RES)
description: 'SQ_LEVEL_WAVES accumulation'

0 comments on commit 3d02560

Please sign in to comment.