fix the wrong number of channels of TCC counters to put in pmc txt file (#633)
[ROCm/rocprofiler-compute commit: 7c1f14123a]
This commit is contained in:
@@ -255,6 +255,10 @@ class OmniSoC_Base:
|
||||
# Handle TCC channel counters: if hw_counter_matches has elements ending with '['
|
||||
# Expand and interleve the TCC channel counters
|
||||
# e.g. TCC_HIT[0] TCC_ATOMIC[0] ... TCC_HIT[1] TCC_ATOMIC[1] ...
|
||||
num_xcd_for_pmc_file = 1
|
||||
if using_v3():
|
||||
num_xcd_for_pmc_file = int(self._mspec.num_xcd)
|
||||
|
||||
for counter_name in counters.copy():
|
||||
if counter_name.startswith("TCC") and counter_name.endswith("["):
|
||||
counters.remove(counter_name)
|
||||
@@ -262,9 +266,7 @@ class OmniSoC_Base:
|
||||
counters = counters.union(
|
||||
{
|
||||
f"{counter_name}[{i}]"
|
||||
for i in range(
|
||||
int(self._mspec.num_xcd) * int(self._mspec._l2_banks)
|
||||
)
|
||||
for i in range(num_xcd_for_pmc_file * int(self._mspec._l2_banks))
|
||||
}
|
||||
)
|
||||
|
||||
@@ -309,10 +311,7 @@ class OmniSoC_Base:
|
||||
if counter_name.startswith(tuple(filter_hardware_blocks))
|
||||
}
|
||||
|
||||
if using_v3():
|
||||
# Counters not supported in rocprof v3
|
||||
counters = counters - {"TCC_BUBBLE"}
|
||||
else:
|
||||
if not using_v3():
|
||||
# Counters not supported in rocprof v1 / v2
|
||||
counters = counters - {"SQ_INSTS_VALU_MFMA_F8", "SQ_INSTS_VALU_MFMA_MOPS_F8"}
|
||||
|
||||
|
||||
@@ -451,6 +451,7 @@ def v3_counter_csv_to_v2_csv(counter_file, agent_info_filepath, converted_csv_fi
|
||||
)
|
||||
)
|
||||
if result["Agent_Id"].dtype == "object":
|
||||
# Apply the function to the 'Agent_Id' column and store it as int64
|
||||
try:
|
||||
result["Agent_Id"] = (
|
||||
result["Agent_Id"]
|
||||
@@ -560,7 +561,7 @@ def run_prof(
|
||||
# standard rocprof options
|
||||
default_options = ["-i", fname]
|
||||
options = default_options + profiler_options
|
||||
if path_counter_config_yaml.exists():
|
||||
if using_v3() and path_counter_config_yaml.exists():
|
||||
options = ["-E", str(path_counter_config_yaml)] + options
|
||||
|
||||
# set required env var for mi300
|
||||
|
||||
Reference in New Issue
Block a user